0c0f3907451c0877693bbe58d57ccd8da0f94b85
[~bandali/configs] / i3 / .i3 / config
1 # This file has been auto-generated by i3-config-wizard(1).
2 # It will not be overwritten, so edit it as you like.
3 #
4 # Should you change your keyboard layout some time, delete
5 # this file and re-run i3-config-wizard(1).
6 #
7
8 # i3 config file (v4)
9 #
10 # Please see http://i3wm.org/docs/userguide.html for a complete reference!
11
12 set $mod Mod4
13
14 # Font for window titles. Will also be used by the bar unless a different font
15 # is used in the bar {} block below.
16 # This font is widely installed, provides lots of unicode glyphs, right-to-left
17 # text rendering and scalability on retina/hidpi displays (thanks to pango).
18 font pango:DejaVu Sans Mono 8
19 # Before i3 v4.8, we used to recommend this one as the default:
20 # font -misc-fixed-medium-r-normal--13-120-75-75-C-70-iso10646-1
21 # The font above is very space-efficient, that is, it looks good, sharp and
22 # clear in small sizes. However, its unicode glyph coverage is limited, the old
23 # X core fonts rendering does not support right-to-left and this being a bitmap
24 # font, it doesn’t scale on retina/hidpi displays.
25
26 # Use Mouse+$mod to drag floating windows to their wanted position
27 floating_modifier $mod
28
29 set $lime #9FBC00
30 set $darklime #505e00
31 set $blue #131D24
32 set $lightblue #232D34
33 set $lightgray #DDEEDD
34 set $darkgray #444444
35 set $white #FFFFFF
36 set $urgentred #B33A3A
37
38 set $ws1 "1:"
39 set $ws2 "2:"
40 set $ws3 "3:"
41 set $ws4 "4:"
42 set $ws5 "5:"
43 set $ws6 "6:"
44
45 set $default_gaps_inner 10
46 set $default_gaps_outer 0
47 gaps inner $default_gaps_inner
48 gaps outer $default_gaps_outer
49 #smart_borders on
50
51 # start a terminal
52 #bindsym $mod+Return exec i3-sensible-terminal
53 bindsym $mod+Return exec urxvt
54
55 # kill focused window
56 bindsym $mod+q kill
57
58 # start dmenu (a program launcher)
59 bindsym $mod+space exec --no-startup-id dmenu_run
60 # There also is the (new) i3-dmenu-desktop which only displays applications
61 # shipping a .desktop file. It is a wrapper around dmenu, so you need that
62 # installed.
63 # bindsym $mod+d exec --no-startup-id i3-dmenu-desktop
64
65 # change focus
66 bindsym $mod+h focus left
67 bindsym $mod+j focus down
68 bindsym $mod+k focus up
69 bindsym $mod+l focus right
70
71 # alternatively, you can use the cursor keys:
72 bindsym $mod+Left focus left
73 bindsym $mod+Down focus down
74 bindsym $mod+Up focus up
75 bindsym $mod+Right focus right
76
77 # move focused window
78 bindsym $mod+Shift+j move left
79 bindsym $mod+Shift+k move down
80 bindsym $mod+Shift+l move up
81 bindsym $mod+Shift+semicolon move right
82
83 # alternatively, you can use the cursor keys:
84 bindsym $mod+Shift+Left move left
85 bindsym $mod+Shift+Down move down
86 bindsym $mod+Shift+Up move up
87 bindsym $mod+Shift+Right move right
88
89 # split in horizontal orientation
90 bindsym $mod+comma split h
91
92 # split in vertical orientation
93 bindsym $mod+period split v
94
95 # enter fullscreen mode for the focused container
96 bindsym $mod+f fullscreen toggle
97
98 # change container layout (stacked, tabbed, toggle split)
99 bindsym $mod+s layout stacking
100 bindsym $mod+w layout tabbed
101 bindsym $mod+e layout toggle split
102
103 # toggle tiling / floating
104 bindsym $mod+Shift+space floating toggle
105
106 # change focus between tiling / floating windows
107 bindsym $mod+semicolon focus mode_toggle
108
109 # focus the parent container
110 bindsym $mod+a focus parent
111
112 # focus the child container
113 bindsym $mod+d focus child
114
115 # switch to workspace
116 bindsym $mod+1 workspace $ws1
117 bindsym $mod+2 workspace $ws2
118 bindsym $mod+3 workspace $ws3
119 bindsym $mod+4 workspace $ws4
120 bindsym $mod+5 workspace $ws5
121 bindsym $mod+6 workspace $ws6
122 bindsym $mod+7 workspace 7
123 bindsym $mod+8 workspace 8
124 bindsym $mod+9 workspace 9
125 bindsym $mod+0 workspace 10
126
127 bindsym $mod+braceleft workspace prev
128 bindsym $mod+braceright workspace next
129
130 # move focused container to workspace
131 bindsym $mod+Shift+1 move container to workspace number $ws1
132 bindsym $mod+Shift+2 move container to workspace number $ws2
133 bindsym $mod+Shift+3 move container to workspace number $ws3
134 bindsym $mod+Shift+4 move container to workspace number $ws4
135 bindsym $mod+Shift+5 move container to workspace number $ws5
136 bindsym $mod+Shift+6 move container to workspace number $ws6
137 bindsym $mod+Shift+7 move container to workspace 7
138 bindsym $mod+Shift+8 move container to workspace 8
139 bindsym $mod+Shift+9 move container to workspace 9
140 bindsym $mod+Shift+0 move container to workspace 10
141
142 bindsym $mod+Shift+braceleft move container to workspace prev
143 bindsym $mod+Shift+braceright move container to workspace next
144
145 # reload the configuration file
146 bindsym $mod+Shift+c reload
147 # restart i3 inplace (preserves your layout/session, can be used to upgrade i3)
148 bindsym $mod+Shift+r restart
149 # exit i3 (logs you out of your X session)
150 # bindsym $mod+Shift+e exec "i3-nagbar -t warning -m 'You pressed the exit shortcut. Do you really want to exit i3? This will end your X session.' -b 'Yes, exit i3' 'i3-msg exit'"
151
152 # resize window (you can also use the mouse for that)
153 mode "resize" {
154 # These bindings trigger as soon as you enter the resize mode
155
156 # Pressing left will shrink the window’s width.
157 # Pressing right will grow the window’s width.
158 # Pressing up will shrink the window’s height.
159 # Pressing down will grow the window’s height.
160 bindsym h resize shrink width 10 px or 10 ppt
161 bindsym j resize grow height 10 px or 10 ppt
162 bindsym k resize shrink height 10 px or 10 ppt
163 bindsym l resize grow width 10 px or 10 ppt
164
165 # same bindings, but for the arrow keys
166 bindsym Left resize shrink width 10 px or 10 ppt
167 bindsym Down resize grow height 10 px or 10 ppt
168 bindsym Up resize shrink height 10 px or 10 ppt
169 bindsym Right resize grow width 10 px or 10 ppt
170
171 # back to normal: Enter or Escape
172 bindsym Return mode "default"
173 bindsym Escape mode "default"
174 }
175
176 bindsym $mod+r mode "resize"
177
178 set $mode_gaps Gaps: (o) outer, (i) inner
179 set $mode_gaps_outer Outer Gaps: +|-|0 (local), Shift + +|-|0 (global)
180 set $mode_gaps_inner Inner Gaps: +|-|0 (local), Shift + +|-|0 (global)
181 bindsym $mod+Shift+g mode "$mode_gaps"
182
183 mode "$mode_gaps" {
184 bindsym o mode "$mode_gaps_outer"
185 bindsym i mode "$mode_gaps_inner"
186 bindsym Return mode "default"
187 bindsym Escape mode "default"
188 }
189
190 mode "$mode_gaps_inner" {
191 bindsym plus gaps inner current plus 5
192 bindsym minus gaps inner current minus 5
193 bindsym 0 gaps inner current set 0
194
195 bindsym Shift+plus gaps inner all plus 5
196 bindsym Shift+minus gaps inner all minus 5
197 bindsym Shift+0 gaps inner all set 0
198
199 bindsym Return mode "default"
200 bindsym Escape mode "default"
201 }
202 mode "$mode_gaps_outer" {
203 bindsym plus gaps outer current plus 5
204 bindsym minus gaps outer current minus 5
205 bindsym 0 gaps outer current set 0
206
207 bindsym Shift+plus gaps outer all plus 5
208 bindsym Shift+minus gaps outer all minus 5
209 bindsym Shift+0 gaps outer all set 0
210
211 bindsym Return mode "default"
212 bindsym Escape mode "default"
213 }
214
215 # fix graphics glitch
216 for_window [class="^.*"] border pixel 0
217 for_window [class="(?i)urxvt"] border pixel 3
218
219 # dialogs
220 for_window [class="(?i)gsimplecal"] floating enable
221 for_window [window_role="pop-up"] floating enable
222 for_window [window_role="task_dialog"] floating enable
223
224 # windows with no border
225 for_window [class="(?i)firefox"] border none
226 for_window [class="(?i)thunderbird"] border none
227 for_window [class="(?i)emacs"] border none
228
229
230 # assign certain applications to a specific workspace
231 assign [class="(?i)firefox"] $ws1
232 assign [class="(?i)urxvt"] $ws2
233 assign [class="(?i)emacs"] $ws3
234 assign [class="(?i)thunderbird"] $ws6
235
236 # Start i3bar to display a workspace bar (plus the system information i3status
237 # finds out, if available)
238 bar {
239 status_command i3status
240 strip_workspace_numbers yes
241 # height 20
242 colors {
243 statusline $lightgray
244 background $blue
245 separator $lime
246 # BORDER BACKGROUND TEXT
247 focused_workspace $lightblue $lightblue $lime
248 inactive_workspace $blue $blue $white
249 urgent_workspace $urgentred $urgentred $white
250 }
251 }
252
253 set $mode_system System (l) lock, (e) logout, (r) reboot, (Shift+s) shutdown
254 mode "$mode_system" {
255 bindsym l exec --no-startup-id i3exit lock, mode "default"
256 bindsym e exec --no-startup-id i3exit logout, mode "default"
257 bindsym r exec --no-startup-id i3exit reboot, mode "default"
258 bindsym Shift+s exec --no-startup-id i3exit shutdown, mode "default"
259
260 # back to normal: Enter or Escape
261 bindsym Return mode "default"
262 bindsym Escape mode "default"
263 }
264 bindsym $mod+Shift+e mode "$mode_system"
265
266 exec --no-startup-id nm-applet
267 exec --no-startup-id "pulseaudio --start"
268
269 # Sreen brightness controls
270 bindsym XF86MonBrightnessUp exec --no-startup-id xbacklight -inc 5 # increase screen brightness
271 bindsym XF86MonBrightnessDown exec --no-startup-id xbacklight -dec 5 # decrease screen brightness
272
273 # Keyboard brightness controls
274 bindsym XF86KbdBrightnessUp exec --no-startup-id kbdlight up # increase screen brightness
275 bindsym XF86KbdBrightnessDown exec --no-startup-id kbdlight down # decrease screen brightness
276
277 # Pulse Audio controls
278 bindsym XF86AudioRaiseVolume exec --no-startup-id pamixer --allow-boost --increase 5 #increase sound volume
279 bindsym XF86AudioLowerVolume exec --no-startup-id pamixer --allow-boost --decrease 5 #decrease sound volume
280 bindsym XF86AudioMute exec --no-startup-id pamixer --toggle-mute # mute sound
281
282 # MPD controls (using mpc)
283 bindsym XF86AudioPlay exec --no-startup-id mpc toggle
284 bindsym XF86AudioPrev exec --no-startup-id mpc prev
285 bindsym XF86AudioNext exec --no-startup-id mpc next