1 {% set host = grains['host'] %}
4 set $black_super #555555
10 set $green_super #9dc54b
13 set $yellow_super #d1ca89
16 set $blue_super #7accda
19 set $magenta_super #b392ef
22 set $cyan_super #c8f0f0
25 set $white_super #ffffff
27 client.focused $black $yellow_super $black $black $black
28 client.focused_inactive $black $black_super $white $black $black
30 # Slight gaps around windows
33 # Read `man 5 sway` for a complete reference.
37 # Logo key. Use Mod1 for Alt.
39 # Home row direction keys, like vim
44 # Your preferred terminal emulator
46 # Your preferred application launcher
47 # Note: pass the final command to swaymsg so that the resulting window can be opened
48 # on the original workspace that the command was run on.
49 set $menu dmenu_path | wofi --dmenu | xargs swaymsg exec --
51 include /etc/sway/config-vars.d/*
53 ### Output configuration
55 # Default wallpaper (more resolutions are available in /usr/share/backgrounds/sway/)
56 output * bg /usr/share/backgrounds/sway/Sway_Wallpaper_Blue_1920x1080.png fill
58 # Example configuration:
60 # output HDMI-A-1 resolution 1920x1080 position 1920,0
62 # You can get the names of your outputs by running: swaymsg -t get_outputs
64 ### Idle configuration
66 # Example configuration:
69 # timeout 300 'swaylock -f -c 000000' \
70 # timeout 600 'swaymsg "output * dpms off"' resume 'swaymsg "output * dpms on"' \
71 # before-sleep 'swaylock -f -c 000000'
73 # This will lock your screen after 300 seconds of inactivity, then turn off
74 # your displays after another 300 seconds, and turn your screens back on when
75 # resumed. It will also lock your screen before your computer goes to sleep.
77 {% set lockcmd = "swaylock -e -f -i ~/Pictures/Backgrounds/DSC02113.jpg" %}
80 timeout 300 "{{lockcmd}}" \
81 timeout 600 'systemctl suspend' \
82 before-sleep "{{lockcmd}}"
85 ### Input configuration
87 # Example configuration:
89 # input "2:14:SynPS/2_Synaptics_TouchPad" {
92 # natural_scroll enabled
93 # middle_emulation enabled
96 # You can get the names of your inputs by running: swaymsg -t get_inputs
97 # Read `man 5 sway-input` for more information about this section.
98 # This keyboard has this layout on all machines:
99 input 1241:36:HOLDCHIP_USB_Keyboard {
102 xkb_options ctrl:nocaps
105 input 16700:8455:DELL_Dell_USB_Entry_Keyboard {
108 xkb_options ctrl:nocaps
111 input 65261:4871:TMK/Cub_Ergodox {
115 input 9494:21:CM_Storm_Quickfire_Pro_Ultimate_6_key {
118 xkb_options ctrl:nocaps
121 input 1:1:AT_Translated_Set_2_keyboard {
124 xkb_options ctrl:nocaps
127 input 9610:4102:Gaming_KB__Gaming_KB {
130 xkb_options ctrl:nocaps
134 input 1133:49948:Logitech_USB_Keyboard {
137 xkb_options ctrl:nocaps
145 bindsym $mod+Return exec $term
147 # Kill focused window
148 bindsym $mod+Shift+q kill
150 # Start your launcher
151 bindsym $mod+d exec $menu
153 # Drag floating windows by holding down $mod and left mouse button.
154 # Resize them with right mouse button + $mod.
155 # Despite the name, also works for non-floating windows.
156 # Change normal to inverse to use left mouse button for resizing and right
157 # mouse button for dragging.
158 floating_modifier $mod normal
160 # Reload the configuration file
161 bindsym $mod+Shift+c reload
163 # Exit sway (logs you out of your Wayland session)
164 bindsym $mod+Shift+e exec swaynag -t warning -m 'You pressed the exit shortcut. Do you really want to exit sway? This will end your Wayland session.' -B 'Yes, exit sway' 'swaymsg exit'
168 # Move your focus around
169 bindsym $mod+$left focus left
170 bindsym $mod+$down focus down
171 bindsym $mod+$up focus up
172 bindsym $mod+$right focus right
173 # Or use $mod+[up|down|left|right]
174 bindsym $mod+Left focus left
175 bindsym $mod+Down focus down
176 bindsym $mod+Up focus up
177 bindsym $mod+Right focus right
179 # Move the focused window with the same, but add Shift
180 bindsym $mod+Shift+$left move left
181 bindsym $mod+Shift+$down move down
182 bindsym $mod+Shift+$up move up
183 bindsym $mod+Shift+$right move right
184 # Ditto, with arrow keys
185 bindsym $mod+Shift+Left move left
186 bindsym $mod+Shift+Down move down
187 bindsym $mod+Shift+Up move up
188 bindsym $mod+Shift+Right move right
192 # Switch to workspace
193 {% for i in range(10) %}
194 bindsym --no-repeat $mod+{{ i }} workspace number {{ i }}; exec "echo 1 > /tmp/sovpipe"
195 bindsym --release $mod+{{ i }} exec "echo 0 > /tmp/sovpipe"
197 # Move focused container to workspace
198 bindsym $mod+Shift+{{ i }} move container to workspace number {{ i }}
201 bindsym --no-repeat $mod+Shift exec "echo 1 > /tmp/sovpipe"
202 bindsym --release $mod+Shift exec "echo 0 > /tmp/sovpipe"
207 # You can "split" the current object of your focus with
208 # $mod+b or $mod+v, for horizontal and vertical splits
210 bindsym $mod+b splith
211 bindsym $mod+v splitv
213 # Switch the current container between different layout styles
214 bindsym $mod+s layout stacking
215 bindsym $mod+w layout tabbed
216 bindsym $mod+e layout toggle split
218 # Make the current focus fullscreen
219 bindsym $mod+f fullscreen
221 # Toggle the current focus between tiling and floating mode
222 bindsym $mod+Shift+space floating toggle
224 # Swap focus between the tiling area and the floating area
225 bindsym $mod+space focus mode_toggle
227 # Move focus to the parent container
228 bindsym $mod+a focus parent
232 # Sway has a "scratchpad", which is a bag of holding for windows.
233 # You can send windows there and get them back later.
235 # Move the currently focused window to the scratchpad
236 bindsym $mod+Shift+minus move scratchpad
238 # Show the next scratchpad window or hide the focused scratchpad window.
239 # If there are multiple scratchpad windows, this command cycles through them.
240 bindsym $mod+minus scratchpad show
242 # Resizing containers:
245 # left will shrink the containers width
246 # right will grow the containers width
247 # up will shrink the containers height
248 # down will grow the containers height
249 bindsym $left resize shrink width 10px
250 bindsym $down resize grow height 10px
251 bindsym $up resize shrink height 10px
252 bindsym $right resize grow width 10px
254 # Ditto, with arrow keys
255 bindsym Left resize shrink width 10px
256 bindsym Down resize grow height 10px
257 bindsym Up resize shrink height 10px
258 bindsym Right resize grow width 10px
260 # Return to default mode
261 bindsym Return mode "default"
262 bindsym Escape mode "default"
264 bindsym $mod+r mode "resize"
266 bindsym $mod+Alt+l exec '{{ lockcmd }}'
269 include /etc/sway/config.d/*
270 # host specific section
271 {%- do salt.log.error('sway/files/' + host) -%}
272 {% include 'sway/files/' + host %}
274 exec rm -f /tmp/sovpipe && mkfifo /tmp/sovpipe && tail -f /tmp/sovpipe | sov
276 for_window [app_id="zoom" title="^zoom$"] border none, floating enable
277 for_window [app_id="zoom" title="^(Zoom|About)$"] border pixel, floating enable
278 for_window [app_id="zoom" title="Settings"] floating enable, floating_minimum_size 960 x 700
279 for_window [app_id="zoom" title="Zoom Meeting(.*)?"] floating disable, inhibit_idle open