-
Notifications
You must be signed in to change notification settings - Fork 0
/
i3.config
349 lines (301 loc) · 11.6 KB
/
i3.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
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
# i3 config file (v4)
#
# Please see http://i3wm.org/docs/userguide.html for a complete reference!
#
# This config file uses keycodes (bindsym) and was written for the QWERTY
# layout.
#
# To get a config file with the same key positions, but for your current
# layout, use the i3-config-wizard
#
# Font for window titles. Will also be used by the bar unless a different font
# is used in the bar {} block below.
#font pango:monospace 8
# This font is widely installed, provides lots of unicode glyphs, right-to-left
# text rendering and scalability on retina/hidpi displays (thanks to pango).
#font pango:DejaVu Sans Mono 8
font pango:Hack, FontAwesome 12
# Before i3 v4.8, we used to recommend this one as the default:
# font -misc-fixed-medium-r-normal--13-120-75-75-C-70-iso10646-1
# The font above is very space-efficient, that is, it looks good, sharp and
# clear in small sizes. However, its unicode glyph coverage is limited, the old
# X core fonts rendering does not support right-to-left and this being a bitmap
# font, it doesn’t scale on retina/hidpi displays.
# use these keys for focus, movement, and resize directions when reaching for
# the arrows is not convenient
set $up k
set $down j
set $left h
set $right l
# use Mouse+Mod1 to drag floating windows to their wanted position
floating_modifier Mod1
# start a terminal
bindsym Mod1+Return exec alacritty
# kill focused window
bindsym Mod1+Shift+q kill
# start dmenu (a program launcher)
#bindsym Mod1+d exec dmenu_run
# There also is the (new) i3-dmenu-desktop which only displays applications
# shipping a .desktop file. It is a wrapper around dmenu, so you need that
# installed.
bindsym Mod1+d exec --no-startup-id i3-dmenu-desktop
bindsym Mod1+q exec --no-startup-id i3-dmenu-desktop --dmenu='/home/pprokop/.i3/scripts/rofi.sh'
# change focus
bindsym Mod1+$left focus left
bindsym Mod1+$down focus down
bindsym Mod1+$up focus up
bindsym Mod1+$right focus right
# alternatively, you can use the cursor keys:
bindsym Mod1+Left focus left
bindsym Mod1+Down focus down
bindsym Mod1+Up focus up
bindsym Mod1+Right focus right
# move focused window
bindsym Mod1+Shift+$left move left
bindsym Mod1+Shift+$down move down
bindsym Mod1+Shift+$up move up
bindsym Mod1+Shift+$right move right
# alternatively, you can use the cursor keys:
bindsym Mod1+Shift+Left move left
bindsym Mod1+Shift+Down move down
bindsym Mod1+Shift+Up move up
bindsym Mod1+Shift+Right move right
# split in horizontal orientation
bindsym Mod1+p split h
# split in vertical orientation
bindsym Mod1+v split v
# enter fullscreen mode for the focused container
bindsym Mod1+f fullscreen toggle
# change container layout (stacked, tabbed, toggle split)
bindsym Mod1+s layout stacking
bindsym Mod1+w layout tabbed
bindsym Mod1+e layout toggle split
# toggle tiling / floating
bindsym Mod1+Shift+space floating toggle
# change focus between tiling / floating windows
bindsym Mod1+space focus mode_toggle
# focus the parent container
bindsym Mod1+a focus parent
# focus the child container
#bindsym Mod1+d focus child
# move the currently focused window to the scratchpad
bindsym Mod1+Shift+minus move scratchpad
# Show the next scratchpad window or hide the focused scratchpad window.
# If there are multiple scratchpad windows, this command cycles through them.
#bindsym Mod1+minus scratchpad show
# # # # # # # # # # # # # # # # # # #
# #
# # Color Stuff
# #
# # # # # # # # # # # # # # # # # # # #
#
#please visit https://github.com/Airblader/i3/wiki/Compiling-&-Installing
hide_edge_borders none
for_window [class="^.*"] border pixel 0
set $default_gaps_inner 12
set $default_gaps_outer 0
gaps inner $default_gaps_inner
gaps outer $default_gaps_outer
smart_gaps on
smart_borders on
# Hybrid colors
set $black #212121
set $darkblack #000000
set $red #fb4934
set $darkred #cc241d
set $green #b8bb26
set $darkgreen #98971a
set $yellow #fabd2f
set $darkyellow #d79921
set $blue #83a598
set $darkblue #458588
set $magenta #d3869b
set $darkmagenta #b16286
set $cyan #8ec07c
set $darkcyan #689d6a
set $white #ebdbb2
set $darkwhite #a89984
# class border backgr. text indicator
#client.focused $yellow $yellow $black $yellow $yellow
#client.unfocused $black $black $white $black $black
#client.focused_inactive $black $black $white $black $black
#client.urgent $darkred $darkred $black $darkred $darkred
#client.background $black
# class border backgr. text indicator child_border
client.focused #54B98C #285577 #ffffff #2e9ef4 #54B98C
client.focused_inactive #1e1e1e #5f676a #ffffff #484e50 #1e1e1e
client.unfocused #1e1e1e #222222 #888888 #292d2e #1e1e1e
client.urgent #1e1e1e #900000 #ffffff #900000 #1e1e1e
client.placeholder #1e1e1e #0c0c0c #ffffff #000000 #1e1e1e
client.background #1e1e1e
# nice icons
# set $ws1 " "
# set $ws2 " "
# set $ws3 " "
# set $ws4 " "
# set $ws5 " "
# set $ws6 " "
# set $ws7 " "
# set $ws8 " "
# set $ws9 " "
set $ws1 "1"
set $ws2 "2"
set $ws3 "3"
set $ws4 "4"
set $ws5 "5"
set $ws6 "6"
set $ws7 "7"
set $ws8 "8"
set $ws9 "9"
# switch to workspace
bindsym Mod1+1 workspace $ws1
bindsym Mod1+2 workspace $ws2
bindsym Mod1+3 workspace $ws3
bindsym Mod1+4 workspace $ws4
bindsym Mod1+5 workspace $ws5
bindsym Mod1+6 workspace $ws6
bindsym Mod1+7 workspace $ws7
bindsym Mod1+8 workspace 8
bindsym Mod1+9 workspace 9
bindsym Mod1+0 workspace 10
# move focused container to workspace
bindsym Mod1+Shift+1 move container to workspace $ws1
bindsym Mod1+Shift+2 move container to workspace $ws2
bindsym Mod1+Shift+3 move container to workspace $ws3
bindsym Mod1+Shift+4 move container to workspace $ws4
bindsym Mod1+Shift+5 move container to workspace $ws5
bindsym Mod1+Shift+6 move container to workspace $ws6
bindsym Mod1+Shift+7 move container to workspace $ws7
bindsym Mod1+Shift+8 move container to workspace 8
bindsym Mod1+Shift+9 move container to workspace 9
bindsym Mod1+Shift+0 move container to workspace 10
# reload the configuration file
bindsym Mod1+Shift+c reload
# restart i3 inplace (preserves your layout/session, can be used to upgrade i3)
bindsym Mod1+Shift+r restart
# exit i3 (logs you out of your X session)
bindsym Mod1+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'"
# resize window (you can also use the mouse for that)
mode "resize" {
# These bindings trigger as soon as you enter the resize mode
# Pressing left will shrink the window’s width.
# Pressing right will grow the window’s width.
# Pressing up will shrink the window’s height.
# Pressing down will grow the window’s height.
bindsym $left resize shrink width 10 px or 10 ppt
bindsym $down resize grow height 10 px or 10 ppt
bindsym $up resize shrink height 10 px or 10 ppt
bindsym $right resize grow width 10 px or 10 ppt
# same bindings, but for the arrow keys
bindsym Left resize shrink width 10 px or 10 ppt
bindsym Down resize grow height 10 px or 10 ppt
bindsym Up resize shrink height 10 px or 10 ppt
bindsym Right resize grow width 10 px or 10 ppt
# back to normal: Enter or Escape
bindsym Return mode "default"
bindsym Escape mode "default"
}
bindsym Mod1+r mode "resize"
set $transparent #00000000
# Start i3bar to display a workspace bar (plus the system information i3status
# finds out, if available)
#bar {
## status_command i3blocks
# position top
# tray_output primary
# #i3bar_command i3bar -t
# font pango:Hack, FontAwesome 12
#
# colors {
# statusline $white
# background $transparent
# separator $yellow
#
#
## BORDER BACKGROUND TEXT
# focused_workspace $transparent $transparent $red
# inactive_workspace $transparent $transparent $white
# active_workspace $transparent $transparent $white
# urgent_workspace $darkred $darkred $black
# binding_mode $transparent $transparent $yellow
# }
#
#}
#######################################################################
# automatically start i3-config-wizard to offer the user to create a
# keysym-based config which used their favorite modifier (alt or windows)
#
# i3-config-wizard will not launch if there already is a config file
# in ~/.i3/config.
#
# Please remove the following exec line:
#######################################################################
#Custom shortcuts
#
bindsym Control+Mod1+p exec sh ~/.i3/scripts/laptop.sh
bindsym Control+Mod1+l exec ~/.i3/scripts/i3lock.sh
bindsym Print exec scrot '%Y-%m-%d-%T_$wx$h_scrot.png' -e 'mv $f ~/Pictures/screenshots/'
# Pulse Audio controls
bindsym XF86AudioRaiseVolume exec --no-startup-id pactl set-sink-volume 0 +5% #increase sound volume
bindsym XF86AudioLowerVolume exec --no-startup-id pactl set-sink-volume 0 -5% #decrease sound volume
bindsym XF86AudioMute exec --no-startup-id pactl set-sink-mute 0 toggle # mute sound
#
# # Media player controls
bindsym XF86AudioPlay exec playerctl play-pause
bindsym XF86AudioPause exec playerctl pause
bindsym XF86AudioNext exec playerctl next
bindsym XF86AudioPrev exec playerctl previous
# # rebind termianl
# bindsym Mod1+Return exec st
#Brightness control
#add to sudoers "ALL ALL = (ALL) NOPASSWD: /usr/bin/tee /sys/class/backlight/intel_backlight/brightness"
bindsym XF86MonBrightnessUp exec bash -c 'sudo tee /sys/class/backlight/intel_backlight/brightness <<<$(( $(cat /sys/class/backlight/intel_backlight/brightness) + 15 ))'
bindsym XF86MonBrightnessDown exec bash -c 'sudo tee /sys/class/backlight/intel_backlight/brightness <<<$(( $(cat /sys/class/backlight/intel_backlight/brightness) - 15 ))'
#
#Move workspaces
bindsym Mod1+Next workspace next
bindsym Mod1+Prior workspace prev
#workspaces to monitors
workspace $ws1 output HDMI1
workspace $ws2 output HDMI1
workspace $ws7 output HDMI1
workspace $ws5 output DP1
workspace $ws4 output DP1
workspace $ws6 output DP1
#Assigns
#Bind applications to workspaces
assign [class="Firefox"] $ws1
assign [class="firefox"] $ws1
assign [class="st-256color"] $ws2
assign [class="St"] $ws2
assign [class="st"] $ws2
assign [class="Evolution"] $ws3
assign [class="Slack"] $ws5
assign [class="Spotify"] $ws4
assign [class="spotify"] $ws4
assign [class="Gvim"] $ws6
assign [class="gvim"] $ws6
assign [class="xfreerdp"] $ws7
#enabling floating
for_window [class="(?i)pavucontrol"] floating enable, border normal, move position mouse
for_window [class="(?i)rdesktop"] floating enable, border normal, move position mouse
# for_window [class="(?i)net-sourceforge-jnlp-runtime-Boot"] floating enable, border normal, move position mouse
for_window [class="(?i)com-sonicwall-NetExtender"] floating enable, border normal, move position mouse
#Startup
exec feh --bg-scale ~/.i3/arch.png
exec --no-startup-id nm-applet &
exec --no-startup-id blueman-manager &
#
## for multi monitor setup https://github.com/Airblader/xedgewarp
#exec --no-startup-id xedgewarp -b
# Clipboard manager
exec --no-startup-id parcellite
#Shutter
exec --no-startup-id shutter --min_at_startup
#Polish characters
#exec --no-starup-id setxkbmap -layout "pl,pl"
exec --no-startup-id ~/.screenlayout/secondary.sh
exec_always --no-startup-id $HOME/.config/polybar/launch.sh
#focus_follows_mouse no
mouse_warping none
popup_during_fullscreen leave_fullscreen