dotfiles/xinitrc

39 lines
1.5 KiB
Text
Raw Normal View History

2018-04-03 15:55:41 +02:00
#!/bin/bash
# merge in defaults and keymaps
sysresources=/etc/X11/xinit/.Xresources ; [ -f "$sysresources" ] && xrdb -merge "$sysresources"
sysmodmap=/etc/X11/xinit/.Xmodmap ; [ -f "$sysmodmap" ] && xmodmap "$sysmodmap"
userresources="$HOME/.Xresources" ; [ -f "$userresources" ] && xrdb -merge "$userresources"
usermodmap="$HOME/.config/Xmodmap" ; [ -f "$usermodmap" ] && xmodmap "$usermodmap"
xset b off # don't beep! that's annoying as hell
2018-04-08 22:07:55 +02:00
xset r rate 170 40 # wait 170 ms before repeating, 40 chars/second
2018-04-03 15:55:41 +02:00
export TERMINAL=st
2018-04-03 15:55:41 +02:00
# default desktop environment to start
[[ -z $DE_CHOICE ]] && DE_CHOICE=i3
# allow to very easily choose a desktop environment without changing this file: do e.g. `DE_CHOICE=kde startx` to choose KDE
case "$DE_CHOICE" in
2018-04-08 22:07:55 +02:00
awesome) exec awesome; ;;
2018-04-03 15:55:41 +02:00
xfce) exec startxfce4; ;;
2018-04-08 22:07:55 +02:00
kde) exec startkde; ;;
2018-04-03 15:55:41 +02:00
i3)
XDG_CONFIG_HOME=$HOME/.config
2018-08-21 00:12:32 +02:00
compton --config $XDG_CONFIG_HOME/compton/config &>$HOME/.log/my-i3-desktop/compton.log & # compositor
dunst -config $XDG_CONFIG_HOME/dunst/dunstrc &>$HOME/.log/my-i3-desktop/dunst.log & # notification daemon
redshift -c $XDG_CONFIG_HOME/redshift.config &>$HOME/.log/my-i3-desktop/redshift.log & # colour temperature adjuster
2018-04-03 15:55:41 +02:00
exec i3
;;
# We're not able to print messages to the screen here, so do an exec with the error message and X will complain about it for us
*) exec " DE_CHOICE not recognized: $DE_CHOICE"; ;;
esac
# vim: set noet :