about summary refs log blame commit diff
path: root/dwmc
blob: 9deaec6e69cde9576a8d6135cd025b86af77cc17 (plain) (tree)







































                                                                                                                                          
#!/usr/bin/env sh

signal() {
	xsetroot -name "dsignal:$*"
}

case $# in
1)
	case $1 in
	setlayout | view | viewall | tagall | togglebar | togglefloating | togglefullscreen | zoom | killclient | quit)
		signal $1
		;;
	*)
		echo "Unknown command or missing one argument."
		exit 1
		;;
	esac
	;;
2)
	case $1 in
	view)
        signal $1 ui $(expr $2 - 1)
		;;
	viewex | toggleviewex | tagex | toggletagex | setlayoutex | focusstack | movestack | cyclelayout | incnmaster | focusmon | tagmon)
        signal $1 i $2
		;;
	setmfact)
		signal $1 f $2
		;;
	*)
		echo "Unknown command or one too many arguments."
		exit 1
		;;
	esac
	;;
*)
	echo "Too many arguments."
	exit 1
	;;
esac