dotfiles/xinitrc

40 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-11-04 00:25:44 +01:00
xset r rate 170 60 # delay 170ms, 60 keypresses per second
2018-04-03 15:55:41 +02:00
2018-11-04 00:25:44 +01:00
# fav terminal is xfce4-terminal. I tried out st, but it's way too laggy in its rendering.
export TERMINAL=xfce4-terminal
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
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.conf &>$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 :