44 lines
1.1 KiB
Plaintext
44 lines
1.1 KiB
Plaintext
|
#!/bin/bash
|
||
|
|
||
|
# Straight up bail of we have a special file
|
||
|
if [ -f "$HOME/.skipxinit" ]; then
|
||
|
return
|
||
|
fi
|
||
|
# Nest protection
|
||
|
if [ -n "$FIRESTARTER" ]; then
|
||
|
echo "Firestarter is already running in this session"
|
||
|
exit 50
|
||
|
fi
|
||
|
# Find our terminal
|
||
|
for term in mate-terminal lxterminal xfce4-terminal konsole urxvt xterm; do
|
||
|
if command -v "$term" > /dev/null 2>&1; then
|
||
|
export TERMINAL="$term"
|
||
|
break
|
||
|
fi
|
||
|
done
|
||
|
# Monitor setup
|
||
|
case $(hostname) in
|
||
|
vm-*)
|
||
|
xrandr --output Virtual-1 --mode 1920x1080 --rate 60 --primary
|
||
|
;;
|
||
|
esac
|
||
|
# Wallpaper generation because why not
|
||
|
#if [ -x "$HOME/.wpgen/wpgen" ]; then
|
||
|
# resolutions=($(xrandr -q | grep '*' | awk '{print $1}'))
|
||
|
# for res in ${resolutions[@]}; do
|
||
|
# "$HOME/.wpgen/wpgen" "$res"
|
||
|
# done
|
||
|
#fi
|
||
|
# Session execution
|
||
|
if [ -x "$HOME/.config/conky/gen.sh" ]; then
|
||
|
"$HOME/.config/conky/gen.sh"
|
||
|
fi
|
||
|
if [ -x "$HOME/.firestarter/firestarter" ]; then
|
||
|
export FS_DIEONWM=true
|
||
|
export STARTUP="$HOME/.firestarter/firestarter"
|
||
|
fi
|
||
|
# We'd rather let the system-wide Xsession handle this
|
||
|
if ! [ -f "/etc/X11/Xsession.d/99x11-common_start" ]; then
|
||
|
exec $STARTUP
|
||
|
fi
|