2020-05-24 23:35:30 -05:00
|
|
|
#!/bin/bash
|
|
|
|
|
2020-09-03 18:41:08 -05:00
|
|
|
# Straight up bail of we have a special file
|
|
|
|
if [ -f "$HOME/.skipxinit" ]; then
|
|
|
|
return
|
|
|
|
fi
|
2020-07-21 12:20:28 -05:00
|
|
|
# Nest protection
|
2020-07-08 00:39:39 -05:00
|
|
|
if [ -n "$FIRESTARTER" ]; then
|
|
|
|
echo "Firestarter is already running in this session"
|
|
|
|
exit 50
|
|
|
|
fi
|
2020-07-21 12:20:28 -05:00
|
|
|
# Find our terminal
|
2020-07-08 00:39:39 -05:00
|
|
|
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
|
2020-07-21 12:20:28 -05:00
|
|
|
# Monitor setup
|
|
|
|
case $(hostname) in
|
2020-09-19 07:39:47 -05:00
|
|
|
vm-*)
|
|
|
|
xrandr --output Virtual-1 --mode 1920x1080 --rate 60 --primary
|
|
|
|
;;
|
2020-07-21 12:20:28 -05:00
|
|
|
dsk-cstm-0)
|
|
|
|
xrandr --output DisplayPort-1 --mode 2560x1440 --rate 144 --primary
|
|
|
|
xrandr --output HDMI-A-0 --mode 1920x1080 --rate 60 --pos 2560x360
|
|
|
|
;;
|
|
|
|
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
|
2020-06-29 10:06:21 -05:00
|
|
|
if [ -x "$HOME/.config/conky/gen.sh" ]; then
|
|
|
|
"$HOME/.config/conky/gen.sh"
|
|
|
|
fi
|
2020-05-24 23:35:30 -05:00
|
|
|
if [ -x "$HOME/.firestarter/firestarter" ]; then
|
2020-05-24 23:39:09 -05:00
|
|
|
export FS_DIEONWM=true
|
2020-08-23 19:32:48 -05:00
|
|
|
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
|
2020-05-24 23:35:30 -05:00
|
|
|
fi
|