fluxbox/util/startfluxbox.in

65 lines
1.3 KiB
Text
Raw Permalink Normal View History

2003-09-07 19:51:59 +00:00
#!/bin/sh
command="`basename \"$0\"`"
fluxdir="$HOME/.@pkgprefix@fluxbox@pkgsuffix@"
startup="$fluxdir/startup"
while [ $# -gt 0 ]; do
case "$1" in
-c|--config)
if [ $# -lt 2 ]; then
echo "$command:error, missing argument"
exit 1
fi
shift
startup=$1
;;
-h|--help) cat <<EOF
Usage: $command [-h] [-c startupfile]
EOF
exit
;;
esac
shift
done
if [ -x "$startup" ]; then
exec "$startup"
elif [ -r "$startup" ]; then
exec sh "$startup"
2003-09-07 19:51:59 +00:00
else
if [ ! -d $fluxdir ]; then
mkdir -p "$fluxdir/backgrounds" "$fluxdir/styles" "$fluxdir/pixmaps"
2003-09-07 19:51:59 +00:00
fi
if [ ! -r "$startup" ]; then
( cat << EOF
2008-07-07 03:26:10 +00:00
#!/bin/sh
#
2003-12-06 16:29:21 +00:00
# fluxbox startup-script:
#
# Lines starting with a '#' are ignored.
# Change your keymap:
xmodmap "$HOME/.Xmodmap"
2003-12-06 16:29:21 +00:00
# Applications you want to run with fluxbox.
# MAKE SURE THAT APPS THAT KEEP RUNNING HAVE AN ''&'' AT THE END.
#
# unclutter -idle 2 &
# wmnd &
# wmsmixer -w &
# idesk &
# And last but not least we start fluxbox.
# Because it is the last app you have to run it with ''exec'' before it.
exec @pkgprefix@fluxbox@pkgsuffix@
2003-12-06 16:29:21 +00:00
# or if you want to keep a log:
# exec @pkgprefix@fluxbox@pkgsuffix@ -log "$fluxdir/log"
2003-12-06 16:29:21 +00:00
EOF
) > "$startup"
2003-12-06 16:29:21 +00:00
fi
chmod 644 "$startup"
exec sh "$startup"
2003-09-07 19:51:59 +00:00
fi