]> git.friedersdorff.com Git - max/dotfiles.git/blob - X/.xinitrc
Remove old hostnames from conf files
[max/dotfiles.git] / X / .xinitrc
1 #!/bin/bash
2 #
3 # ~/.xinitrc
4 #
5 # Executed by startx (run your window manager from here)
6
7
8 if [ -d /etc/X11/xinit/xinitrc.d ]; then
9   for f in /etc/X11/xinit/xinitrc.d/*; do
10     [ -x "$f" ] && . "$f"
11   done
12   unset f
13 fi
14
15
16 # Load .Xresources
17 xrdb -merge ~/.Xresources &> /dev/null
18 if [ -f ~/.Xresources.$HOSTNAME ]; then
19   xrdb -merge ~/.Xresources.$HOSTNAME &> /dev/null
20 fi
21
22 # Set keyboard layout
23 case $HOSTNAME in
24     platinum)
25         setxkbmap -variant colemak gb
26         xmodmap -e "keycode 66 = Control_L Control_L Control_L Control_L"
27         xmodmap -e "keycode 135 = Control_R Control_R Control_R Control_R"
28         xmodmap -e "add Control = Control_L Control_R"
29         ;;
30     magnesium)
31         setxkbmap -variant colemak us
32         xmodmap -e "keycode 66 = Control_L Control_L Control_L Control_L"
33         xmodmap -e "keycode 135 = Control_R Control_R Control_R Control_R"
34         xmodmap -e "add Control = Control_L Control_R"
35         ;;
36     *)
37         ;;
38 esac
39
40 # Set screen layout
41 case $HOSTNAME in
42   magnesium)
43     xrandr --output VGA1 --right-of HDMI2
44     ;;
45   *)
46     ;;
47 esac
48
49 # Set java font option
50 export _JAVA_OPTIONS="-Dawt.useSystemAAFontSettings=on"
51
52 feh --bg-scale ~/Pictures/background.jpg&
53
54 /usr/lib64/xfce4/notifyd/xfce4-notifyd&
55
56 xset -b
57
58 #if ! pgrep -x -u "${USER}" gpg-agent>/dev/null 2>&1; then
59 #    eval $(gpg-agent --daemon \
60   #                  --use-standard-socket \
61   #                  --write-env-file "${HOME}/.gpg-agent-info")
62 #fi
63 #
64 #gpg-connect-agent updatestartuptty /bye >/dev/null
65
66 # Battery monitoring
67 case $HOSTNAME in
68         platinum)
69                 ~/.local/bin/bat_mgt.sh&
70                 ;;
71         *)
72                 ;;
73 esac
74
75 cat ~/.ratpoisonrc.base ~/.ratpoisonrc.$HOSTNAME > ~/.ratpoisonrc
76
77 # run xcreensaver
78 if [ -x $(which xscreensaver) ]; then
79         xscreensaver&
80 fi
81
82 # configure i3
83
84 if [ -f ~/.config/i3/config.base ]; then
85   cat ~/.config/i3/config.base ~/.config/i3/config.${HOSTNAME} > ~/.config/i3/config
86 fi
87
88 case $HOSTNAME in
89         magnesium|platinum|plutonium)
90           exec i3
91           ;;
92         *)
93           exec ratpoison
94           ;;
95 esac