mirror of
https://github.com/bakkeby/dwm-flexipatch
synced 2024-11-16 21:28:03 +00:00
130 lines
2.0 KiB
Bash
Executable File
130 lines
2.0 KiB
Bash
Executable File
#!/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
|