xmonad/xmonad-start
Jens Petersen ab95445fff xmonad-start: touch user's xmonad.hs if binary has broken shared libs for recompile
This should fix #806624 reported by Erik Streb.
Needed both for upgrades to f16 (dynlink) and to f17 (gmp).
2012-05-24 15:55:00 +09:00

34 lines
816 B
Bash

#!/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-$(arch)-linux
if [ -r $XMONAD_DIR/xmonad.hs -a -x $XMONAD_CUSTOM ]; then
if ldd $XMONAD_DIR/xmonad-$(arch)-linux | grep -q "not found"; then
touch $XMONAD_DIR/xmonad.hs
fi
fi
fi
if [ -r $XMONAD_DIR/session ]; then
sh $XMONAD_DIR/session
fi
xmonad