summaryrefslogtreecommitdiff
path: root/hypr-layout
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 /hypr-layout
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 'hypr-layout')
-rwxr-xr-xhypr-layout11
1 files changed, 10 insertions, 1 deletions
diff --git a/hypr-layout b/hypr-layout
index 0981c52..c177bb6 100755
--- a/hypr-layout
+++ b/hypr-layout
@@ -1,9 +1,18 @@
#!/bin/sh
-while getopts "dmt" o; do case "${o}" in
+printhelp () {
+ printf "hypr-layout: sets the hyprland layout.\n"
+ printf "\t-d) dwindle layout\n"
+ printf "\t-m) master layout\n"
+ printf "\t-t) toggle between master and dwindle\n"
+ exit 1
+}
+
+while getopts "dmst" o; do case "${o}" in
d) DWINDLE="y" && unset MASTER ;;
m) MASTER="y" && unset DWINDLE ;;
t) TOGGLE="y" ;;
+ *) printhelp ;;
esac done
if [ -n "$TOGGLE" ]; then