-
Notifications
You must be signed in to change notification settings - Fork 4
/
xinitrc
42 lines (32 loc) · 1.26 KB
/
xinitrc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
#!/bin/bash
# TODO: consider sourcing the scripts in /etc/X11/xinit/xinitrc.d/ like
# /etc/X11/xinit/xinitrc does.
# Merge X resource files below `~/.xresources/`.
if [[ -d ~/.xresources ]]; then
for f in ~/.xresources/*; do
[[ -f $f ]] && xrdb -merge "$f"
done
fi
[[ -f ~/dotfiles/misc/xmodmaprc ]] && xmodmap ~/dotfiles/misc/xmodmaprc
xset -b +fp /usr/local/share/fonts
xbindkeys
# Use Control as another Escape key without breaking its normal modifier key
# functionality. Use the Shift keys to enter parentheses.
xcape -e 'Control_L=Escape;Shift_L=Shift_L|9;Shift_R=Shift_L|0'
# Auto-hide the mouse cursor. See <https://github.com/Airblader/unclutter-xfixes>.
unclutter --jitter 1 --ignore-buttons 4,5,6,7 --start-hidden --fork
# Reduce the autorepeat delay. The default is 660 (milliseconds).
xset r rate 250
# Start the dunst(1) notification daemon.
dunst &
case $1 in
# The default is i3: start it when $1 is empty.
i3 | '') exec i3;;
xmonad) xsetroot -cursor_name left_ptr
exec xmonad;;
# I didn't realize this was possible. Not very useful for Firefox but [maybe for
# graphical games](https://wiki.archlinux.org/title/Xinit).
firefox) exec ${FIREFOX:-firefox-esr};;
# Try to start whatever $1 is.
*) exec "$1";;
esac