]> git.siccegge.de Git - dotfiles/herbstluftwm.git/blob - autostart
Semantics-preserving cleanup
[dotfiles/herbstluftwm.git] / autostart
1 #!/bin/bash
2
3 PATH=${HOME}/bin:$PATH
4 VISUAL="emacsclient -c -a ''"
5
6 export PATH
7 export VISUAL
8
9 hc() {
10 herbstclient "$@"
11 }
12
13 spawn_with_rules() {(
14 herbstclient rule once maxage=10 "${RULES[@]}"
15 exec "$@"
16 ) &
17 }
18
19 Mod=Mod4
20
21 # tags
22 hc rename default 1 || true
23 for i in {0..9} ; do
24 hc add "$i"
25 hc keybind "$Mod-$i" use "$i"
26 hc keybind "$Mod-Shift-$i" move "$i"
27 done
28 hc add scratchpad
29
30 case "$(hostname)" in
31 hepworth)
32 xrandr --output VGA-0 --auto
33 xrandr --output HDMI-0 --left-of VGA-0 --auto
34 hc detect_monitors
35 hc pad 1 16 0 0 0
36 ;;
37 mitoraj)
38 hc pad 0 16 0 0 0
39 ;;
40 esac
41
42 urxvtd -q -o -f
43 compton &!
44 redshift -l 49.598:11.003 &!
45 (sleep 5 ; lxpanel) &!
46
47 hc setenv PATH $PATH
48 hc setenv VDPAU_DRIVER vdpau
49
50 source .config/herbstluftwm/wallpaper.sh
51 set_wallpaper
52
53 # keybindings
54 hc keybind $Mod-q quit
55 hc keybind $Mod-Shift-r reload
56 hc keybind $Mod-Shift-c close
57 hc keybind $Mod-Return spawn urxvtcd
58
59 hc keybind $Mod-p spawn dmenu_run
60 hc keybind $Mod-u spawn /home/christoph/bin/utf8select
61 hc keybind $Mod-w spawn /home/christoph/bin/windowselect
62 hc keybind $Mod-n spawn /home/christoph/bin/q3terminal
63 hc keybind $Mod-x spawn i3lock --color 000000 -d
64 hc keybind $Mod-t spawn ncmpcpp toggle
65 hc keybind $Mod-y spawn /usr/share/doc/pass/examples/dmenu/passmenu --type
66
67 hc keybind XF86AudioPlay spawn mpc toggle
68
69 # layouting
70 hc keybind $Mod-r remove
71 hc keybind $Mod-space cycle_layout 1
72 hc keybind $Mod-i split vertical 0.5
73 hc keybind $Mod-o split horizontal 0.5
74 hc keybind $Mod-s floating toggle
75 hc keybind $Mod-f fullscreen toggle
76
77 # resizing
78 RESIZESTEP=0.025
79 hc keybind $Mod-Control-Left resize left +$RESIZESTEP
80 hc keybind $Mod-Control-Down resize down +$RESIZESTEP
81 hc keybind $Mod-Control-Up resize up +$RESIZESTEP
82 hc keybind $Mod-Control-Right resize right +$RESIZESTEP
83
84 # mouse
85 hc mousebind $Mod-Button1 move
86 hc mousebind $Mod-Button2 resize
87 hc mousebind $Mod-Button3 zoom
88
89 # focus
90 hc keybind $Mod-BackSpace cycle_monitor
91 hc keybind $Mod-Tab cycle_all +1
92 hc keybind $Mod-Shift-Tab cycle_all -1
93 hc keybind $Mod-c cycle
94 hc keybind $Mod-Left focus left
95 hc keybind $Mod-Down focus down
96 hc keybind $Mod-Up focus up
97 hc keybind $Mod-Right focus right
98 hc keybind $Mod-Shift-Left shift left
99 hc keybind $Mod-Shift-Down shift down
100 hc keybind $Mod-Shift-Up shift up
101 hc keybind $Mod-Shift-Right shift right
102 hc keybind XF86AudioRaiseVolume spawn mpc volume +3
103 hc keybind XF86AudioLowerVolume spawn mpc volume -3
104 hc keybind XF86AudioMute spawn mpc toggle
105
106 # colors
107 hc set frame_border_active_color '#222222'
108 hc set frame_border_normal_color '#101010'
109 hc set frame_bg_normal_color '#565656'
110 hc set frame_bg_active_color '#345F0C'
111 hc set frame_border_width 1
112 hc set window_border_width 3
113 hc set window_border_inner_width 1
114 hc set window_border_normal_color '#454545'
115 hc set window_border_active_color '#9fbc00'
116 hc set always_show_frame 1
117 hc set frame_gap 4
118 hc set frame_bg_transparent 1
119
120 hc rule instance=Dialog class=Iceweasel focus=on
121
122 hc rule windowtype~'_NET_WM_WINDOW_TYPE_(DIALOG|UTILITY|SPLASH)' pseudotile=on
123 hc rule windowtype='_NET_WM_WINDOW_TYPE_DIALOG' focus=on
124 hc rule windowtype~'_NET_WM_WINDOW_TYPE_(NOTIFICATION|DOCK)' manage=off
125
126 hc rule class=Pinentry focus=on pseudotile=on
127
128 xfsettingsd &!
129
130 source .config/herbstluftwm/wallpaper.sh
131 set_wallpaper
132
133 RULES=( instance=ncmpcpp tag=scratchpad focus=off )
134 spawn_with_rules urxvtcd -name ncmpcpp -e ncmpcpp