Blob


1 # $Id: .xinitrc,v 1.5 2020/12/22 08:19:27 cvs Exp $
3 # Suck in global xinitrc files
4 if [ -d /etc/X11/xinit/xinitrc.d ]; then
5 for f in /etc/X11/xinit/xinitrc.d/*; do
6 [ -x "$f" ] && . "$f"
7 done
8 unset f
9 fi
11 [ -f ~/.Xmodmap ] && xmodmap ~/.Xmodmap
13 ## add some nice fonts
14 for m in /usr/local/share/fonts/*; do
15 if [ -d "$m" ]; then
16 xset +fp "$m"
17 fi
18 done
20 HIGHDPI=0
21 xrandr | grep -w connected | grep 2880 > /dev/null
22 if [ $? -eq 0 ]; then
23 # We have a high DPI monitor connected
24 HIGHDPI=1
25 fi
27 export HIGHDPI
30 # HiDPI case
31 if [ $HIGHDPI -eq 1 ]; then
32 _xpath=~/.Xresources
33 if [[ -h ${_xpath} ]]; then
34 rm ${_xpath}
35 ln -s ~/Documents/git/config/.Xresources-high ${_xpath}
36 xrdb -merge ${_xpath}
37 elif [[ ! -e ${_xpath} ]]; then
38 ln -s ~/Documents/git/config/.Xresources-high ${_xpath}
39 xrdb -merge ${_xpath}
40 fi
42 _cpath=~/.i3/config
43 if [[ -h ${_cpath} ]]; then
44 rm ${_cpath}
45 ln -s ${_cpath}.high ${_cpath}
46 fi
48 _apath=~/.i3/autostart
49 if [[ -h ${_apath} ]]; then
50 rm ${_apath}
51 ln -s ${_apath}.high ${_apath}
52 fi
53 else
54 _xpath=~/.Xresources
55 if [[ -h ${_xpath} ]]; then
56 rm ${_xpath}
57 ln -s ~/Documents/git/config/.Xresources ${_xpath}
58 xrdb -merge ${_xpath}
59 elif [[ ! -e ${_xpath} ]]; then
60 ln -s ~/Documents/git/config/.Xresources ${_xpath}
61 xrdb -merge ${_xpath}
62 fi
64 _cpath=~/.i3/config
65 if [[ -h ${_cpath} ]]; then
66 rm ${_cpath}
67 ln -s ${_cpath}.low ${_cpath}
68 fi
70 _apath=~/.i3/autostart
71 if [[ -h ${_apath} ]]; then
72 rm ${_apath}
73 ln -s ${_apath}.low ${_apath}
74 fi
75 fi
77 # Link host specific i3status config
78 _apath=~/.i3status.conf
79 if [[ -h ${_apath} ]]; then
80 rm ${_apath}
81 ln -s ~/Documents/git/config/.i3status.conf.$(hostname -s) ${_apath}
82 fi
84 [[ -e ~/.profile ]] && . ~/.profile &
86 export LC_CTYPE=en_US.UTF-8
87 export GTK_IM_MODULE=xim # without this GTK apps will use their own compose key settings
88 export LESSCHARSET=utf-8 # not strictly necessary, but for when you view Unicode files in less
89 export ENV=$HOME/.kshrc
91 #exec dbus-launch --exit-with-session ssh-agent /home/xhr/Documents/bin/cwm-session
92 exec dbus-launch --exit-with-session ssh-agent i3
93 #exec /usr/local/bin/dbus-launch --exit-with-session /usr/local/bin/i3