Panic button using a mouse thumb button (BTN_EXTRA / button 5).
-
back - runs as root via systemd, listens on
/dev/input/for mouse button events. When BTN_EXTRA (button 5) is pressed 3 times within 2 seconds it writespto/tmp/panick.sock. -
front - runs as your user, creates
/tmp/panick.sockand waits forp. When the trigger arrives it runspanick.sh. -
panick.sh - pauses all media (playerctl), mutes the speaker and microphone (pulseaudio), switches to the last virtual desktop (KWin), and opens asciiquarium in kitty.
./install.shThe script compiles both binaries, installs them to /usr/local/bin/,
installs the systemd service, and starts ./back immediately.
After installation, set up ./front to run on login using System Settings.
gcc,pthreadsplayerctl,pulseaudio-utils,kitty,asciiquarium- KDE Plasma (for virtual‑desktop switching via qdbus)
echo "p" > /tmp/panick.sockMIT