diff options
Diffstat (limited to 'keymap_toggler.sh')
-rwxr-xr-x | keymap_toggler.sh | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/keymap_toggler.sh b/keymap_toggler.sh new file mode 100755 index 0000000..e83f64e --- /dev/null +++ b/keymap_toggler.sh @@ -0,0 +1,32 @@ +#!/bin/sh + +PRESET="$1" +DEVICE="Microsoft X-Box One S pad" + +if [[ $(ps aux | grep -v grep | grep "input-remapper") ]] +then + if [[ $(ps -aux | grep -v grep | grep "\[input-remapper-\]") ]] + then + input-remapper-control --command start --device "$DEVICE" --preset "$PRESET" + $HOME/stuf/scripts/notification_wrapper.sh "\nController mapping ON" "KEYTOG" + else + input-remapper-control --command stop-all --device "$DEVICE" + $HOME/stuf/scripts/notification_wrapper.sh "\nController mapping OFF" "KEYTOG" + fi + +else + nohup input-remapper-service >/dev/null 2>&1 & + + # while [[ ! $(ps -aux | grep -v grep | grep "\[input-remapper-\]") ]]; do + # input-remapper-control --command start --device "$DEVICE" --preset "$PRESET" + # input-remapper-control --command stop-all --device "$DEVICE" + # done + + $HOME/stuf/scripts/notification_wrapper.sh "\ninput-remapper-service started" "KEYTOG" + #don't ask +fi + + +#IMPLEMENT KILLALL + +#WHEN YOU FIX THE RIGHT TRIGGER, MOVE F TO IT, AND MAKE BOTTOM BUTTON ESC |