-
Notifications
You must be signed in to change notification settings - Fork 2
/
config
255 lines (202 loc) · 7.98 KB
/
config
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
# ---------
# BEHAVIOUR
# ---------
# Application autostart.
exec --no-startup-id "~/.config/i3/bin/startup"
# Window manipulation.
focus_follows_mouse no
# Workspace names.
set $www 1: www
set $code 2: code
set $cmd 3: cmd
set $chat 4: chat
set $media 5: media
set $games 6: games
set $misc 7: misc
# Workspace assignments for applications
assign [class="Firefox"] → $www
assign [class="Chromium"] → $www
assign [class="Astroid"] → $www
assign [class="Emacs"] → $code
assign [class="Gnome-mpv"] → $media
assign [class="Gimp"] → $media
assign [class="Slack"] → $chat
assign [class="HipChat"] → $chat
assign [class="Hexchat"] → $chat
assign [class="Pidgin"] → $chat
assign [class="Steam"] → $games
# Rules for specific window classes
for_window [class="Connman-gtk"] floating enable
for_window [class="Pavucontrol"] floating enable
for_window [class="Blueberry.py"] floating enable
for_window [class="Orage"] floating enable
# -----------
# KEYBINDINGS
# -----------
# Default modifier key is the 'Super' key.
set $mod Mod4
# Application launching
bindsym $mod+Return exec i3-sensible-terminal
bindsym $mod+d exec "rofi -show run"
bindsym $mod+Shift+d exec "rofi -show drun"
bindsym $mod+Shift+f exec "rofi -show files -modi files:~/.local/share/rofi/file-browser"
bindsym $mod+equal exec "~/.config/i3/bin/fortune-notify"
# Change focus
bindsym $mod+h focus left
bindsym $mod+j focus down
bindsym $mod+k focus up
bindsym $mod+l focus right
bindsym $mod+Left focus left
bindsym $mod+Down focus down
bindsym $mod+Up focus up
bindsym $mod+Right focus right
# Move focused window
bindsym $mod+Shift+h move left
bindsym $mod+Shift+j move down
bindsym $mod+Shift+k move up
bindsym $mod+Shift+l move right
bindsym $mod+Shift+Left move left
bindsym $mod+Shift+Down move down
bindsym $mod+Shift+Up move up
bindsym $mod+Shift+Right move right
# Move workspace to output.
bindsym $mod+Ctrl+Shift+Left move workspace to output left
bindsym $mod+Ctrl+Shift+Down move workspace to output down
bindsym $mod+Ctrl+Shift+Up move workspace to output up
bindsym $mod+Ctrl+Shift+Right move workspace to output right
# Window size
bindsym $mod+f fullscreen toggle
# Horizontal/vertical orientation switching
bindsym $mod+bracketleft split h
bindsym $mod+bracketright split v
# Change container layout (stacked, tabbed, toggle split)
bindsym $mod+s layout stacking
bindsym $mod+w layout tabbed
bindsym $mod+e layout toggle split
# Toggle tiling/floating
bindsym $mod+Shift+space floating toggle
bindsym $mod+space focus mode_toggle
# Focus the parent/child container.
bindsym $mod+a focus parent
# Focus urgent window.
bindsym $mod+u [urgent=latest] focus
# Resize floating windows with modifider + mouse.
floating_modifier $mod
# Toggle between last used workspaces
bindsym $mod+Tab workspace back_and_forth
# Switch to workspace
bindsym $mod+1 workspace $www
bindsym $mod+2 workspace $code
bindsym $mod+3 workspace $cmd
bindsym $mod+4 workspace $chat
bindsym $mod+5 workspace $media
bindsym $mod+6 workspace $games
bindsym $mod+7 workspace $misc
# Move focused window to workspace
bindsym $mod+Shift+1 move container to workspace $www
bindsym $mod+Shift+2 move container to workspace $code
bindsym $mod+Shift+3 move container to workspace $cmd
bindsym $mod+Shift+4 move container to workspace $chat
bindsym $mod+Shift+5 move container to workspace $media
bindsym $mod+Shift+6 move container to workspace $games
bindsym $mod+Shift+7 move container to workspace $misc
# Window manager
bindsym $mod+p exec "rofi -show window"
bindsym $mod+q kill
bindsym $mod+Shift+c reload
bindsym $mod+Shift+r restart
bindsym $mod+Shift+Delete exec --no-startup-id ~/.config/i3/bin/session lock
# Volume keys
bindsym XF86AudioRaiseVolume exec --no-startup-id "~/.config/i3/bin/volume up && touch /tmp/i3statusbar.*/volume"
bindsym XF86AudioLowerVolume exec --no-startup-id "~/.config/i3/bin/volume down && touch /tmp/i3statusbar.*/volume"
bindsym XF86AudioMute exec --no-startup-id "~/.config/i3/bin/volume mute && touch /tmp/i3statusbar.*/volume"
# Media keys
bindsym $mod+Ctrl+Up exec --no-startup-id "mpc stop"
bindsym $mod+Ctrl+Down exec --no-startup-id "mpc toggle"
bindsym $mod+Ctrl+Left exec --no-startup-id "mpc prev"
bindsym $mod+Ctrl+Right exec --no-startup-id "mpc next"
# Modes
bindsym $mod+r mode "resize"
bindsym $mod+Shift+q mode $session
# ----------
# APPEARANCE
# ----------
# Default font.
font pango:Inconsolata 12
# Border style for new windows.
new_window normal
# Color names.
set $background #282828
set $foreground #d8d8d8
set $focused #2d2d2d
set $unfocused #585858
set $urgent #ab4642
# Window manager colors.
# Class Border Background Text Indicator
client.focused $focused $focused $foreground $focused
client.focused_inactive $focused $focused $unfocused $focused
client.unfocused $background $background $unfocused $background
client.urgent $urgent $urgent $background $urgent
client.background $background
# ---------------
# MODES & MODULES
# ---------------
mode "resize" {
# These bindings trigger as soon as you enter the resize mode.
# They resize the border in the direction you pressed, e.g. when pressing
# left, the window is resized so that it has more space on its left
bindsym l resize shrink left 10 px or 10 ppt
bindsym Shift+l resize grow left 10 px or 10 ppt
bindsym k resize shrink down 10 px or 10 ppt
bindsym Shift+k resize grow down 10 px or 10 ppt
bindsym i resize shrink up 10 px or 10 ppt
bindsym Shift+i resize grow up 10 px or 10 ppt
bindsym j resize shrink right 10 px or 10 ppt
bindsym Shift+j resize grow right 10 px or 10 ppt
# Same bindings, but for the arrow keys
bindsym Left resize shrink left 10 px or 10 ppt
bindsym Shift+Left resize grow left 10 px or 10 ppt
bindsym Down resize shrink down 10 px or 10 ppt
bindsym Shift+Down resize grow down 10 px or 10 ppt
bindsym Up resize shrink up 10 px or 10 ppt
bindsym Shift+Up resize grow up 10 px or 10 ppt
bindsym Right resize shrink right 10 px or 10 ppt
bindsym Shift+Right resize grow right 10 px or 10 ppt
# Back to normal mode: Enter or Escape
bindsym Return mode "default"
bindsym Escape mode "default"
}
set $session "Session (s) Suspend, (l) Logout, (r) Reboot, (p) Power off"
mode $session {
bindsym s exec --no-startup-id ~/.config/i3/bin/session suspend, mode "default"
bindsym l exec --no-startup-id ~/.config/i3/bin/session logout, mode "default"
bindsym r exec --no-startup-id ~/.config/i3/bin/session reboot, mode "default"
bindsym p exec --no-startup-id ~/.config/i3/bin/session poweroff, mode "default"
# Back to normal mode: Enter or Escape
bindsym Return mode "default"
bindsym Escape mode "default"
}
bar {
output eDP1
output DP1
mode dock
position top
tray_output eDP1
tray_output DP1
font pango:Inconsolata, i3cons 12
separator_symbol " • "
workspace_buttons yes
binding_mode_indicator yes
strip_workspace_numbers yes
status_command "~/.config/i3/bin/statusbar player cpu memory network battery volume keyboard clock"
colors {
background $background
statusline $foreground
separator $unfocused
# Class Border Background Text
focused_workspace $background $background $foreground
active_workspace $background $background $foreground
inactive_workspace $background $background $unfocused
urgent_workspace $background $background $urgent
}
}