fix new battery plugin to work better with multiple batteries present
[wmiirc-lua.git] / src / wmii-lua.in
blobb0e5bf16bd13cb867afe2ffe10b92056a2f5184b
1 #!/bin/sh
3 # Copyright (c) 2007, Bart Trojanowski <bart@jukie.net>
5 # This script launches the wmii window manager with the wmiirc.lua script.
7 # we will look for wmiirc in these directories
8 POSSIBLE_WMIIRC="
9 %HOME_WMII%/wmiirc.lua
10 %HOME_WMII%/wmiirc
11 %RC_DIR%/wmiirc.lua
12 %RC_DIR%/wmiirc
15 # try to find the best wmiirc written in lua
16 WMIIRC=
17 for wmiirc in $(eval echo ${POSSIBLE_WMIIRC}) ; do
18 if ( test -r "${wmiirc}" ) && ( head -n1 "${wmiirc}" | grep -q lua ) ; then
19 exec wmii -r "${wmiirc}"
21 done
23 # default to the base one
24 exec wmii