Use a pocketbook device to display cheatsheet's (images) depending on the current focused window.
Currently only support for Gnome desktops is implemented.
First, install needed dependencies and set up the build:
just prerequisitesTo see all available commands run:
just --listConnect the pocketbook device to your host. Build and transfer the pocketbook client application by running:
just pb_sdk_version=<sdk-version> transfer-pb-client-usbThe app will now appear in the pocketbook application menu. Launch it for it to wait for messages by the host.
Install the focused-window-dbus gnome-shell extension.
Build and deploy the host service with:
just deploy-host-service <pocketbook-grpc-address>It will create a systemd user service with name pb-cheatsheet-host.service.
Additionally the host application pb-cheatsheet-host will be installed into .cargo/bin,
which when rust is installed normally should be in your $PATH.
Check it's status and optionally it's journal:
systemctl --user status pb-cheatsheet-host.service
journalctl --user -u pb-cheatsheet-host.service -eEven though the service is running in the background,
it is still possible to control the device through the pb-cheatsheet-host application.
To see available commands, run:
pb-cheatsheet-host --helpFor example:
- Upload a new cheatsheet with a specific name, with tags associated to it:
pb-cheatsheet-host -a <pocketbook-ip>:51151 upload-cheatsheet --name <cheatsheet-name> --tags <associated-tags>- Take a screenshot (screenshot tool will open automatically) and upload upload it to the device for display:
pb-cheatsheet-host -a <pocketbook-ip>:51151 screenshot- Associate tags to a specific reported WM-Class:
pb-cheatsheet-host -a <pocketbook-ip>:51151 add-wm-class-tags --wm-class <wm-class> --tags <associated-tags>Whenever the associated tags of a focused window WM-Class match with the associated tags of a cheatsheet, it will be one of the cheatsheet pages that can get displayed.
Controls:
Prev/Next Button Short Press: Cycle through the cheatsheet pagesPrev/Next Button Long Press > 1.5secs: Cycle through the UI modes:- Manual (
M) : Browse through all available cheatsheets yourself - Automatic WM-Class (
A-WMC) : display cheatsheets depending on their matching associated tags with the current reported WM-Class - Screenshot (
SCR) : display the latest screenshot sent to the device. Note: the screenshot image is not persistent across app launches.
- Manual (
Menu Button Short Press: Toggle stats overlay displaying the current reported info and stats

