-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathi3_config
297 lines (233 loc) · 10.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
# i3 config file (v4)
# Please see https://i3wm.org/docs/userguide.html for a complete reference
# use win key
set $mod Mod4
# font for window titles and bar
font pango:Hack Nerd Font, 10
# font pango:DejaVu Sans Mono 8
# font pango:CaskaydiaCove Nerd Font, 13
# font pango:Sauce Code Pro Nerd Font, 10
# use these keys for focus, movement, and resize directions
set $left h
set $down j
set $up k
set $right l
# define names for workspaces
set $ws1 "1: Browser "
set $ws2 "2: General "
set $ws3 "3: Terminal "
set $ws4 "4: Code "
set $ws5 "5: Files "
set $ws6 "6: Documents "
set $ws7 "7: Media "
set $ws8 "8: Design "
set $ws9 "9: Chat "
set $ws10 "10: Settings "
# use $mod+Mouse to drag floating windows to their wanted position
floating_modifier $mod
# move tiling windows via drag & drop by left-clicking into the title bar
tiling_drag modifier titlebar
# control focused window when follows the mouse movements
focus_follows_mouse no
# hiding borders adjacent to the screen edges
hide_edge_borders none
# window gaps
smart_gaps on
gaps inner 8
gaps outer 2
# set popups during fullscreen mode
popup_during_fullscreen smart
# start a terminal
bindsym $mod+Return workspace $ws3; exec --no-startup-id wezterm
# start a browser
bindsym $mod+b workspace $ws1; exec --no-startup-id brave-browser
# bindsym $mod+e exec nemo
# bindsym $mod+p exec plasma-open-settings
# TODO: check rofi
# start a program launcher
bindsym $mod+d exec --no-startup-id dmenu_run
# bindsym $mod+d exec --no-startup-id i3-dmenu-desktop --dmenu="dmenu -i -fn 'Source Sans Pro-10' -nb '#212121' -sb '#2b83a6' -sf '#ffffff'"
# bindsym $mod+d exec --no-startup-id rofi -show drun
# switching window with win+tab
# bindsym $mod+Tab exec --no-startup-id rofi -show window
# kill focused window
bindsym $mod+Shift+q kill
# change focus
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+$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+z split h
# split in vertical orientation
bindsym $mod+v split v
# enter fullscreen mode for the focused container
bindsym $mod+Shift+m fullscreen toggle
# change container layout
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
# focus the parent container
bindsym $mod+a focus parent
# focus the child container
bindsym $mod+Shift+a focus child
# TODO: ???
# move the currently focused window to the scratchpad
# bindsym $mod+Shift+minus move scratchpad
# show the next scratchpad window or hide the focused scratchpad window
# bindsym $mod+minus scratchpad show
# move focused floating window to the center of all outputs
# bindsym $mod+Shift+h move absolute position center
# move focused floating window to the current position of the cursor
# bindsym $mod+Shift+m move position mouse
# set a window to stick to the glass
# bindsym $mod+Shift+s sticky toggle
# sticky preview for media
# bindsym $mod+Shift+p fullscreen disable; floating enable; resize set 350 px 197 px; sticky enable; move window to position 1006 px 537 px
# shortcut to change window border
bindsym $mod+t border normal 0
bindsym $mod+y border pixel 1
bindsym $mod+u border none
# reload the configuration file
bindsym $mod+Shift+c reload
# restart i3 inplace
bindsym $mod+Shift+r restart
# manage i3 session
bindsym $mod+Shift+e exec --no-startup-id i3-nagbar -t warning -f "pango:Hack Nerd Font 9" -m "Do you really want to exit?" -B " Exit " "i3-msg exit" -B " Lock " "pkill i3-nagbar && i3lock-fancy -f Source-Sans-Pro" -B " Reboot " "pkill i3-nagbar && reboot" -B " Shutdown " "pkill i3-nagbar && shutdown -h now"
# switch to workspace
bindsym $mod+1 workspace $ws1
bindsym $mod+2 workspace $ws2
bindsym $mod+3 workspace $ws3
bindsym $mod+4 workspace $ws4
bindsym $mod+5 workspace $ws5
bindsym $mod+6 workspace $ws6
bindsym $mod+7 workspace $ws7
bindsym $mod+8 workspace $ws8
bindsym $mod+9 workspace $ws9
bindsym $mod+0 workspace $ws10
# move focused container to workspace
bindsym $mod+Shift+1 move container to workspace $ws1
bindsym $mod+Shift+2 move container to workspace $ws2
bindsym $mod+Shift+3 move container to workspace $ws3
bindsym $mod+Shift+4 move container to workspace $ws4
bindsym $mod+Shift+5 move container to workspace $ws5
bindsym $mod+Shift+6 move container to workspace $ws6
bindsym $mod+Shift+7 move container to workspace $ws7
bindsym $mod+Shift+8 move container to workspace $ws8
bindsym $mod+Shift+9 move container to workspace $ws9
bindsym $mod+Shift+0 move container to workspace $ws10
# shortcut applications
# bindsym Print exec --no-startup-id gnome-screenshot
# bindsym $mod+Print exec --no-startup-id gnome-screenshot -a
# bindsym $mod+Shift+x exec --no-startup-id i3lock-fancy -f Source-Sans-Pro
# volume
# bindsym XF86AudioLowerVolume exec --no-startup-id amixer -q -D pulse sset Master 5%- unmute
# bindsym XF86AudioRaiseVolume exec --no-startup-id amixer -q -D pulse sset Master 5%+ unmute
# bindsym XF86AudioMute exec --no-startup-id amixer -q -D pulse sset Master toggle
# notification
# bindsym Ctrl+space exec --no-startup-id dunstctl close
# bindsym Ctrl+Shift+space exec --no-startup-id dunstctl close-all
# bindsym Ctrl+grave exec --no-startup-id dunstctl history-pop
# bindsym Ctrl+Shift+period exec --no-startup-id dunstctl context
# resize window
bindsym $mod+r mode " "
mode " " {
bindsym $left resize shrink width 5 px or 5 ppt
bindsym $down resize grow height 5 px or 5 ppt
bindsym $up resize shrink height 5 px or 5 ppt
bindsym $right resize grow width 5 px or 5 ppt
# back to normal: Enter or Escape or $mod+r
bindsym Return mode "default"
bindsym Escape mode "default"
bindsym $mod+r mode "default"
}
# set specific windows to floating mode
for_window [window_role="app"] floating enable
for_window [window_role="pop-up"] floating enable
for_window [window_role="task_dialog"] floating enable
for_window [title="Preferences$"] floating enable
# class border backgr. text indicator child_border
client.focused #2b83a6 #2b83a6 #ffffff #dddddd #2b83a6
client.focused_inactive #212121 #212121 #86888c #292d2e #5a5a5a
client.unfocused #212121 #212121 #86888c #292d2e #5a5a5a
client.urgent #d64e4e #d64e4e #ffffff #d64e4e #d64e4e
client.placeholder #212121 #0c0c0c #ffffff #212121 #262626
client.background #212121
# start i3bar to display a workspace bar
bar {
status_command i3status --config ~/.config/i3status/config
# status_command i3blocks -c ~/dotfiles/i3blocks/config
bindsym button4 nop
bindsym button5 nop
position bottom
tray_output primary
separator_symbol "·"
workspace_buttons yes
strip_workspace_numbers yes
colors {
background #212121
statusline #dddddd
separator #666666
# class border backgr. text
focused_workspace #2b83a6 #2b83a6 #ffffff
active_workspace #212121 #212121 #ffffff
inactive_workspace #212121 #212121 #86888c
urgent_workspace #d64e4e #d64e4e #ffffff
binding_mode #229c56 #229c56 #ffffff
}
}
# local config file
include local.conf
# startup applications
# exec_always --no-startup-id xautolock -time 10 -locker "i3lock-fancy -f Source-Sans-Pro"
# exec_always --no-startup-id nm-applet
# exec_always --no-startup-id pulseaudio --start
# exec_always --no-startup-id lxpolkit
# exec_always --no-startup-id feh --bg-fill ~/Public/desktop/dark_planet_minimalist.png
# exec_always --no-startup-id picom
# Start XDG autostart .desktop files using dex. See also
# https://wiki.archlinux.org/index.php/XDG_Autostart
exec --no-startup-id dex --autostart --environment i3
# Shortcut for Lockscreen
set $lock_script /home/$USER/.config/scripts/lock
bindsym $mod+x exec $lock_script
# xss-lock grabs a logind suspend inhibit lock and will use i3lock to lock the
# screen before suspend. Use loginctl lock-session to lock your screen.
exec --no-startup-id xss-lock --transfer-sleep-lock -- $lock_script --nofork
# NetworkManager is the most popular way to manage wireless networks on Linux,
# and nm-applet is a desktop environment-independent system tray GUI for it.
exec --no-startup-id nm-applet
# Initiate wallpaper
exec_always nitrogen --restore
# Transparency with picom compositor
exec_always picom -f
# Set keyboard repeat rate
exec --no-startup-id xset r rate 200 35
#
#
#
# Use pactl to adjust volume in PulseAudio.
# set $refresh_i3status killall -SIGUSR1 i3status
# bindsym XF86AudioRaiseVolume exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ +10% && $refresh_i3status
# bindsym XF86AudioLowerVolume exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ -10% && $refresh_i3status
# bindsym XF86AudioMute exec --no-startup-id pactl set-sink-mute @DEFAULT_SINK@ toggle && $refresh_i3status
# bindsym XF86AudioMicMute exec --no-startup-id pactl set-source-mute @DEFAULT_SOURCE@ toggle && $refresh_i3status
# ----------------------------
# CUSTOM KEYS
# ----------------------------
# Pulse Audio controls
bindsym XF86AudioRaiseVolume exec --no-startup-id amixer -D pulse sset Master 5%+ #increase sound volume
bindsym XF86AudioLowerVolume exec --no-startup-id amixer -D pulse sset Master 5%- #decrease sound volume
bindsym XF86AudioMute exec --no-startup-id amixer -D pulse set Master 1+ toggle # mute sound
# Sreen brightness controls
bindsym XF86MonBrightnessUp exec xbacklight -inc 10 # increase screen brightness
bindsym XF86MonBrightnessDown exec xbacklight -dec 10 # decrease screen brightness