summaryrefslogtreecommitdiffhomepage
path: root/patch/dwmc
diff options
context:
space:
mode:
authorbakkeby <[email protected]>2020-06-04 20:29:16 +0200
committerbakkeby <[email protected]>2020-06-04 20:29:16 +0200
commitd7814e3a3efe5e423b198759655db8f7cfc0071c (patch)
treeb27295c80f3cd3c9606179ebe29a9ceab0f6610f /patch/dwmc
parent2b332f719911115a2d7e46395dde744b297e25cb (diff)
downloaddwm-flexipatch-d7814e3a3efe5e423b198759655db8f7cfc0071c.tar.gz
dwm-flexipatch-d7814e3a3efe5e423b198759655db8f7cfc0071c.zip
dwmc: Adding external control to set gaps
Diffstat (limited to 'patch/dwmc')
-rwxr-xr-xpatch/dwmc25
1 files changed, 22 insertions, 3 deletions
diff --git a/patch/dwmc b/patch/dwmc
index 10ec990..3bfde22 100755
--- a/patch/dwmc
+++ b/patch/dwmc
@@ -47,7 +47,7 @@ case $# in
signal $1
;;
*)
- echo "Unknown command or missing one argument."
+ echo "Unknown command ($1) or missing one argument."
exit 1
;;
esac
@@ -58,6 +58,7 @@ case $# in
explace) ;&
moveplace) ;&
mpdchange) ;&
+ setkeymode) ;&
switchtag) ;&
togglescratch) ;&
view)
@@ -70,6 +71,7 @@ case $# in
tagex) ;&
toggletagex) ;&
setborderpx) ;&
+ setgaps) ;&
setlayoutex) ;&
setlayoutaxisex) ;&
swapfocus) ;&
@@ -99,13 +101,30 @@ case $# in
signal $1 f $2
;;
*)
- echo "Unknown command or one too many arguments."
+ echo "Unknown command ($1) or too many arguments"
+ exit 1
+ ;;
+ esac
+ ;;
+5)
+ case $1 in
+ setgaps)
+ # Expects "setgaps oh ov ih iv" where -1 means to keep existing values
+ [ $2 = -1 ] && oh=128 || oh=$2
+ [ $3 = -1 ] && ov=128 || ov=$3
+ [ $4 = -1 ] && ih=128 || ih=$4
+ [ $5 = -1 ] && iv=128 || iv=$5
+ echo $(((oh << 24) + (ov << 16) + (ih << 8) + iv))
+ signal $1 i $(((oh << 24) + (ov << 16) + (ih << 8) + iv))
+ ;;
+ *)
+ echo "Unknown command ($1) or too many arguments"
exit 1
;;
esac
;;
*)
- echo "Too many arguments."
+ echo "Unknown command ($1) or too many arguments"
exit 1
;;
esac