-
Notifications
You must be signed in to change notification settings - Fork 5
/
xinitrc
executable file
·65 lines (50 loc) · 1.18 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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
#!/usr/bin/env bash
has() {
local c
for c; do
if ! command -v "$c" &> /dev/null; then
return 1
fi
done
}
is_running() {
pgrep -x "$1" &> /dev/null
}
run_once() {
if has "$1" && ! is_running "$1"; then
"$@" &
fi
}
declare wm="${2:-xterm}"
while sleep 0.1; do
if is_running "$wm"; then
[[ -r $HOME/.Xresources ]] && xrdb -load "$HOME/.Xresources"
xsetroot -cursor_name left_ptr
xset -b
setxkbmap -option 'compose:paus'
xinput set-prop 'pointer:Polo-Leader MANO-603 Touchpad' 'libinput Accel Speed' 0.65
xinput set-prop 'pointer:Polo-Leader MANO-603 Touchpad' 'libinput Tapping Enabled' 1
if [[ ! -v MPD_HOST ]] && has 'mpd'; then
run_once mpd
run_once mpdscribble
fi
if has tmux xmux && [[ "$wm" != *'kde'* ]]; then
xmux
fi
xrandr --output VGA1 --mode 1600x900 --right-of LVDS1
sleep 2
nitrogen --restore
break
fi
done &
if [[ -d /etc/X11/xinit/xinitrc.d ]]; then
for f in /etc/X11/xinit/xinitrc.d/*; do
source "$f"
done
unset f
fi
export DMENU_FONT="Fira Mono-7"
export GTK2_RC_FILES="$HOME/.gtkrc-2.0"
export XDG_CURRENT_DESKTOP=KDE
# export QT_STYLE_OVERRIDE=breeze
exec "$wm"