2009-05-06 21:19:58 +00:00
|
|
|
#!/bin/sh
|
|
|
|
|
2012-05-24 06:55:00 +00:00
|
|
|
XMONAD_DIR=$HOME/.xmonad
|
|
|
|
|
2011-05-17 09:19:12 +00:00
|
|
|
# if no user configuration
|
2012-05-24 06:55:00 +00:00
|
|
|
if [ ! -d $XMONAD_DIR ]; then
|
2011-12-03 05:45:18 +00:00
|
|
|
# add a desktop friendly config if possible
|
|
|
|
if [ -r /usr/share/xmonad/xmonad.hs ]; then
|
2012-05-24 06:55:00 +00:00
|
|
|
mkdir $XMONAD_DIR
|
|
|
|
cp -p /usr/share/xmonad/xmonad.hs $XMONAD_DIR
|
2011-12-03 05:45:18 +00:00
|
|
|
else
|
|
|
|
echo "xmonad-start: install xmonad-config to customize"
|
2011-05-12 09:53:28 +00:00
|
|
|
fi
|
2012-02-22 09:45:13 +00:00
|
|
|
# display the manpage
|
|
|
|
case $DESKTOP_SESSION in
|
|
|
|
xmonad-gnome) TERM_CMD="gnome-terminal -x" ;;
|
|
|
|
*) TERM_CMD="xterm -e" ;;
|
|
|
|
esac
|
2012-03-23 06:39:11 +00:00
|
|
|
(sleep 5; $TERM_CMD man xmonad) &
|
2012-05-24 06:55:00 +00:00
|
|
|
else
|
2012-05-29 00:49:36 +00:00
|
|
|
XMONAD_CUSTOM=$XMONAD_DIR/xmonad-$(uname -i)-linux
|
2012-05-24 06:55:00 +00:00
|
|
|
if [ -r $XMONAD_DIR/xmonad.hs -a -x $XMONAD_CUSTOM ]; then
|
2012-05-31 04:59:57 +00:00
|
|
|
if ldd $XMONAD_CUSTOM | grep -q "not found"; then
|
2012-05-29 00:49:36 +00:00
|
|
|
xmonad --recompile
|
2012-05-24 06:55:00 +00:00
|
|
|
fi
|
|
|
|
fi
|
2009-05-06 21:19:58 +00:00
|
|
|
fi
|
|
|
|
|
2012-05-24 06:55:00 +00:00
|
|
|
if [ -r $XMONAD_DIR/session ]; then
|
|
|
|
sh $XMONAD_DIR/session
|
2011-05-17 09:19:12 +00:00
|
|
|
fi
|
|
|
|
|
2011-05-12 09:53:28 +00:00
|
|
|
xmonad
|