]> git.siccegge.de Git - dotfiles/herbstluftwm.git/blob - autostart
explicitely use system passmenu
[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 function 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 # layouting
68 hc keybind $Mod-r remove
69 hc keybind $Mod-space cycle_layout 1
70 hc keybind $Mod-i split vertical 0.5
71 hc keybind $Mod-o split horizontal 0.5
72 hc keybind $Mod-s floating toggle
73 hc keybind $Mod-f fullscreen toggle
74
75 # resizing
76 RESIZESTEP=0.025
77 hc keybind $Mod-Control-Left resize left +$RESIZESTEP
78 hc keybind $Mod-Control-Down resize down +$RESIZESTEP
79 hc keybind $Mod-Control-Up resize up +$RESIZESTEP
80 hc keybind $Mod-Control-Right resize right +$RESIZESTEP
81
82 # mouse
83 hc mousebind $Mod-Button1 move
84 hc mousebind $Mod-Button2 resize
85 hc mousebind $Mod-Button3 zoom
86
87 # focus
88 hc keybind $Mod-BackSpace cycle_monitor
89 hc keybind $Mod-Tab cycle_all +1
90 hc keybind $Mod-Shift-Tab cycle_all -1
91 hc keybind $Mod-c cycle
92 hc keybind $Mod-Left focus left
93 hc keybind $Mod-Down focus down
94 hc keybind $Mod-Up focus up
95 hc keybind $Mod-Right focus right
96 hc keybind $Mod-Shift-Left shift left
97 hc keybind $Mod-Shift-Down shift down
98 hc keybind $Mod-Shift-Up shift up
99 hc keybind $Mod-Shift-Right shift right
100 hc keybind XF86AudioRaiseVolume spawn mpc volume +3
101 hc keybind XF86AudioLowerVolume spawn mpc volume -3
102 hc keybind XF86AudioMute spawn mpc toggle
103
104
105 # colors
106 hc set frame_border_active_color '#222222'
107 hc set frame_border_normal_color '#101010'
108 hc set frame_bg_normal_color '#565656'
109 hc set frame_bg_active_color '#345F0C'
110 hc set frame_border_width 1
111 hc set window_border_width 3
112 hc set window_border_inner_width 1
113 hc set window_border_normal_color '#454545'
114 hc set window_border_active_color '#9fbc00'
115 hc set always_show_frame 1
116 hc set frame_gap 4
117 hc set frame_bg_transparent 1
118
119 hc rule instance=Dialog class=Iceweasel focus=on
120
121 hc rule windowtype~'_NET_WM_WINDOW_TYPE_(DIALOG|UTILITY|SPLASH)' pseudotile=on
122 hc rule windowtype='_NET_WM_WINDOW_TYPE_DIALOG' focus=on
123 hc rule windowtype~'_NET_WM_WINDOW_TYPE_(NOTIFICATION|DOCK)' manage=off
124
125 hc rule class=Pinentry focus=on pseudotile=on
126
127 xfsettingsd &!
128
129 source .config/herbstluftwm/wallpaper.sh
130 set_wallpaper
131
132 RULES=( instance=ncmpcpp tag=scratchpad focus=off )
133 spawn_with_rules urxvtcd -name ncmpcpp -e ncmpcpp