-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathi3.config
299 lines (240 loc) · 12.1 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
# This file has been auto-generated by i3-config-wizard(1).
# It will not be overwritten, so edit it as you like.
#
# Should you change your keyboard layout some time, delete
# this file and re-run i3-config-wizard(1).
#
# i3 config file (v4)
#
# Please see http://i3wm.org/docs/userguide.html for a complete reference!
set $mod Mod4
default_border 1pixel
default_floating_border 1pixel
# class border bground text indicator child_border
client.focused #B2F73C #BEED26 #0F0F0F #D0F45B #D0F45B
client.focused_inactive #333333 #5F676A #FFFFFF #484E50 #5F676A
client.unfocused #333333 #222222 #888888 #292D2E #222222
client.urgent #2F343A #900000 #FFFFFF #900000 #900000
client.placeholder #000000 #0C0C0C #FFFFFF #000000 #0C0C0C
client.background #FFFFFF
workspace_auto_back_and_forth yes
# 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
font pango:Envy Code R for Powerline 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
# 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 Mouse+$mod to drag floating windows to their wanted position
floating_modifier $mod
# start a terminal
bindsym $mod+Return exec alacritty
# kill focused window
bindsym $mod+Shift+q kill
# start dmenu (a program launcher), replaced below
# bindsym $mod+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 $mod+d exec --no-startup-id i3-dmenu-desktop
bindsym $mod+d exec "dmenu_run -nf '#BBBBBB' -nb '#222222' -sb '#B7E914' -sf '#343434' -fn 'monospace-10' -p 'dmenu prompt >'"
# change focus
bindsym $mod+h focus left
bindsym $mod+j focus down
bindsym $mod+k focus up
bindsym $mod+l focus right
# change focus to output
bindsym $mod+Left focus output left
bindsym $mod+Down focus output down
bindsym $mod+Up focus output up
bindsym $mod+Right focus output 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
# alternatively, you can use the cursor keys:
bindsym $mod+Shift+Left move left
bindsym $mod+Shift+Down move down
bindsym $mod+Shift+Up move up
bindsym $mod+Shift+Right move right
# split in horizontal orientation
bindsym $mod+Shift+quotedbl split h
# split in vertical orientation
bindsym $mod+slash split v
# enter fullscreen mode for the focused container
bindsym $mod+f fullscreen toggle
# 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
# change focus between tiling / floating windows
bindsym $mod+space focus mode_toggle
# move to scratchpad
bindsym $mod+shift+minus move scratchpad
# toggle scratchpad
bindsym $mod+minus scratchpad show
# focus the parent container
bindsym $mod+a focus parent
# focus the child container
#bindsym $mod+d focus child
bindsym $mod+semicolon exec ~/.vim-anywhere/bin/run
# switch to workspace
bindsym $mod+1 exec ~/dotfiles/i3_commands/switch_focus_to_workspace_by_number.sh 1
bindsym $mod+2 exec ~/dotfiles/i3_commands/switch_focus_to_workspace_by_number.sh 2
bindsym $mod+3 exec ~/dotfiles/i3_commands/switch_focus_to_workspace_by_number.sh 3
bindsym $mod+4 exec ~/dotfiles/i3_commands/switch_focus_to_workspace_by_number.sh 4
bindsym $mod+5 exec ~/dotfiles/i3_commands/switch_focus_to_workspace_by_number.sh 5
bindsym $mod+6 exec ~/dotfiles/i3_commands/switch_focus_to_workspace_by_number.sh 6
bindsym $mod+7 exec ~/dotfiles/i3_commands/switch_focus_to_workspace_by_number.sh 7
bindsym $mod+8 exec ~/dotfiles/i3_commands/switch_focus_to_workspace_by_number.sh 8
bindsym $mod+9 exec ~/dotfiles/i3_commands/switch_focus_to_workspace_by_number.sh 9
bindsym $mod+0 exec ~/dotfiles/i3_commands/switch_focus_to_workspace_by_number.sh 10
bindsym $mod+comma workspace prev_on_output
bindsym $mod+period workspace next_on_output
bindsym $mod+u focus output left
bindsym $mod+i focus output right
bindsym $mod+Shift+u focus parent; move workspace to output left
bindsym $mod+Shift+i focus parent; move workspace to output right
bindsym $mod+Shift+comma move workspace to output left
bindsym $mod+Shift+period move workspace to output right
# move focused container to workspace
bindsym $mod+Shift+1 exec ~/dotfiles/i3_commands/move_current_window_to_workspace_by_number.sh 1
bindsym $mod+Shift+2 exec ~/dotfiles/i3_commands/move_current_window_to_workspace_by_number.sh 2
bindsym $mod+Shift+3 exec ~/dotfiles/i3_commands/move_current_window_to_workspace_by_number.sh 3
bindsym $mod+Shift+4 exec ~/dotfiles/i3_commands/move_current_window_to_workspace_by_number.sh 4
bindsym $mod+Shift+5 exec ~/dotfiles/i3_commands/move_current_window_to_workspace_by_number.sh 5
bindsym $mod+Shift+6 exec ~/dotfiles/i3_commands/move_current_window_to_workspace_by_number.sh 6
bindsym $mod+Shift+7 exec ~/dotfiles/i3_commands/move_current_window_to_workspace_by_number.sh 7
bindsym $mod+Shift+8 exec ~/dotfiles/i3_commands/move_current_window_to_workspace_by_number.sh 8
bindsym $mod+Shift+9 exec ~/dotfiles/i3_commands/move_current_window_to_workspace_by_number.sh 9
bindsym $mod+Shift+0 exec ~/dotfiles/i3_commands/move_current_window_to_workspace_by_number.sh 10
# reload the configuration file
bindsym $mod+Shift+c reload
# restart i3 inplace (preserves your layout/session, can be used to upgrade i3)
bindsym $mod+Shift+r restart
# exit i3 (logs you out of your X session)
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'"
bindsym $mod+o exec "flameshot gui"
# 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 h resize shrink width 10 px or 10 ppt
bindsym j resize grow height 10 px or 10 ppt
bindsym k resize shrink height 10 px or 10 ppt
bindsym l 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 $mod+r mode "resize"
mode "workspaces" {
bindsym comma exec ~/dotfiles/i3_commands/rename_current_workspace.sh, mode "default"
bindsym period exec ~/dotfiles/i3_commands/switch_focus_to_workspace.sh, mode "default"
bindsym slash exec ~/dotfiles/i3_commands/move_to_workspace.sh, mode "default"
bindsym n exec ~/dotfiles/i3_commands/new_workspace.sh, mode "default"
# back to normal: Enter or Escape
bindsym Return mode "default"
bindsym Escape mode "default"
}
bindsym $mod+x mode "workspaces"
bindsym $mod+n exec ~/dotfiles/i3_commands/new_workspace.sh
# floats
for_window [window_role="pop-up"] floating enable # browser pop-ups
for_window [class="copyq"] floating enable
# Start i3bar to display a workspace bar (plus the system information i3status
# finds out, if available)
bar {
status_command i3status | ~/dotfiles/i3status_spotify/pystatus.py
colors {
background #000000
statusline #FFFFFF
separator #666666
focused_workspace #AFE740 #BBEC1B #272727
active_workspace #333333 #222222 #FFFF16
inactive_workspace #333333 #222222 #888888
urgent_workspace #2F343A #DA8256 #222222
binding_mode #2F343A #D7A61D #181818
}
}
# Media player controls
bindsym XF86AudioPlay exec playerctl -p spotify play-pause
bindsym XF86AudioNext exec playerctl -p spotify next
bindsym XF86AudioPrev exec playerctl -p spotify previous
# Screen brightness controls with notification
# using light (https://github.com/haikarainen/light.git), instead of xbacklight
# (for Dell needs to run as root, had to add the light command to the sudoers list,
# as:
# ➜ sudoers.d sudo cat /etc/sudoers.d/10-light
# Cmnd_Alias PASSWORDLESS = /usr/bin/light -A 5, /usr/bin/light -U 5
# andre ALL=(ALL) ALL
# andre ALL=(ALL) NOPASSWD: PASSWORDLESS
bindsym XF86MonBrightnessUp exec sudo light -A 5 # increase screen brightness
bindsym XF86MonBrightnessDown exec sudo light -U 5 # decrease screen brightness
# Pulse Audio controls
# check sink indexes and names with: pacmd list-sinks | grep -e 'name:' -e 'index'
# using paswitch (https://www.tablix.org/~avian/git/paswitch.git/) to switch between inputs
# using and pulseudio-ctl (https://github.com/graysky2/pulseaudio-ctl) to control volume
bindsym XF86AudioRaiseVolume exec --no-startup-id pulseaudio-ctl up 1
bindsym XF86AudioLowerVolume exec --no-startup-id pulseaudio-ctl down 1
bindsym XF86AudioMute exec --no-startup-id pulseaudio-ctl mute
set $mode_multimedia Multimedia (l or Return) laptop; Shift+[d|desk, s|switch_bluetooth_profile, b|bluetooth_headphones, l|laptop_audio, v|dock_audio]
mode "$mode_multimedia" {
bindsym Return exec --no-startup-id ~/dotfiles/display_settings/only_laptop_monitor.sh, mode "default"
bindsym Shift+d exec --no-startup-id ~/dotfiles/display_settings/onfido_monitors_laptop_off.sh, mode "default"
# Check https://askubuntu.com/a/773391/210363
bindsym Shift+s exec --no-startup-id ~/dotfiles/reactivate_sony_bluetooth_headphones.sh, mode "default"
# to get a list of sinks on your system: pactl list short sinks
bindsym Shift+b exec --no-startup-id paswitch bluez_sink.70_26_05_10_48_B4.a2dp_sink, mode "default"
bindsym Shift+l exec --no-startup-id paswitch alsa_output.pci-0000_00_1f.3.analog-stereo, mode "default"
bindsym Shift+v exec --no-startup-id paswitch alsa_output.usb-DisplayLink_Plugable_UD-ULTCDL_60783721-02.analog-stereo, mode "default"
# back to normal: Space or Escape
bindsym Space mode "default"
bindsym Escape mode "default"
}
bindsym $mod+m mode "$mode_multimedia"
# pause mode
set $mode_system System (l or Return) lock; Shift+[l|logout, s|suspend, h|hibernate, r|reboot, u|shutdown]
mode "$mode_system" {
bindsym l exec --no-startup-id ~/dotfiles/i3_commands/i3exit.sh lock, mode "default"
bindsym Return exec --no-startup-id ~/dotfiles/i3_commands/i3exit.sh lock, mode "default"
bindsym Shift+l exec --no-startup-id ~/dotfiles/i3_commands/i3exit.sh logout, mode "default"
bindsym Shift+s exec --no-startup-id ~/dotfiles/i3_commands/i3exit.sh suspend, mode "default"
bindsym Shift+h exec --no-startup-id ~/dotfiles/i3_commands/i3exit.sh hibernate, mode "default"
bindsym Shift+r exec --no-startup-id ~/dotfiles/i3_commands/i3exit.sh reboot, mode "default"
bindsym Shift+u exec --no-startup-id ~/dotfiles/i3_commands/i3exit.sh shutdown, mode "default"
# back to normal: Space or Escape
bindsym Space mode "default"
bindsym Escape mode "default"
}
bindsym $mod+p mode "$mode_system"
# proper thinkpad touchpad
exec_always xinput set-prop "SynPS/2 Synaptics TouchPad" "libinput Natural Scrolling Enabled" 1
exec_always xinput set-prop "SynPS/2 Synaptics TouchPad" "libinput Tapping Enabled" 1
# keyboard repetition
exec_always xset r rate 300 50
exec_always /home/andre/lxlayout.sh
# starting stuff
exec albert
exec nm-applet # network manager
exec blueman-applet # bluetooth
exec compton # compton pretty stuff
exec copyq
exec dropbox start