aboutsummaryrefslogtreecommitdiff
path: root/dotfiles/.config/sway/config
blob: 94b0de9a2e0dfa65c996a92313a0a6b7262dd071 (plain)
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
# vim: filetype=i3
# i3 config file (v4)
# Please see http://i3wm.org/docs/userguide.html for a complete reference!

# Set mod key (Mod1=<Alt>, Mod4=<Super>)
set $mod Mod4
set $term termite
set $browser "qutebrowser"

# set default desktop layout (default is tiling)
# workspace_layout tabbed <stacking|tabbed>

# Configure border style <normal|1pixel|pixel xx|none|pixel>
default_border pixel 2
default_floating_border pixel 2

# Hide borders
hide_edge_borders both

# Font for window titles. Will also be used by the bar unless a different font
# is used in the bar {} block below.
font pango:BlexMono Nerd Font Mono 10

# Use Mouse+$mod to drag floating windows
floating_modifier $mod

# GTK theme and icons
set $gnome-schema org.gnome.desktop.interface
exec_always {
  gsettings set $gnome-schema gtk-theme 'oomox-materia-dark'
  gsettings set $gnome-schema icon-theme 'Papirus-Dark'
}

##### Startup scripts and programs #####
# Waybar
exec --no-startup-id waybar_launch
# KDE Connect
exec --no-startup-id kdeconnect-indicator
# music daemon
exec --no-startup-id mpd
# Bluetooth adapter applet
exec_always --no-startup-id blueman-applet
# Motification handler
exec --no-startup-id mako

# Workspace names
# to display names or symbols instead of plain workspace numbers you can use
# something like: set $ws1 1:mail
#                 set $ws2 2:
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
set $ws10 10

# Open applications on specific workspaces
# assign [class="Thunderbird"] $ws1
# assign [class="Pale moon"] $ws2
# assign [class="Pcmanfm"] $ws3
# assign [class="Skype"] $ws5

# Open specific applications in specific modes
for_window [title="alsamixer"] floating enable
for_window [title="ncpamixer"] floating enable
for_window [title="nmtui"] floating enable
for_window [title="i3_help"] floating enable, sticky enable
for_window [class="Lightdm-settings"] floating enable
for_window [class="Lxappearance"] floating enable, sticky enable
for_window [class="Nitrogen"] floating enable, sticky enable
for_window [class="Pavucontrol"] floating enable
for_window [class="qt5ct"] floating enable, sticky enable
for_window [class="Qtconfig-qt4"] floating enable, sticky enable
for_window [class="(?i)System-config-printer.py"] floating enable
for_window [title="wl-clipboard"] floating enable

# Webcam window
for_window [title="mpvfloat"] floating enable, sticky enable
no_focus [title="mpvfloat"]

# Dropdown-like windows

# VK Messenger
for_window [instance="vk" window_role="browser-window"] floating enable, sticky enable
# for_window [class="VK"] move scratchpad

# Telegram Desktop
for_window [app_id="telegramdesktop"] floating enable, sticky enable
# for_window [class="TelegramDesktop"] move scratchpad

# Quake-like Terminal dropdown
for_window [title="quakemite"] floating enable, sticky enable
for_window [title="quakemite"] border none

# switch to workspace with urgent window automatically
# for_window [urgent=latest] focus

# Theme colors
# class                   border  backgr. text    indic.  child_border
  client.focused          #212121 #1B1E25 #7FAC96 #81acc1 #434C5E
  client.focused_inactive #000000 #3B4252 #D8DEE9 #1d2021 #1B1E25
  client.unfocused        #000000 #3B4252 #D8DEE9 #1d2021 #1B1E25
  client.urgent           #CB4B16 #FDF6E3 #1ABC9C #268BD2 #CB4B16
  client.placeholder      #FFFFFF #0C0C0C #FFFFFF #FFFFFF #3F6E90

  client.background       #2B2C2B

# hide/unhide i3status bar
# bindsym $mod+m bar mode toggle

# Trackpoint (Thinkpad)
input 2:10:TPPS/2_IBM_TrackPoint pointer_accel 1

# Outputs
output "*" background ~/.config/wall1.png fill
# Laptop display
output "eDP-1" scale 1.6 pos 0 0 scale_filter smart

