summaryrefslogtreecommitdiff
path: root/touchpad.sh
diff options
context:
space:
mode:
authorzachir <zachir@librem.one>2025-08-30 01:09:18 -0500
committerzachir <zachir@librem.one>2025-08-30 01:09:18 -0500
commitf28d694879239d5d9c319185a278236d317a49b6 (patch)
tree3f684e05c6372c8f0fc0b9f126a184f3aaad68d4 /touchpad.sh
parent7d3cbe8f708772e40608260590b717dea6735908 (diff)
Make sh scrips POSIX compliant
Using shellcheck, I went through all of them to make them standards compliant. I also tested as many as I could.
Diffstat (limited to 'touchpad.sh')
-rwxr-xr-xtouchpad.sh8
1 files changed, 4 insertions, 4 deletions
diff --git a/touchpad.sh b/touchpad.sh
index bb864e9..2a41ea4 100755
--- a/touchpad.sh
+++ b/touchpad.sh
@@ -6,21 +6,21 @@ export STATUS_FILE="$XDG_RUNTIME_DIR/touchpad.status"
enable_touchpad() {
printf "true" >"$STATUS_FILE"
notify-send -u normal "Enabling touchpad"
- hyprctl keyword '$LAPTOP_TP_ENABLED' "true" -r
+ hyprctl keyword "\$LAPTOP_TP_ENABLED" "true" -r
}
disable_touchpad() {
printf "false" >"$STATUS_FILE"
notify-send -u normal "Disabling touchpad"
- hyprctl keyword '$LAPTOP_TP_ENABLED' "false" -r
+ hyprctl keyword "\$LAPTOP_TP_ENABLED" "false" -r
}
if ! [ -f "$STATUS_FILE" ]; then
enable_touchpad
else
- if [ $(cat "$STATUS_FILE") = "true" ]; then
+ if [ "$(cat "$STATUS_FILE")" = "true" ]; then
disable_touchpad
- elif [ $(cat "$STATUS_FILE") = "false" ]; then
+ elif [ "$(cat "$STATUS_FILE")" = "false" ]; then
enable_touchpad
fi
fi