-
Notifications
You must be signed in to change notification settings - Fork 0
/
.xinitrc-openbsd
115 lines (97 loc) · 2.68 KB
/
.xinitrc-openbsd
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
# $Id: .xinitrc,v 1.5 2020/12/22 08:19:27 cvs Exp $
# Enable notification pipe for xnotify
XNOTIFY_FIFO="$HOME/.cache/xnotify$DISPLAY.fifo"
export XNOTIFY_FIFO
rm -f $XNOTIFY_FIFO
mkfifo $XNOTIFY_FIFO
xnotify -s 5 0<>$XNOTIFY_FIFO &
# Suck in global xinitrc files
if [ -d /etc/X11/xinit/xinitrc.d ]; then
for f in /etc/X11/xinit/xinitrc.d/*; do
[ -x "$f" ] && . "$f"
done
unset f
fi
[ -f ~/.Xmodmap ] && xmodmap ~/.Xmodmap
## add some nice fonts
for m in /usr/local/share/fonts/*; do
if [ -d "$m" ]; then
xset +fp "$m"
fi
done
if [ -f "$HOME/.ssh/special/vmm" ]; then
ssh-add "$HOME/.ssh/special/vmm"
fi
HIGHDPI=0
xrandr | grep -w connected | egrep "(2880|3840)" > /dev/null
if [ $? -eq 0 ]; then
# We have a high DPI monitor connected
HIGHDPI=1
fi
export HIGHDPI
# HiDPI case
if [ $HIGHDPI -eq 1 ]; then
_xpath=~/.Xresources
if [[ -h ${_xpath} ]]; then
rm ${_xpath}
ln -s ~/Documents/git/config/.Xresources-high ${_xpath}
xrdb -merge ${_xpath}
elif [[ ! -e ${_xpath} ]]; then
ln -s ~/Documents/git/config/.Xresources-high ${_xpath}
xrdb -merge ${_xpath}
fi
_cpath=~/.i3/config
if [[ -h ${_cpath} ]]; then
rm ${_cpath}
ln -s ${_cpath}.high ${_cpath}
fi
_apath=~/.i3/autostart
if [[ -h ${_apath} ]]; then
rm ${_apath}
ln -s ${_apath}.high ${_apath}
fi
else
_xpath=~/.Xresources
if [[ -h ${_xpath} ]]; then
rm ${_xpath}
ln -s ~/Documents/git/config/.Xresources ${_xpath}
xrdb -merge ${_xpath}
elif [[ ! -e ${_xpath} ]]; then
ln -s ~/Documents/git/config/.Xresources ${_xpath}
xrdb -merge ${_xpath}
fi
_cpath=~/.i3/config
if [[ -h ${_cpath} ]]; then
rm ${_cpath}
ln -s ${_cpath}.low ${_cpath}
fi
_apath=~/.i3/autostart
if [[ -h ${_apath} ]]; then
rm ${_apath}
ln -s ${_apath}.low ${_apath}
fi
fi
# Link host specific i3status config
_apath=~/.i3status.conf
if [[ -h ${_apath} ]]; then
rm ${_apath}
ln -s ~/Documents/git/config/.i3status.conf.$(hostname -s) ${_apath}
fi
[[ -e ~/.profile ]] && . ~/.profile &
export LC_CTYPE=en_US.UTF-8
export GTK_IM_MODULE=xim # without this GTK apps will use their own compose key settings
export LESSCHARSET=utf-8 # not strictly necessary, but for when you view Unicode files in less
export ENV=$HOME/.kshrc
# Start batterymoitor
exec ~/Documents/bin/batterymonitor &
# Sync X clipboard buffers
exec autocutsel -fork &
# sct - Redshift clone
exec /usr/local/bin/ctempd 5500 &
# xbattmon on the bottom
exec xbattmon -p bottom -t 2 &
# Start xautolock
exec xidle -program "/usr/X11R6/bin/xlock +description -bg Gray19" &
#exec dbus-launch --exit-with-session ssh-agent /home/xhr/Documents/bin/cwm-session
exec dbus-launch --exit-with-session ssh-agent i3
#exec /usr/local/bin/dbus-launch --exit-with-session /usr/local/bin/i3