blob: e83f64ebb99d93f6a65e586cb50944ef51560fdb (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
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
|