Skip to content

Latest commit

 

History

2 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

panick

Panic button using a mouse thumb button (BTN_EXTRA / button 5).

How it works

  • 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 writes p to /tmp/panick.sock.

  • front - runs as your user, creates /tmp/panick.sock and waits for p. When the trigger arrives it runs panick.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

./install.sh

The script compiles both binaries, installs them to /usr/local/bin/, installs the systemd service, and starts ./back immediately.

Front autostart (KDE)

After installation, set up ./front to run on login using System Settings.

Dependencies

  • gcc, pthreads
  • playerctl, pulseaudio-utils, kitty, asciiquarium
  • KDE Plasma (for virtual‑desktop switching via qdbus)

Manual

echo "p" > /tmp/panick.sock

License

MIT

About

Panic button using a mouse button [app]

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages