* .local/bin/startup-progs: Fix merging X reources files.
[~bandali/configs] / .config / i3 / config
CommitLineData
17d2cfa0
AB
1exec --no-startup-id ~/.local/bin/startup-progs
2
3# super
4set $mod Mod4
5# alt
6set $mod2 Mod1
7# hyper
8set $mod3 Mod3
9
10# window title and bar font (unless specified differently in 'bar {}'
29b4e620
AB
11#font pango:Source Code Pro 9.5
12font pango:Source Code Pro Medium 10.5
8060c968
AB
13# font -misc-fixed-medium-r-normal--13-120-75-75-c-70-iso10646-1
14# font -misc-fixed-medium-r-semicondensed--13-120-75-75-c-60-iso10646-1
17d2cfa0
AB
15
16# for dragging floating windows with mouse
17floating_modifier $mod
18
19# default tabbed
20workspace_layout tabbed
21
22# terminal
08b0fb0a
AB
23bindsym $mod+Return exec xterm
24bindsym $mod+Shift+Return exec xterm -name floating
25for_window [class="XTerm" instance="floating"] floating enable
17d2cfa0
AB
26
27# kill focused window (not necessarily its application)
28bindsym $mod+Shift+w kill
29# kill an application
30#bindsym --release $mod+Shift+x exec xkill
31
4c4b967a 32# launcher and pass
29b4e620
AB
33bindsym $mod+space exec dmenu_run -fn 'Source Code Pro Medium-10.5'
34bindsym $mod+backslash exec passmenu --type -fn 'Source Code Pro Medium-10.5'
17d2cfa0
AB
35
36# brightness
4c4b967a
AB
37bindsym $mod+apostrophe exec dmenu-light # brightness chooser
38bindsym XF86MonBrightnessUp exec light -A 5 # increase brightness
39bindsym XF86MonBrightnessDown exec light -U 5 # decrease brightness
17d2cfa0
AB
40
41# volume
4c4b967a 42bindsym $mod+semicolon exec dmenu-pamixer # volume chooser
17d2cfa0
AB
43bindsym XF86AudioRaiseVolume exec pamixer --allow-boost --increase 5
44bindsym XF86AudioLowerVolume exec pamixer --allow-boost --decrease 5
45bindsym XF86AudioMute exec pamixer --toggle-mute
46bindsym XF86AudioMicMute exec pactl set-source-mute 1 toggle
47
48# window focus
49bindsym $mod+h focus left
50bindsym $mod+j focus down
51bindsym $mod+k focus up
52bindsym $mod+l focus right
53bindsym $mod+Left focus left
54bindsym $mod+Down focus down
55bindsym $mod+Up focus up
56bindsym $mod+Right focus right
57
58# window move
59bindsym $mod+Shift+h move left
60bindsym $mod+Shift+j move down
61bindsym $mod+Shift+k move up
62bindsym $mod+Shift+l move right
63bindsym $mod+Shift+Left move left
64bindsym $mod+Shift+Down move down
65bindsym $mod+Shift+Up move up
66bindsym $mod+Shift+Right move right
67
68# horizontal and vertical orientation
69bindsym $mod+shift+backslash split h
70bindsym $mod+minus split v
71
72# enter fullscreen mode for the focused container
73bindsym $mod+f fullscreen toggle
74
75# change container layout (stacked, tabbed, toggle split)
76bindsym $mod+s layout stacking
77bindsym $mod+w layout tabbed
78bindsym $mod+e layout toggle split
79
80# toggle tiling / floating
81bindsym $mod+Shift+f floating toggle
230f7fe8 82bindsym $mod+period floating toggle
17d2cfa0
AB
83# toggle tiling / floating focus
84bindsym $mod+grave focus mode_toggle
230f7fe8 85bindsym $mod+comma focus mode_toggle
17d2cfa0
AB
86
87# toggle sticky
88bindsym $mod+shift+s sticky toggle
89
90# focus parent / child
91bindsym $mod+a focus parent
92bindsym $mod+Shift+a focus child
93
94# switch to workspace
95bindsym $mod+1 workspace 1
96bindsym $mod+2 workspace 2
97bindsym $mod+3 workspace 3
98bindsym $mod+4 workspace 4
99bindsym $mod+5 workspace 5
100bindsym $mod+6 workspace 6
101bindsym $mod+7 workspace 7
102bindsym $mod+8 workspace 8
103bindsym $mod+9 workspace 9
104bindsym $mod+0 workspace 10
105bindsym $mod+bracketleft workspace prev
106bindsym $mod+bracketright workspace next
107
108# move focused container to workspace
109bindsym $mod+Shift+1 move container to workspace 1
110bindsym $mod+Shift+2 move container to workspace 2
111bindsym $mod+Shift+3 move container to workspace 3
112bindsym $mod+Shift+4 move container to workspace 4
113bindsym $mod+Shift+5 move container to workspace 5
114bindsym $mod+Shift+6 move container to workspace 6
115bindsym $mod+Shift+7 move container to workspace 7
116bindsym $mod+Shift+8 move container to workspace 8
117bindsym $mod+Shift+9 move container to workspace 9
118bindsym $mod+Shift+0 move container to workspace 10
119bindsym $mod+Shift+bracketleft move container to workspace prev
120bindsym $mod+Shift+bracketright move container to workspace next
121
122# bspwm-esque workspace switch and container move
123bindsym $mod2+bracketleft exec b-ws-util i3 switch prev
124bindsym $mod2+bracketright exec b-ws-util i3 switch next
125bindsym $mod2+Shift+bracketleft exec b-ws-util i3 move prev follow
126bindsym $mod2+Shift+bracketright exec b-ws-util i3 move next follow
127
128set $mode_system System (l)ock | (e)xit i3 | (s)uspend | (h)ibernate | (r)eboot | (S)hutdown
129mode "$mode_system" {
130 bindsym l exec i3lock, mode "default"
131 bindsym e exec i3-msg exit, mode "default"
132 bindsym s exec systemctl suspend, mode "default"
133 bindsym h exec systemctl hibernate, mode "default"
134 bindsym r exec systemctl reboot, mode "default"
135 bindsym Shift+s exec systemctl poweroff -i, mode "default"
136
137 bindsym Return mode "default"
138 bindsym Escape mode "default"
139 bindsym q mode "default"
140}
141
142bindsym $mod+Shift+c reload
143bindsym $mod+Shift+r restart
144bindsym $mod+Shift+e mode "$mode_system"
145
146# resize window (you can also use the mouse for that)
147mode "resize" {
148 # These bindings trigger as soon as you enter the resize mode
149
150 # Pressing left will shrink the window’s width.
151 # Pressing right will grow the window’s width.
152 # Pressing up will shrink the window’s height.
153 # Pressing down will grow the window’s height.
154 bindsym j resize shrink width 10 px or 10 ppt
155 bindsym k resize grow height 10 px or 10 ppt
156 bindsym l resize shrink height 10 px or 10 ppt
157 bindsym semicolon resize grow width 10 px or 10 ppt
158
159 # same bindings, but for the arrow keys
160 bindsym Left resize shrink width 10 px or 10 ppt
161 bindsym Down resize grow height 10 px or 10 ppt
162 bindsym Up resize shrink height 10 px or 10 ppt
163 bindsym Right resize grow width 10 px or 10 ppt
164
165 # back to normal: Enter or Escape
166 bindsym Return mode "default"
167 bindsym Escape mode "default"
168}
169bindsym $mod+r mode "resize"
170
298f42fe
AB
171# change theme mode
172set $mode_theme theme (d)ark | (l)ight
173mode "$mode_theme" {
174 bindsym d exec change-theme dark, mode "default"
175 bindsym l exec change-theme light, mode "default"
176 bindsym Return mode "default"
177 bindsym Escape mode "default"
178 bindsym q mode "default"
179}
180bindsym $mod+t mode "$mode_theme"
181
49d235a4
AB
182# pop-ups
183for_window [window_role="pop-up"] floating enable
184
17d2cfa0
AB
185# application-specific window configurations
186for_window [class="mpv"] floating enable
187for_window [class="Mumble"] floating enable
188for_window [class="Nm-connection-editor"] floating enable
189for_window [class="Virt-manager"] floating enable
49d235a4
AB
190for_window [class="Vncviewer"] floating enable
191for_window [class="Engrampa"] floating enable
192for_window [class="Caja"] floating enable
17d2cfa0
AB
193
194# no title bars
195for_window [class="^.*"] border pixel 4
196
197# i3bar and system info from i3status
198bar {
199 status_command i3status | my-i3status
200 tray_output primary
201}