xmonad/xmonad-start

34 lines
793 B
Plaintext
Raw Normal View History

2009-05-06 21:19:58 +00:00
#!/bin/sh
XMONAD_DIR=$HOME/.xmonad
# if no user configuration
if [ ! -d $XMONAD_DIR ]; then
# add a desktop friendly config if possible
if [ -r /usr/share/xmonad/xmonad.hs ]; then
mkdir $XMONAD_DIR
cp -p /usr/share/xmonad/xmonad.hs $XMONAD_DIR
else
echo "xmonad-start: install xmonad-config to customize"
fi
# display the manpage
case $DESKTOP_SESSION in
xmonad-gnome) TERM_CMD="gnome-terminal -x" ;;
*) TERM_CMD="xterm -e" ;;
esac
(sleep 5; $TERM_CMD man xmonad) &
else
XMONAD_CUSTOM=$XMONAD_DIR/xmonad-$(uname -i)-linux
if [ -r $XMONAD_DIR/xmonad.hs -a -x $XMONAD_CUSTOM ]; then
if ldd $XMONAD_CUSTOM | grep -q "not found"; then
xmonad --recompile
fi
fi
2009-05-06 21:19:58 +00:00
fi
if [ -r $XMONAD_DIR/session ]; then
sh $XMONAD_DIR/session
fi
xmonad