wmii/cmd/wihack.sh
Kris Maglione cb38795511 Several changes:
Much better fullscreen support.
	Better revert support.
	More correct window group support (but... with ICCCM, correct is not possible...)
	"nil" tag is even less special (Important: remove last tagrule.)
	Allow comments (#.*\n) in rules files.
	Color scheme.
	Replaced mind-numbing float placement algorithm.
	Cleanup/prep.
2008-01-19 18:05:50 -05:00

45 lines
764 B
Bash

#!/bin/sh -f
usage() {
echo 1>&2 Usage: \
"$0 [-transient <window>] [-type <window_type>[,...]] [-tags <tags>] <command> [<arg> ...]"
exit 1
}
checkarg='[ ${#@} -gt 0 ] || usage'
export WMII_HACK_TIME=$(date +%s)
while [ ${#@} -gt 0 ]
do
case $1 in
-transient)
shift; eval $checkarg
export WMII_HACK_TRANSIENT=$1
shift;;
-type)
shift; eval $checkarg
export WMII_HACK_TYPE=$1
shift;;
-tags)
shift; eval $checkarg
export WMII_HACK_TAGS=$1
shift;;
-*)
usage;;
*)
break;;
esac
done
eval $checkarg
if [ ! -u "`which $1`" -a ! -g "`which $1`" ]
then
export LD_PRELOAD=libwmii_hack.so
export LD_LIBRARY_PATH="LIBDIR${LD_LIBRARY_PATH:+:}${LD_LIBRARY_PATH}"
else
unset WMII_HACK_TRANSIENT WMII_HACK_TYPE WMII_HACK_TAGS
fi
exec "$@"