A lightweight LXQt panel widget that toggles touchscreen input on/off and reflects the current state directly in the panel using clear, high‑contrast SVG icons.
This widget is designed for tablet / convertible / drawing setups where accidental touch input needs to be disabled quickly (stylus-only workflows, palm rejection, kiosk modes, etc.).
- Wacom EMR (Electro-Magnetic Resonance)
- Wacom ISDv4 E6 Pen stylus
- Wacom ISDv4 E6 Finger touch
- Atmel Atmel maXTouch Digitizer
- Detects the current touch input state
- Displays the state visually in the LXQt panel
- Toggles touch on/off with a single click
- Automatically adapts icon color to panel theme
| Touch State | Panel Theme | Icon |
|---|---|---|
| On | Any | Green fingerprint |
| Off | Dark panel | White fingerprint |
| Off | Light panel | Black fingerprint |
Visual examples of the Touch Toggle widget in use.
sudo apt install -y \
lxqt-panel \
liblxqt-globalkeys0 \
liblxqt0 \
libqt6widgets6 \
libqt6gui6 \
libqt6core6 \
xinput \
build-essential \
cmake \
qt6-base-dev \
liblxqt-dev \
libx11-dev \
libxkbcommon-dev;sudo ./scripts/clean-install.shor
pkill -x lxqt-panel;
sleep 1;
sudo install -m 0644 ./touchtoggle.desktop /usr/share/lxqt/lxqt-panel/touchtoggle.desktop;
rm -rf ./build
mkdir -p build;
cd build;
cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr;
make -j"$(nproc)";
sudo cmake --install . --prefix /usr;
sudo rebootThis widget is a native LXQt panel plugin backed by a small helper script.
- Panel plugin (
libtouchtoggle.so) - Helper script (
touchctl) - talks toxinput - SVG icons - bundled via Qt resources and installed system‑wide
/usr/lib/x86_64-linux-gnu/lxqt-panel/libtouchtoggle.so
/usr/share/lxqt/lxqt-panel/plugins/touchtoggle.desktop
Credit: Kitchen JS Font Icons
/usr/share/lxqt/lxqt-panel/icons/lxqt-sr-panel/
├── fingerprint-on.svg (green)
├── fingerprint-off-dark.svg (white)
└── fingerprint-off-light.svg (black)
LXQt only discovers panel plugins from
/usr/share/lxqt/lxqt-panel/plugins/.
The panel widget delegates actual touch enable/disable logic to a small helper:
~/.local/bin/touchctl
- Lists touch devices
- Detects enabled/disabled state
- Toggles touch input via
xinput
~/.local/bin/touchctl --device;
~/.local/bin/touchctl --status;
~/.local/bin/touchctl --state;
~/.local/bin/touchctl toggle;
~/.local/bin/touchctl --status;xinput list --name-only | cat -A;Do not install manually.
All cleanup, rebuild, and installation logic is centralized in:
./scripts/clean-install.shThis script:
- Removes stale plugin versions (
srplugin, old paths,/usr/localghosts) - Installs icons
- Builds and installs the panel plugin
- Prompts for reboot at the end
Run it from the repository root:
./scripts/clean-install.sh- Right‑click the LXQt panel
- Select Configure Panel
- Click Add Widgets
- Scroll to Touch Toggle
- Click Add
- Close the panel configuration
The fingerprint icon should now appear in the panel.
This project was cleaned up and renamed during development:
srplugin→touchtogglelxqt-sr-panel→lxqt-touchtoggle-panelsrPanelPlugin→touchtogglePanelPlugin
All legacy identifiers are removed by clean-install.sh.
- Panel icon is set in C++, not via
.desktop - SVGs are bundled using
icons.qrc .desktopicon is only used for the Add Widgets list- LXQt silently ignores mismatched plugin IDs - exact naming matters
- Linux drawing tablets
- Convertible laptops
- Stylus‑only workflows
- Palm‑rejection control
- Kiosk / demo systems
- Stable
- Survives reboot
- No duplicate plugin loading
- Clean install path