# Keymaps
input * xkb_layout "us,es,ru"
input * xkb_options "lv3:ralt_switch,grp:alt_shift_toggle,misc:typo,caps:escape,grp_led:scroll"

# Set inner/outer gaps
gaps inner 15
gaps outer 0

# Smart gaps (gaps used if only more than one container on the workspace)
# smart_gaps on

# Smart borders (draw borders around container only if it is not the only container on this workspace)
# on|no_gaps (on=always activate and no_gaps=only activate if the gap size to the edge of the screen is 0)
smart_borders on

##### Bindsyms (layout-independent) #####
bindsym --to-code {

    # change borders
    $mod+u border none
    $mod+y border pixel 2
    $mod+n border normal

    # start a terminal
    $mod+Return exec $term

    # kill focused window
    $mod+Shift+q kill
    $mod+q kill

    # start program launcher
    $mod+d exec --no-startup-id menurun
    # start program launcher (force through XWayland)
    $mod+Ctrl+d exec --no-startup-id menuxrun

    # Mako (notifications)
    $mod+Ctrl+space exec "makoctl dismiss"
    # $mod+Ctrl+grave exec "makoctl list"

    # Screen brightness controls
    XF86MonBrightnessUp exec "xbacklight -inc 5 -fps 30"
    XF86MonBrightnessDown exec "xbacklight -dec 5 -fps 30"
    $mod+Ctrl+Up exec "xbacklight -inc 5 -fps 30"
    $mod+Ctrl+Down exec "xbacklight -dec 5 -fps 30"

    # Media keys
    XF86AudioPrev		exec --no-startup-id "lmc prev"
    XF86AudioPlay		exec --no-startup-id "lmc toggle"
    XF86AudioNext		exec --no-startup-id "lmc next"
    XF86AudioRaiseVolume		exec --no-startup-id lmc up 5
    XF86AudioLowerVolume		exec --no-startup-id lmc down 5
    XF86AudioMute exec --no-startup-id lmc mute

    $mod+F5     		exec lmc prev
    $mod+F6     		exec lmc toggle
    $mod+F7     		exec lmc next

    # Start Applications
    $mod+Shift+w exec --no-startup-id $browser
    $mod+F2 exec menumako
    $mod+F3 exec menudisplay
    $mod+F4 exec menublk
    $mod+r exec kitty -e ranger
    $mod+s exec "xway steam"
    $mod+m exec $term -e ncmpcpp
    $mod+Ctrl+v exec $term -e vis
    $mod+o exec --no-startup-id notistats
    $mod+c exec --no-startup-id camtoggle
    $mod+grave exec --no-startup-id menuducksearch
    $mod+Shift+grave exec --no-startup-id menuemoji
    $mod+F1 exec --no-startup-id zathura ~/.config/i3/i3guide.pdf

    # Network management
    $mod+Shift+c exec togglevpn
    # Network management
    $mod+Shift+n exec $term -e 'nmtui'

    # Screenshot and recording
    Print exec --no-startup-id menugrim -q
    $mod+Print exec --no-startup-id menugrim
    Shift+Print exec --no-startup-id swayrecord

    # Sound
    $mod+Shift+m exec $term -e 'ncpamixer'
    $mod+Ctrl+m exec --no-startup-id menuoutput

    # Applications that start with no gaps
    $mod+g		exec --no-startup-id gimp; gaps inner current set 0; gaps outer current set 0
    $mod+i		exec --no-startup-id inkscape; gaps inner current set 0; gaps outer current set 0

    # Dropdown/scratchpad applications
    $mod+Shift+v exec --no-startup-id ddvk
    $mod+Shift+t exec --no-startup-id ddtelegram
    $mod+Shift+p exec --no-startup-id ddquakemite

    #focus_follows_mouse no

    # Sticky float to bottom left
    $mod+Ctrl+b floating toggle; sticky toggle; exec --no-startup-id bottomleft
    $mod+Shift+b floating toggle; sticky toggle; exec --no-startup-id bottomright

    # change focus
    $mod+h focus left
    $mod+j focus down
    $mod+k focus up
    $mod+l focus right

    # alternatively, you can use the cursor keys:
    $mod+Left focus left
    $mod+Down focus down
    $mod+Up focus up
    $mod+Right focus right

    # move focused window
    $mod+Shift+h move left
    $mod+Shift+j move down
    $mod+Shift+k move up
    $mod+Shift+l move right

    # alternatively, you can use the cursor keys:
    $mod+Shift+Left move left
    $mod+Shift+Down move down
    $mod+Shift+Up move up
    $mod+Shift+Right move right

    # split orientation
    $mod+b split h;exec notify-send 'tile horizontally'
    $mod+v split v;exec notify-send 'tile vertically'

    # toggle fullscreen mode for the focused container
    $mod+f fullscreen toggle

    # change container layout (stacked, tabbed, toggle split)
    # $mod+s layout stacking
    $mod+w layout tabbed
    $mod+e layout toggle split

    # toggle tiling / floating
    $mod+Shift+space floating toggle

    # change focus between tiling / floating windows
    $mod+space focus mode_toggle

    # toggle sticky
    $mod+Shift+s sticky toggle

    # move the currently focused window to the scratchpad
    $mod+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.
    $mod+minus scratchpad show

    #navigate workspaces next / previous
    $mod+Tab		workspace next
    $mod+Shift+Tab		workspace prev

    # switch to workspace
    $mod+1 workspace $ws1
    $mod+2 workspace $ws2
    $mod+3 workspace $ws3
    $mod+4 workspace $ws4
    $mod+5 workspace $ws5
    $mod+6 workspace $ws6
    $mod+7 workspace $ws7
    $mod+8 workspace $ws8
    $mod+9 workspace $ws9
    $mod+0 workspace $ws10

    # Move focused container to workspace
    $mod+Ctrl+1 move container to workspace $ws1
    $mod+Ctrl+2 move container to workspace $ws2
    $mod+Ctrl+3 move container to workspace $ws3
    $mod+Ctrl+4 move container to workspace $ws4
    $mod+Ctrl+5 move container to workspace $ws5
    $mod+Ctrl+6 move container to workspace $ws6
    $mod+Ctrl+7 move container to workspace $ws7
    $mod+Ctrl+8 move container to workspace $ws8
    $mod+Ctrl+9 move container to workspace $ws9
    $mod+Ctrl+0 move container to workspace $ws10

    # Move to workspace with focused container
    $mod+Shift+1 move container to workspace $ws1; workspace $ws1
    $mod+Shift+2 move container to workspace $ws2; workspace $ws2
    $mod+Shift+3 move container to workspace $ws3; workspace $ws3
    $mod+Shift+4 move container to workspace $ws4; workspace $ws4
    $mod+Shift+5 move container to workspace $ws5; workspace $ws5
    $mod+Shift+6 move container to workspace $ws6; workspace $ws6
    $mod+Shift+7 move container to workspace $ws7; workspace $ws7
    $mod+Shift+8 move container to workspace $ws8; workspace $ws8
    $mod+Shift+9 move container to workspace $ws9; workspace $ws9
    $mod+Shift+0 move container to workspace $ws10; workspace $ws10

    # reload the configuration file
    $mod+Shift+r reload

    # restart waybar
    $mod+Ctrl+r exec --no-startup-id waybar_launch

    # Shut down, restart and locking features
    $mod+Shift+e exec menusession

    $mod+Shift+y exec --no-startup-id swayresize left
    $mod+Shift+u exec --no-startup-id swayresize down
    $mod+Shift+i exec --no-startup-id swayresize up
    $mod+Shift+o exec --no-startup-id swayresize right


    # Lock screen
    $mod+x exec --no-startup-id lock-color

    $mod+a			gaps inner current plus 5
    $mod+Shift+a		gaps inner current minus 5
    $mod+Shift+d		gaps inner current set 0; gaps outer current set 0
    $mod+t		gaps inner current set 18; gaps outer current set 0
    $mod+z			gaps outer current plus 5
    $mod+Shift+z		gaps outer current minus 5
}

# bar {
    # position top
    # separator_symbol  "|"

    # status_command i3blocks

    # colors {
        # statusline #ffffff
        # background #000000AA
        # active_workspace #689d6a #323232 #689d6a
        # focused_workspace #8ec07c #689d6a #ffffff
    # }
# }