-
Notifications
You must be signed in to change notification settings - Fork 2
/
xinitrc
executable file
·209 lines (178 loc) · 6.92 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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
#!/bin/bash
if [[ $OSTYPE =~ freebsd ]]; then
xset +fp /usr/local/lib/X11/fonts/100dpi
xset +fp /usr/local/lib/X11/fonts/75dpi
xset +fp /usr/local/lib/X11/fonts/cyrillic
xset +fp /usr/local/lib/X11/fonts/encodings
xset +fp /usr/local/lib/X11/fonts/local
xset +fp /usr/local/lib/X11/fonts/misc
xset +fp /usr/local/lib/X11/fonts/TTF
xset +fp /usr/local/lib/X11/fonts/Type1
xset +fp /usr/local/lib/X11/fonts/util
xset +fp /usr/local/lib/X11/fonts/OTF
xset +fp /usr/local/lib/X11/fonts/URW
xset +fp /usr/local/lib/X11/fonts/bitstream-vera
xset +fp /usr/local/lib/X11/fonts/terminus-font
LOCAL=/local
else
xset +fp /usr/share/fonts/100dpi
xset +fp /usr/share/fonts/75dpi
xset +fp /usr/share/fonts/cyrillic
xset +fp /usr/share/fonts/encodings
xset +fp /usr/share/fonts/local
xset +fp /usr/share/fonts/misc
xset +fp /usr/share/fonts/TTF
xset +fp /usr/share/fonts/Type1
xset +fp /usr/share/fonts/util
LOCAL=
fi
if [[ $HOSTNAME = eadmaka ]]; then
# nvidia
#xrandr --output DVI-0 --right-of DP-I-1 --output DP-0 --rotate left
# nouveau
xrandr --output DP-1 --right-of DVI-I-1 --output DP-1 --rotate left
elif [[ $HOSTNAME = jackshrimp ]]; then
#xrandr --output DVI-D-0 --right-of DVI-I-1 --output DVI-D-0 --rotate left
xrandr --output DVI-D-0 --right-of DVI-I-1
elif [[ $HOSTNAME = skylark ]]; then
xrandr --output DP-0 --right-of DVI-I-1
elif [[ -n "$CHROMEBOOK" ]]; then
xrandr --output HDMI1 --right-of eDPI1
fi
## Source scripts in /etc/X11/xinit/xinitrc.d/
#if [[ -d /etc/X11/xinit/xinitrc.d ]]; then
# for f in /etc/X11/xinit/xinitrc.d/*; do
# [[ -x "$f" ]] && . "$f"
# done
# unset f
#fi
if [[ $HOSTNAME = eadvb ]]; then
#/usr/bin/vmware-user-suid-wrapper &
#/usr/bin/vmware-user &
/usr/bin/VBoxClient --clipboard
/usr/bin/VBoxClient --autoresize
fi
xhost +localhost
xrdb -load $HOME/.Xdefaults
xmodmap $HOME/.Xmodmap
#if [[ $OSTYPE =~ freebsd ]]; then
# xmodmap -e "keycode 113 = Super_L" # reassign Alt_R to Super_L
#elif [[ -n "$CHROMEBOOK" ]]; then
# xmodmap -e "keycode 133 = Control_L" # reassign Search to Control_L
# xmodmap -e "remove mod4 = Control_L" # make sure X keeps it out of the mod4 group
# xmodmap -e "add Control = Control_L" # add the new Control_L to the control group
# xmodmap -e "keycode 108 = Super_L" # reassign Alt_R to Super_L
#else
# xmodmap -e "keycode 108 = Super_L" # reassign Alt_R to Super_L
#fi
#xmodmap -e "remove mod1 = Super_L" # make sure X keeps it out of the mod1 group
if [[ -n "$CHROMEBOOK" ]]; then
xmodmap -e "keycode 133 = Control_L" # reassign Search to Control_L
xmodmap -e "remove mod4 = Control_L" # make sure X keeps it out of the mod4 group
xmodmap -e "add Control = Control_L" # add the new Control_L to the control group
xmodmap -e "keycode 108 = Super_L" # reassign Alt_R to Super_L
synclient TapButton1=1 TapButton2=3 TapButton3=2
fi
if [[ $HOSTNAME = eadmaka || $HOSTNAME = skylark || $HOSTNAME = jackshrimp || -n $CHROMEBOOK ]]; then
#feh --bg-tile $HOME/kole_evo_1920x1080.png
feh --bg-scale $HOME/chromeos_landscape1.jpg
fi
#$HOME/bin/mpc_osd_py &
#if [[ $HOSTNAME = skylark ]]; then
# [[ -x /usr/bin/pidgin ]] && pidgin &
#fi
#[[ -x /usr${LOCAL}/bin/xbindkeys ]] && xbindkeys
#[[ -x /usr${LOCAL}/bin/xautolock && -x /usr${LOCAL}/bin/slock ]] && \
# xautolock -resetsaver -time 10 -locker slock &
[[ -x /usr${LOCAL}/bin/xautolock && -x ${HOME}/.bin/screen_lock ]] && \
xautolock -resetsaver -time 10 -locker ${HOME}/.bin/screen_lock &
#[[ -x /usr${LOCAL}/bin/urxvtd ]] && urxvtd -f -o
xset r rate 400
xsetroot -cursor_name left_ptr
if [[ $HOSTNAME = jackshrimp ]]; then
# tweaks for my Anker gaming mouse
xinput --set-prop 11 "Device Accel Constant Deceleration" 2
xinput --set-prop 11 "Device Accel Adaptive Deceleration" 3
xset m 1 50
elif [[ $HOSTNAME = skylark ]]; then
# tweaks for my Anker gaming mouse
xinput --set-prop 8 "Device Accel Constant Deceleration" 2
xinput --set-prop 8 "Device Accel Adaptive Deceleration" 3
xset m 1 50
elif [[ -n "$CHROMEBOOK" ]]; then
# trackpad configured in /etc/X11/xorg.conf.d/50-synaptics.conf
xset m 1 50
else
xset m 2/1 50
fi
[[ -x /usr${LOCAL}/bin/dunst ]] && dunst -config $HOME/.dunstrc &
# fix Java wackiness
[[ -x /usr${LOCAL}/bin/wmname ]] && wmname LG3D
export _JAVA_AWT_WM_NONREPARENTING=1
#if [[ $HOSTNAME = eadmaka || $HOSTNAME = skylark ]]; then
# autossh -M 20000 -f -N -D 9999 -L 127.0.0.1:9998:127.0.0.1:443 -L 9993:imap.gmail.com:993 [email protected]
#elif [[ -n "$CHROMEBOOK" || $HOSTNAME = jackshrimp ]]; then
# autossh -M 20000 -f -N -D 9999 -L 127.0.0.1:9998:127.0.0.1:443 [email protected]
#fi
#
# "autossh" systemd service on Arch Linux
# /etc/systemd/system/multi-user.target.wants/autossh.service
# ----------
# [Unit]
# Description=AutoSSH
# After=network.target
#
# [Service]
# Environment="AUTOSSH_GATETIME=0"
# ExecStart=/usr/bin/autossh -M 20000 -N -D 9999 -L 127.0.0.1:9998:127.0.0.1:443 -L 127.0.0.1:9993:imap.gmail.com:993 -o TCPKeepAlive=yes [email protected]
# User=edavis
#
# [Install]
# WantedBy=multi-user.target
# ----------
[[ -x /usr${LOCAL}/bin/dropbox ]] && dropbox start
#if [[ $HOSTNAME = eadmaka || $HOSTNAME = skylark ]]; then
#
# if [[ -x $HOME/src/gcalcli/gcalcli ]]; then
# while true
# do
# tsocks $HOME/src/gcalcli/gcalcli remind &> /tmp/gcalcli.txt
# sleep 300
# done &
# fi
#
#fi
#conky -c $HOME/.conkyrc &
#conky -c $HOME/.conkyrc.gcal &
#( conky -c $HOME/.conkyrc.dzen | dzen2 -p -e "button3" -ta r -fn xft:terminus:bold:size=12 ) &
#exec startkde # /facepalm o.O
#exec gnome-session # /facepalm o.O
#exec startxfce4 # better than kde and gnome...
#exec startlxde # phfffft
#exec blackbox # old and true
#exec startfluxbox # blackbox with gizmos
#exec openbox-session # Why can't I move my config out from under XDG!?!?
#exec pekwm # lean and mean (pretty good)
# xcompmgr
if [[ $HOSTNAME = jackshrimp || $HOSTNAME = skylark || -n "$CHROMEBOOK" ]]; then
[[ -x /usr${LOCAL}/bin/compton ]] && compton --config $HOME/.comptonrc &
fi
#exec ratpoison # Lots of good times, but the love affair evaporated...
#exec musca # I love you, I hate you for not supporting multiple monitors!
#exec awesome # Awesome => You suck SO bad!
#exec xmonad # xmonad, you rule... but Haskell? Really!?
#exec wmfs -C ~/.wmfsrc # Yikes, bar happy and a bit over-engineered no?
#exec herbstluftwm --autostart ~/.herbstluftwm # Love it... FU for no floating layer!
#sxhkd -c $HOME/.sxhkdrc &
#exec bspwm -c $HOME/.bspwmrc # WTF, hate the new abstract node direction...
exec i3 -V > ~/.i3/i3log 2>&1 # Big <3 !
# Falling back to DWM...
while true
do
UPTIME=`uptime | sed 's/.* \([0-9\.]*\), .*/\1/'`
DATE=`date +"%a %m/%d %H:%M"`
xsetroot -name "$DATE :: $UPTIME"
sleep 10
done &
#while true; do dwm &> $HOME/dwm.err; done
exec dwm &> $HOME/dwm.err