summaryrefslogtreecommitdiff
path: root/patch/dwmc
diff options
context:
space:
mode:
Diffstat (limited to 'patch/dwmc')
-rwxr-xr-xpatch/dwmc130
1 files changed, 130 insertions, 0 deletions
diff --git a/patch/dwmc b/patch/dwmc
new file mode 100755
index 0000000..3880428
--- /dev/null
+++ b/patch/dwmc
@@ -0,0 +1,130 @@
+#!/usr/bin/env bash
+
+signal() {
+ xsetroot -name "fsignal:$*"
+}
+
+case $# in
+1)
+ case $1 in
+ focusurgent) ;&
+ mirrorlayout) ;&
+ mpdcontrol) ;&
+ pushdown) ;&
+ pushup) ;&
+ self_restart) ;&
+ setlayout) ;&
+ setcfact) ;&
+ switchcol) ;&
+ view) ;&
+ viewall) ;&
+ viewtoleft) ;&
+ viewtoright) ;&
+ tagtoleft) ;&
+ tagtoright) ;&
+ tagandviewtoleft) ;&
+ tagandviewtoright) ;&
+ transfer) ;&
+ transferall) ;&
+ togglealttag) ;&
+ togglebar) ;&
+ togglefloating) ;&
+ togglefullscreen) ;&
+ fullscreen) ;&
+ togglefakefullscreen) ;&
+ togglesticky) ;&
+ togglehorizontalmax) ;&
+ toggleverticalmax) ;&
+ togglemax) ;&
+ togglegaps) ;&
+ defaultgaps) ;&
+ unfloatvisible) ;&
+ winview) ;&
+ xrdb) ;&
+ zoom) ;&
+ killclient) ;&
+ quit)
+ signal $1
+ ;;
+ *)
+ echo "Unknown command ($1) or missing one argument."
+ exit 1
+ ;;
+ esac
+ ;;
+2)
+ case $1 in
+ cyclelayout) ;&
+ explace) ;&
+ moveplace) ;&
+ mpdchange) ;&
+ setkeymode) ;&
+ switchtag) ;&
+ togglescratch) ;&
+ view)
+ signal $1 ui $2
+ ;;
+ viewex) ;&
+ toggleviewex) ;&
+ tagallmon) ;&
+ tagswapmon) ;&
+ tagex) ;&
+ toggletagex) ;&
+ setborderpx) ;&
+ setgaps) ;&
+ setlayoutex) ;&
+ setlayoutaxisex) ;&
+ swapfocus) ;&
+ focusstack) ;&
+ pushstack) ;&
+ inplacerotate) ;&
+ rotatestack) ;&
+ rotatelayoutaxis) ;&
+ incnmaster) ;&
+ incnstack) ;&
+ incrgaps) ;&
+ incrigaps) ;&
+ incrogaps) ;&
+ incrihgaps) ;&
+ incrivgaps) ;&
+ incrohgaps) ;&
+ incrovgaps) ;&
+ movestack) ;&
+ shiftview) ;&
+ shiftviewclients) ;&
+ focusmon) ;&
+ tagmon)
+ signal $1 i $2
+ ;;
+ setcfact) ;&
+ setmfact)
+ signal $1 f $2
+ ;;
+ *)
+ 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
+ signal $1 i $(((oh << 24) + (ov << 16) + (ih << 8) + iv))
+ ;;
+ *)
+ echo "Unknown command ($1) or too many arguments"
+ exit 1
+ ;;
+ esac
+ ;;
+*)
+ echo "Unknown command ($1) or too many arguments"
+ exit 1
+ ;;
+esac
+