From f28d694879239d5d9c319185a278236d317a49b6 Mon Sep 17 00:00:00 2001 From: zachir Date: Sat, 30 Aug 2025 01:09:18 -0500 Subject: 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. --- touchpad.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'touchpad.sh') 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 -- cgit v1.2.3