blob: afc766bfe5207cce34368a327a5f4d161753e2ab (
plain)
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
70
71
72
73
74
75
76
77
78
|
#!/bin/sh
. $HOME/.shenv
# ---- no bell please
xset b off
# ---- keyboard settings
xset r rate 380 25
setxkbmap -option ctrl:nocaps
xmodmap ~/.xmodmaprc
# enable numlock if using USB keyboard
lsusb | grep -q "Chicony Electronics Co., Ltd" \
&& numlockx on
# ---- monitor settings
xset dpms 600
# ---- screen locking
# kill any other lockers that might have snuck in
pkill -u $USER light-locker
pkill -u $USER xscreensaver
# turn over lid switch handling to logind, if needed
if which xfconf-query; then
xfconf-query -c xfce4-power-manager -n \
-p /xfce4-power-manager/logind-handle-lid-switch \
-t bool -s true
fi
# ... and then hook i3lock into logind
if [ -f "$HOME/local/lock.png" ]; then
# note that i3lock needs a file in PNG format. tiling doesn't
# work well; resize image file to monitor dimensions
xss-lock -- i3lock -c 000000 -n --image=$HOME/local/lock.png &
else
xss-lock -- i3lock -c 000000 -n &
fi
# ---- GNOME daemons & GTK
# Have the GNOME keyring daemon cache our GPG key passphrase for no
# more than 20 minutes. Cache time cannot be controlled for SSH keys
gsettings set org.gnome.crypto.cache gpg-cache-ttl 1200
gsettings set org.gnome.crypto.cache gpg-cache-method 'timeout'
eval $(gnome-keyring-daemon --start --components=gpg,pkcs11,secrets,ssh)
export GNOME_KEYRING_CONTROL GNOME_KEYRING_PID GPG_AGENT_INFO SSH_AUTH_SOCK
gnome-settings-daemon &
# ---- brightness keys
xfce4-power-manager &
# ---- clear SSH keys out of gnome-keyring-daemon when idle (per GNOME
# ---- bug #525574 it can't do this itself yet)
pkill -u $USER idlesshclear
idlesshclear &
# ---- audio
if ! pgrep -u $USER pulseaudio; then
pulseaudio &
fi
# ---- startup applications
nitrogen --restore
redshift-gtk & # co-ords from config file
nm-applet &
caffeine-indicator &
|