~alexdavid/dotfiles

ref: 691f4df051a2fbd349a8db5bea403d2bed2daea9 dotfiles/sway/config -rw-r--r-- 4.5 KiB
691f4df0 — Alex David Add firefox multi-profile generation and selection 10 months ago
                                                                                
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
# https://i3wm.org/docs/userguide.html for reference
set $mod Mod4
set $alt Mod1

font pango:SF Pro Display 12
gaps inner 10
default_border pixel 4
for_window [class="^.*"] border pixel 1
focus_wrapping false
focus_follows_mouse no
mouse_warping output
client.focused #dddddd #eeeeee #000000 #cccccc #eeeeeee5
client.unfocused #dddddd #eeeeee #000000 #cccccc #282c34e5

floating_modifier $mod

bindsym $mod+shift+g gaps inner current minus 10
bindsym $mod+g gaps inner current plus 10

bindsym --locked XF86AudioRaiseVolume exec ~/.config/sway/actions/volume-up
bindsym --locked XF86AudioLowerVolume exec ~/.config/sway/actions/volume-down
bindsym --locked XF86AudioMute exec ~/.config/sway/actions/volume-mute
bindsym --locked XF86AudioPlay exec mpc toggle
bindsym --locked XF86AudioNext exec mpc next
bindsym --locked XF86AudioPrev exec mpc prev
bindsym --locked XF86MonBrightnessUp exec ~/.config/sway/actions/brightness-up
bindsym --locked XF86MonBrightnessDown exec ~/.config/sway/actions/brightness-down

bindsym Print exec ~/.config/sway/actions/take-screenshot entire-screen
bindsym Shift+Print exec ~/.config/sway/actions/take-screenshot box
bindsym $mod+$alt+3 exec ~/.config/sway/actions/take-screenshot entire-screen
bindsym $mod+$alt+4 exec ~/.config/sway/actions/take-screenshot box
bindsym $mod+$alt+5 exec ~/.config/sway/actions/take-screenshot window

bindsym $mod+Return exec termite
bindsym $mod+n exec firefox
bindsym $mod+Shift+n exec ~/.config/firefox/launch

bindsym $mod+space exec launch
bindsym $mod+backslash exec custompassmenu
bindsym $alt+Mod4+backslash exec custompassmenu --last

bindsym $mod+Tab focus mode_toggle

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

bindsym $mod+Shift+h move left
bindsym $mod+Shift+j move down
bindsym $mod+Shift+k move up
bindsym $mod+Shift+l move right

bindsym $mod+Ctrl+h move workspace to output left
bindsym $mod+Ctrl+j move workspace to output down
bindsym $mod+Ctrl+k move workspace to output up
bindsym $mod+Ctrl+l move workspace to output right

bindsym $mod+s split v
bindsym $mod+v split h

bindsym $mod+Shift+q kill

bindsym $mod+f fullscreen toggle
bindsym $mod+z layout tabbed
bindsym $mod+e layout toggle split
bindsym $mod+Shift+f floating toggle
bindsym $mod+a focus parent

# switch to workspace
bindsym $mod+1 workspace 1:I
bindsym $mod+2 workspace 2:II
bindsym $mod+3 workspace 3:III
bindsym $mod+4 workspace 4:IV
bindsym $mod+5 workspace 5:V
bindsym $mod+6 workspace 6:VI
bindsym $mod+7 workspace 7:VII
bindsym $mod+8 workspace 8:VIII
bindsym $mod+9 workspace 9:IX

# move focused container to workspace
bindsym $mod+Shift+1 move container to workspace 1:I
bindsym $mod+Shift+2 move container to workspace 2:II
bindsym $mod+Shift+3 move container to workspace 3:III
bindsym $mod+Shift+4 move container to workspace 4:IV
bindsym $mod+Shift+5 move container to workspace 5:V
bindsym $mod+Shift+6 move container to workspace 6:VI
bindsym $mod+Shift+7 move container to workspace 7:VII
bindsym $mod+Shift+8 move container to workspace 8:VIII
bindsym $mod+Shift+9 move container to workspace 9:IX

bindsym $mod+Shift+r reload

bindsym $mod+equal exec popup-term "calc -d" 900x150

mode "resize" {
  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
  bindsym Return mode "default"
  bindsym Escape mode "default"
}

bindsym $mod+r mode "resize"

for_window [class="Pinentry"] floating enable
for_window [class="popup"] floating enable

exec mako
exec_always ~/.config/wallpaper/set-wallpaper
exec_always ~/.config/sway/screen-layouts/restore
exec swayidle -w \
      timeout 900  'swaylock -f -c 33333388' \
      timeout 300  'swaymsg "output * dpms off"' \
      resume       'swaymsg "output * dpms on"' \
      before-sleep 'swaylock -f -c 000000 && sleep 1' \
      lock         'swaylock -f -c 006d7aee'

bindswitch lid:on exec ~/.config/sway/actions/lid-close
bindswitch lid:off exec ~/.config/sway/actions/lid-open

bar {
  status_command i3blocks
  position top
  strip_workspace_numbers yes
  height 34
  font pango:SFNS Display, SystemIcons Bold 18px
  colors {
    background #282c3499
    focused_workspace #ffffff #ffffff #282a36
    active_workspace #282a36 #282a36 #ffffff
    inactive_workspace #282c3499 #282a3699 #999999
  }
}

input * {
  natural_scroll enabled
  scroll_factor 0.25
  tap enabled
  drag disabled
  repeat_delay 200
  repeat_rate 40
  xkb_options ctrl:nocaps,compose:ralt
}