This repository has been archived by the owner on Dec 5, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfig
466 lines (349 loc) · 18.6 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
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
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
# Maintainer: [email protected] / www.jeffskinnerbox.me
# Version: 0.6.0
#
# DESCRIPTION:
# i3 config file (v4)
#
# See http://i3wm.org/docs/userguide.html for a complete reference!
#
# NOTE:
# Should you change your keyboard layout at some point,
# delete this file and re-run i3-config-wizard.
#
# Use this site to find colors - http://www.infobyip.com/htmlcolorpicker.php
# ---------------------------- General Environment -----------------------------
# $mod is the configuration modifier
# Mod1 = Alt key, Mod2 = NumLock, Mod3 = ussually unassigned for US keyboard,
# Mod4 = Super or Win key, Mod5 = Mode Shift
# use "xmodmap -pm" on command line to get a listing
set $mod Mod1
# ------------------------------ Fonts and Colors ------------------------------
# border color of windows
#new_window pixel 1
#new_float pixel 1
#hide_edge_borders both
# Assign colors (Border/Background/Text/Indicator).
#client.focused #9fbc00 #9fbc00 #111111
#client.unfocused #444444 #444444 #315858
#client.focused_inactive #444444 #444444 #2c2c2f
#client.urgent #383a3b #383a3b #ee0000#
# Assign colors (Border/Background/Text/Indicator).
#client.focused #3465A4 #204A87 #EEEEEC #3465A4
#client.focused_inactive #888A85 #555753 #BABDB6 #888A85
#client.unfocused #555753 #2E3436 #BABDB6 #888A85
#client.urgent #EF2929 #CC0000 #EEEEEC #EF2929
# Font for window titles. Will also be used by the bar unless a different font
# is used in the bar {} block below. ISO 10646 = Unicode
# The font above is very space-efficient, that is, it looks good, sharp and
# clear in small sizes. However, if you need a lot of unicode glyphs or
# right-to-left text rendering, you should instead use pango for rendering and
# chose a FreeType font, such as:
#font -misc-fixed-medium-r-normal--13-120-75-75-C-70-iso10646-1
#font -dosemu-vga-medium-r-normal--17-160-75-75-c-80-ibm-cp866
#font pango:DejaVu Sans Mono 10
font pango:monospace 8
#Use Adobe’s Source Code Pro font as your default font
#font pango:Source Code Pro 12
# ------------------------ Key Bindings to Executables -------------------------
# Function Key Bindings
# create floating Chrome window
bindsym $mod+F1 exec --no-startup-id google-chrome
for_window [class="Google-chrome"] floating enable
for_window [class="Google-chrome"] border pixel 5
# create floating FireFox window
bindsym $mod+F2 exec --no-startup-id firefox
for_window [class="Firefox"] floating enable
for_window [class="Firefox"] border pixel 5
# this will not work - Multiple Instances of Gnome Terminal - https://chrisirwin.ca/posts/multiple-instances-of-gnome-terminal/
#bindsym $mod+F3 exec --no-startup-id gnome-terminal --name=floater
#for_window [class="Gnome-terminal" instance="floater"] floating enable border pixel 3
# create floating and sticky terminal window
#bindsym $mod+F4 exec --no-startup-id xterm -class Floater -geometry 104x28+363+440 -bg darkgray
#for_window [class="Floater"] floating enable
#for_window [class="Floater"] sticky enable
# create floating and sticky terminal window
#bindsym $mod+F4 exec --no-startup-id terminator --class Floater --geometry=104x28+363+440
#for_window [class="Floater"] floating enable
#for_window [class="Floater"] sticky enable
# create floating file manager window
bindsym $mod+F4 exec --no-startup-id krusader
for_window [class="Krusader"] floating enable # file manager
for_window [class="Krusader"] border pixel 5
#for_window [class="Krusader"] sticky enable
# create floating and sticky terminal window
bindsym $mod+F5 exec --no-startup-id rxvt -bg gray -geometry 104x28+363+440 -fadecolor black -fade 50
for_window [class="URxvt"] floating enable
for_window [class="URxvt"] sticky enable
# start a terminal
#bindsym $mod+Return exec --no-startup-id i3-sensible-terminal
bindsym $mod+Return exec --no-startup-id gnome-terminal
# lock screen
#bindsym Control+$mod+l exec --no-startup-id i3lock
bindsym Control+$mod+l exec --no-startup-id i3lock -eti $HOME/Pictures/Wallpaper/ZZ-Top-1920x1200.png
# ------------------- Opening Applications / Closing Windows -------------------
# start dmenu (a program launcher, app must be within $PATH)
bindsym $mod+d exec --no-startup-id 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
# close or kill the focused window
bindsym $mod+q close # this doesn't seem to work, get error message
bindsym $mod+Shift+q kill
# ----------------------------- Change Window Focus ----------------------------
# focus is moved with default keys
bindsym $mod+j focus left
bindsym $mod+k focus down
bindsym $mod+l focus up
bindsym $mod+semicolon focus right
# alternatively, you can use the cursor keys to move focus
bindsym $mod+Left focus left
bindsym $mod+Down focus down
bindsym $mod+Up focus up
bindsym $mod+Right focus right
# focus is moved to the parent container
bindsym $mod+a focus parent
# focus is moved to the child container
#bindsym $mod+d focus child
# --------------------------- Move Position of Window --------------------------
# move the window with default keys
bindsym $mod+Shift+j move left
bindsym $mod+Shift+k move down
bindsym $mod+Shift+l move up
bindsym $mod+Shift+semicolon move right
# alternatively, you can use the cursor keys to move the 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
# ----------------------------- Floating Windows -------------------------------
# While dialogs should open in floating mode by default, many still open in
# tiling mode. To change this behaviour, check the dialog's WM_WINDOW_ROLE
# or WM_CLASS with the Xorg utility xprop and add the correct rules here.
for_window [window_role="pop-up"] floating enable # pop-up window
for_window [window_role="task_dialog"] floating enable # dialog window
for_window [title="Preferences$"] floating enable # preferances window
for_window [class="(?i)mplayer"] floating enable # music player
for_window [class="XTerm"] floating enable # terminal window
for_window [class="URxvt"] floating enable # terminal window
for_window [class="Nautilus"] floating enable # file manager
for_window [class="Krusader"] floating enable # file manager
for_window [class="Eog"] floating enable # image file
for_window [class="Evince"] floating enable # PDF file
for_window [class="Totem"] floating enable # video file
for_window [class="libreoffice-impress"] floating enable # LibreOffice file
for_window [class="libreoffice-writer"] floating enable # LibreOffice file
for_window [class="libreoffice-calc"] floating enable # LibreOffice file
for_window [class="VirtualBox"] floating enable # VirtualBox window
# doesn't seem to work
for_window [class="googlesmm"] floating enable # Google's Music Manager
# have window stay on screen even if you switch to another workspace
for_window [class="XTerm"] sticky enable
#for_window [class="Nautilus"] sticky enable
# use tiling mode only for main/chat Skype window and floating of all dialogs
# Skype main window title looks like this - "alexey.diyan - Skype™"
for_window [instance="skype" title="^.*?(?<!Skype™)$"] floating enable
for_window [instance="skype" title="Skype™|Call with|File Transfers"] floating disable
# ---------------------- Workspace Controls and Vairables ----------------------
# As workspaces are defined multiple times in i3, assigning workspace variables can be helpful
# named workspaces are ordered the way they appeared. When they start with a number,
# i3 will order them numerically.
#set $WS1 1:term
#set $WS2 2:web
#set $WS3 3:misc
#set $WS4 4:media
#set $WS5 5:code
# switch to workspace
bindsym $mod+1 workspace 1
bindsym $mod+2 workspace 2
bindsym $mod+3 workspace 3
bindsym $mod+4 workspace 4
bindsym $mod+5 workspace 5
bindsym $mod+6 workspace 6
bindsym $mod+7 workspace 7
bindsym $mod+8 workspace 8
bindsym $mod+9 workspace 9
bindsym $mod+0 workspace 10
# workspaces
# https://fortawesome.github.io/Font-Awesome/cheatsheet/
# https://gist.github.com/diyan/6192878
# 1 work, 2 web, 3 chat, 4 notes, 5 music, 6 vnc/rdp, 7/8 noname, 9 mail, 10 dev
######## this doesn't work correctly #############
#set $ws9 " 9 "
#bindsym $mod+9 workspace $ws9
# move focused container to workspace
bindsym $mod+Shift+1 move container to workspace 1
bindsym $mod+Shift+2 move container to workspace 2
bindsym $mod+Shift+3 move container to workspace 3
bindsym $mod+Shift+4 move container to workspace 4
bindsym $mod+Shift+5 move container to workspace 5
bindsym $mod+Shift+6 move container to workspace 6
bindsym $mod+Shift+7 move container to workspace 7
bindsym $mod+Shift+8 move container to workspace 8
bindsym $mod+Shift+9 move container to workspace 9
bindsym $mod+Shift+0 move container to workspace 10
# ------------------------- Automatic Back-and-Forth --------------------------
# For instance: Assume you are on workspace "1: www" and switch to "2: IM" using
# mod+2 because somebody sent you a message. You don’t need to remember where
# you came from now, you can just press $mod+2 again to switch back to "1: www".
workspace_auto_back_and_forth yes
# ---------------------------- Renaming Workspaces -----------------------------
# rename the current workspace by prompting the user for the name
bindsym $mod+r exec i3-input -F 'rename workspace to "%s"' -P 'New name: '
# ---------------------------- Scratchpad Controls -----------------------------
# moving and retreving windows from the scratchpad popup in float mode
# you can return it to tilling mode via toggling float mode = $mod+Shift+Space
bindsym $mod+Shift+minus move scratchpad
bindsym $mod+minus scratchpad show
# ------------------------- Container / Window Layout --------------------------
# split the container in horizontal or vertical orientation
bindsym $mod+h split h
bindsym $mod+v split v
# toggle fullscreen mode for the focused container (do again to return to tilled)
bindsym $mod+f fullscreen toggle
# change container layout (stacked, tabbed, toggle split) on the display
bindsym $mod+s layout stacking
bindsym $mod+w layout tabbed
bindsym $mod+e layout toggle split
# ------------------------------- Jump to Window -------------------------------
# Get me to the next open VIM instance
# https://i3wm.org/docs/userguide.html#_jumping_to_specific_windows
#bindsym $mod+b [title="Vim"] focus
# ------------------------ Tilling / Floating Controls -------------------------
# When holding the modifier, you can resize a window by pressing the right mouse button and move mouse.
# If you hold the shift button as well, the resize will preserve the aspect ratio.
floating_modifier $mod
# toggle tiling / floating
bindsym $mod+Shift+space floating toggle
# change focus between tiling / floating windows
bindsym $mod+space focus mode_toggle
# min and max size of floating windows (width x height)
floating_minimum_size 120 x 110
floating_maximum_size 1200 x 1100 # use -1 x -1 for unconstrained size
# ---------------------- Reload / Reload / Exit Controls -----------------------
# reload the configuration file
bindsym $mod+Shift+c reload
# restart i3 in place (preserves your layout/session, can be used to upgrade i3)
bindsym $mod+Shift+r restart
# exit i3 (aka logs you out of your X session)
bindsym $mod+Shift+e exec --no-startup-id "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'"
# ---------------------------- Resze / Move Windows ----------------------------
# resize window (you can also use the mouse to drag window boundary)
mode "resize" {
# These bindings trigger as soon as you enter the resize mode
bindsym j resize shrink width 10 px or 10 ppt
bindsym k resize grow height 10 px or 10 ppt
bindsym l resize shrink height 10 px or 10 ppt
bindsym semicolon 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" <---- being $mod+r being used to rename workspace
# Move floating container to the center of all outputs
bindsym $mod+c move absolute position center
# --------------------------------- Status Bar ---------------------------------
# Start i3bar to display a workspace bar (plus the system information i3status finds out, if available)
bar {
status_command i3status --config ~/.i3status.conf
position bottom
workspace_buttons yes
strip_workspace_numbers no
font pango:DejaVu Sans Mono, Ionicons, FontAwesome 8
separator_symbol " | "
colors {
background #000000
statusline #33aaff
separator #666666
focused_workspace #11aaff #005500
active_workspace #11aaff #005500
urgent_workspace #ffffff #990000
}
}
# -------------------- Logout / Suspend / Reboot / Shutdown --------------------
# http://www.circuidipity.com/i3-tiling-window-manager.html
#https://wiki.archlinux.org/index.php/i3#Save_and_restore_the_window_layout
#set $Locker i3lock && sleep 1
#set $mode_system System (l) lock, (e) logout, (s) suspend, (r) reboot, (Shift+s) shutdown
#mode "$mode_system" {
# bindsym l exec --no-startup-id $Locker, mode "default"
# bindsym e exec --no-startup-id i3-msg exit, mode "default"
# bindsym s exec --no-startup-id $Locker && sync && systemctl suspend, mode "default"
# bindsym r exec --no-startup-id systemctl reboot, mode "default"
# bindsym Shift+s exec --no-startup-id systemctl poweroff -i, mode "default"
#
## back to normal: Enter or Escape
# bindsym Return mode "default"
# bindsym Escape mode "default"
#}
#bindsym $mod+Pause mode "$mode_system"
# ------------------------ Arrange Containers / Windows ------------------------
# Layout mode for new containers
#workspace_layout tabbed
# ----------------------------- Screenshots Tools ------------------------------
# To see the image captured, use feh ~/.i3/latest-screenshot.png or eog ~/.i3/latest-screenshot.png
# Take a screenshot of entire desktop
bindsym --release Print exec --no-startup-id import -window root $HOME/.i3/latest-screenshot.png
# Take a screenshot of active window ...(put mouse in window and then click mouse)
# Take a screenshot of selected area...(click and drag mouse)
bindsym --release Shift+Print exec --no-startup-id import $HOME/.i3/latest-screenshot.png
# -------------------------- Screen Display Wallpaper --------------------------
# set the background to some wallpaper
#exec --no-startup-id "feh --bg-scale $HOME/Pictures/Wallpaper/Circuit-Board-Wallpaper.png"
#exec --no-startup-id feh --no-xinerama --image-bg black --bg-fill --randomize ~/Pictures/Wallpaper/*
exec --no-startup-id feh --no-xinerama --image-bg black --bg-fill $HOME/Pictures/Wallpaper/i3-wallpaper-1.png
# ----------------------- Launch Background Applications -----------------------
# set energy star feature to On and wait 2 minutes of inactivity to turn off the screens
# wait 10 minutes of inactivity before launching the screenlocker i3lock
exec --no-startup-id xset dpms 120
exec --no-startup-id xautolock -time 10 -locker 'i3lock --color=806060 --beep --tiling --image $HOME/Pictures/Wallpaper/ZZ-Top-1920x1200.png'
# ----------------------- Launch Foreground Applications -----------------------
# Launch initial applications in their respective workspaces.
# See: https://wiki.archlinux.org/index.php/i3#Save_and_restore_the_window_layout
#exec --no-startup-id ~/.i3/load_chat.sh &
#exec --no-startup-id ~/.i3/load_term.sh &
# --------------------- Auto-Start Layout and Applications ---------------------
# to save workspace 1's layout, use i3-save-tree --workspace 1 > ~/.i3/workspace-1.json
# for more information: http://i3wm.org/docs/layout-saving.html
# xprop tool can be used to get WM_CLASS, WM_NAME properties
#assign [class="^gnome-terminal$"] 10
#exec_always gnome-terminal
# workspace called 1
#exec --no-startup-id "i3-msg workspace 1; exec gnome-terminal"
#exec --no-startup-id "i3-msg workspace 1; exec nautilus --browser $HOME"
exec --no-startup-id "i3-msg workspace 1; exec krusader"
# workspace called 2:Web
#exec --no-startup-id "i3-msg 'workspace 2:Web; exec --no-startup-id google-chrome https://i3wm.org/docs/userguide.html; exec --no-startup-id gnome-terminal'"
exec --no-startup-id "i3-msg workspace 2:Web"
#assign [class="^Google-chrome$"] → 2:Web
exec --no-startup-id i3-msg "workspace 2:Web; exec google-chrome https://getpocket.com/a/queue/"
exec --no-startup-id i3-msg "workspace 2:Web; exec gnome-terminal"
exec --no-startup-id i3-msg "workspace 2:Web; exec gnome-terminal"
# workspace called 3:Chat
#exec --no-startup-id "i3-msg 'workspace 3:Chat; exec --no-startup-id scudcloud; exec --no-startup-id gnome-terminal'"
#exec --no-startup-id "i3-msg workspace 3:Chat"
#exec --no-startup-id "i3-msg exec --no-startup-id scudcloud"
#exec --no-startup-id "i3-msg exec --no-startup-id gnome-terminal"
exec --no-startup-id "i3-msg workspace 3:Chat"
assign [class="^Scudcloud$"] → 3:Chat
exec --no-startup-id "i3-msg 'workspace 3:Chat; exec scudcloud'"
exec --no-startup-id "i3-msg 'workspace 3:Chat; exec gnome-terminal'"
# workspace called 4:Blog
exec --no-startup-id "i3-msg workspace 4:Blog"
exec --no-startup-id i3-msg "workspace 4:Blog; exec gnome-terminal --working-directory='/home/jeff/blogging/content/ideas/'"
exec --no-startup-id i3-msg "workspace 4:Blog; exec gnome-terminal --working-directory='/home/jeff/blogging/content/ideas/'"
exec --no-startup-id i3-msg "workspace 4:Blog; exec --no-startup-id google-chrome --new-window https://openwrt.org/"
# workspace called 5:i3-Dev
#exec --no-startup-id "i3-msg 'workspace 5:i3-Dev; append_layout /home/jeff/.i3/workspace-5.json'"
exec --no-startup-id "i3-msg workspace 5:i3-Dev"
exec --no-startup-id i3-msg "workspace 5:i3-Dev; exec gnome-terminal"
exec --no-startup-id i3-msg "workspace 5:i3-Dev; exec gnome-terminal --working-directory='/home/jeff/.i3/' --execute vim -p config README.md"
exec --no-startup-id i3-msg "workspace 5:i3-Dev; exec google-chrome --new-window https://i3wm.org/docs/userguide.html"
# go back to workspace 1
#exec --no-startup-id "i3-msg workspace 1"
exec --no-startup-id i3-msg "workspace 1"