Files
scripts/numpad-hotkeys-keyd.sh
2026-06-11 13:47:48 -04:00

47 lines
1.6 KiB
Bash
Executable File

#!/bin/bash
sudo keyd monitor |
while
read;
do
if echo "$REPLY" | fgrep "04d9:1503:20f521c9"; then
if echo "$REPLY" | fgrep "kp0 down"; then echo "this is button 0";
fi
if echo "$REPLY" | fgrep "kp1 down"; then echo "this is button 1";
fi
if echo "$REPLY" | fgrep "kp2 down"; then echo "this is button 2";
fi
if echo "$REPLY" | fgrep "kp3 down"; then echo "this is button 3";
fi
if echo "$REPLY" | fgrep "kp4 down"; then echo "this is button 4";
fi
if echo "$REPLY" | fgrep "kp5 down"; then echo "this is button 5";
fi
if echo "$REPLY" | fgrep "kp6 down"; then echo "this is button 6";
~/sh/rmctrl/commands/wega toggle
fi
if echo "$REPLY" | fgrep "kp7 down"; then echo "this is button 7";
python3 ~/sh/gamingpc/monitorLin.py
fi
if echo "$REPLY" | fgrep "kp8 down"; then echo "this is button 8";
python3 ~/sh/gamingpc/monitorWin.py
fi
if echo "$REPLY" | fgrep "kp9 down"; then echo "this is button 9";
fi
if echo "$REPLY" | fgrep "numlock down"; then echo "this is button numlock";
~/sh/rmctrl/commands/lightoff
fi
if echo "$REPLY" | fgrep "kpslash down"; then echo "this is button /";
~/sh/rmctrl/commands/lighton
fi
if echo "$REPLY" | fgrep "kpasterisk down"; then echo "this is button *";
~/sh/rmctrl/commands/monitoroff
fi
if echo "$REPLY" | fgrep "backspace down"; then echo "this is button backspace";
~/sh/rmctrl/commands/monitoron
fi
if echo "$REPLY" | fgrep "kpenter down"; then echo "this is button kpenter";
curl -v -u lucka:h0gC3PMwSCXjJH8L 'http://wattbox.mario/control.cgi?outlet=2&command=0' &
fi
fi
done