dotfiles/xinitrc
2018-05-29 12:25:21 +02:00

38 lines
1.4 KiB
Bash

#!/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
xset r rate 170 40 # wait 170 before repeating, 40 chars/second
# fav terminal. it's lightweight (always starts instantly) and isn't as peculiar to configure as urxvt (doesn't look as ugly as xterm by default)
export TERMINAL=xfce4-terminal
# 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
awesome) exec awesome; ;;
xfce) exec startxfce4; ;;
kde) exec startkde; ;;
i3)
XDG_CONFIG_HOME=$HOME/.config
compton --config $XDG_CONFIG_HOME/compton/config & # compositor
dunst -config $XDG_CONFIG_HOME/dunst/dunstrc & # notification daemon
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 :