[openbox] can I save the order of dockapps in the slit?
Mads Martin Joergensen
mmj at panther.mmj.dk
Sun Dec 15 04:16:19 EST 2002
On Dec 15, 2002, Jon wrote:
>
> I am quite new to Linux and window managers. I have got a few dockapps
> going that start in ~/.xinitrc. I am wondering whether I can set the
> order in which these apps appear in the slit? All I know is that they
> don't load in the same order they are listed in .xinitrc. I searched for
> this but only found that fluxbox can do it.
A colleague of mine wrote this script I use personally. Maybe something
more generic but similar should be included in the Openbox distribution?
--- begin slit.sh ---
#!/bin/bash
# slit -- Christopher Mahmood <ckm at suse.com>
# creates the slit thing in Blackbox.
# Only only aimed at die-hard windowmaker/afterstep fans, and manual
# compilation of some apps might be needed.
#
# This is the mmj version
if [ ! "$(basename $WINDOWMANAGER)" = "blackbox" ]; then
echo "This only works with blackbox--Please set \$WINDOWMANAGER"
exit 1
fi
declare -a apps
apps[5]="wmweather -s EKOD -metric -mmHg -beaufort"
apps[4]="wmfire -B"
apps[3]="wmcalclock -24"
#apps[2]="asload -withdrawn -shape -u 1"
apps[2]="bbpager -w"
apps[1]="bbmail -w"
num_apps=${#apps[@]}
case "$1" in
start)
while [ $num_apps -gt 0 ]; do
${apps[$num_apps]} &
sleep 1
let "num_apps -= 1"
done
;;
stop)
while [ $num_apps -gt 0 ]; do
killall $(echo ${apps[$num_apps]} | awk '{print $1}') &
let "num_apps -= 1"
done
;;
restart)
$0 stop
$0 start
;;
*)
echo "Usage: $0 {start|stop}"
exit 1
;;
esac
exit 0
--
Mads Martin Jørgensen, http://mmj.dk
"Why make things difficult, when it is possible to make them cryptic
and totally illogic, with just a little bit more effort?"
-- A. P. J.
More information about the openbox
mailing list