-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdot_xprofile
69 lines (58 loc) · 1.82 KB
/
dot_xprofile
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
66
67
68
69
#!/bin/bash
if command -v xrdb >/dev/null; then
xrdb -merge ~/.Xresources
[[ -e ~/.Xresources.local ]] && xrdb -merge ~/.Xresources.local
fi
function pref_order () {
for c in $@; do
if command -v "$c" >/dev/null; then
echo "$c"
return
fi
done
return 1
}
# sane defaults, probably to be overwritten by .xprofile.local
: ${BROWSER:=$(pref_order google-chrome google-chrome-stable firefox epiphany palemoon uzbl-browser netsurf)}
export BROWSER
: ${XTERM:=$(pref_order kitty urxvt rxvt xterm gnome-terminal konsole)}
export XTERM
conditional_start () {
if command -v "$1" >/dev/null; then
pgrep -u $EUID -x "$1" >/dev/null || $@ &
fi
}
conditional_start nm-applet
conditional_start unclutter
conditional_start pasystray
conditional_start blueman-applet
conditional_start ~/.local/bin/low_battery_monitor
conditional_start ~/.local/bin/acpid_client.py
# hopefully, I am eventually able to remove this one day...
if [[ -e ~/.dropbox ]]; then
conditional_start dropbox
fi
if command -v feh >/dev/null; then
feh --bg-fill ~/.local/assets/NovoBlaze2Blur.jpg
else
i3-nagbar -m "Install feh!" &
fi
if [[ -e ~/.xmodmap ]]; then
if command -v xmodmap >/dev/null; then
xmodmap ~/.xmodmap
else
i3-nagbar -m ".xmodmap exists, but xmodmap is not installed!" &
fi
fi
if [[ -z "${SSH_AUTH_SOCK}" ]]; then
eval $(ssh-agent -s -a /run/user/"$(id -u)"/ssh-agent.sock)
fi
export SSH_AUTH_SOCK
if ! [[ -e ~/.nolock ]] && command -v xss-lock >/dev/null; then
# timeout dim time after that
xset s 300 5
xss-lock -n $(pref_order /usr/lib/xsecurelock/dimmer /usr/lib/x86_64-linux-gnu/xsecurelock/dimmer) \
-l -- ~/.local/bin/locker.sh &
fi
~/.local/bin/dockdet
[[ -e ~/.xprofile.local ]] && source ~/.xprofile.local