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
138 bindsym $mod+Return exec $term
140 # Kill focused window
141 bindsym $mod+Shift+q kill
143 # Start your launcher
144 bindsym $mod+d exec $menu
146 # Drag floating windows by holding down $mod and left mouse button.
147 # Resize them with right mouse button + $mod.
148 # Despite the name, also works for non-floating windows.
149 # Change normal to inverse to use left mouse button for resizing and right
150 # mouse button for dragging.
151 floating_modifier $mod normal
153 # Reload the configuration file
154 bindsym $mod+Shift+c reload
156 # Exit sway (logs you out of your Wayland session)
157 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'
161 # Move your focus around
162 bindsym $mod+$left focus left
163 bindsym $mod+$down focus down
164 bindsym $mod+$up focus up
165 bindsym $mod+$right focus right
166 # Or use $mod+[up|down|left|right]
167 bindsym $mod+Left focus left
168 bindsym $mod+Down focus down
169 bindsym $mod+Up focus up
170 bindsym $mod+Right focus right
172 # Move the focused window with the same, but add Shift
173 bindsym $mod+Shift+$left move left
174 bindsym $mod+Shift+$down move down
175 bindsym $mod+Shift+$up move up
176 bindsym $mod+Shift+$right move right
177 # Ditto, with arrow keys
178 bindsym $mod+Shift+Left move left
179 bindsym $mod+Shift+Down move down
180 bindsym $mod+Shift+Up move up
181 bindsym $mod+Shift+Right move right
185 # Switch to workspace
186 bindsym $mod+1 workspace number 1
187 bindsym $mod+2 workspace number 2
188 bindsym $mod+3 workspace number 3
189 bindsym $mod+4 workspace number 4
190 bindsym $mod+5 workspace number 5
191 bindsym $mod+6 workspace number 6
192 bindsym $mod+7 workspace number 7
193 bindsym $mod+8 workspace number 8
194 bindsym $mod+9 workspace number 9
195 bindsym $mod+0 workspace number 10
196 # Move focused container to workspace
197 bindsym $mod+Shift+1 move container to workspace number 1
198 bindsym $mod+Shift+2 move container to workspace number 2
199 bindsym $mod+Shift+3 move container to workspace number 3
200 bindsym $mod+Shift+4 move container to workspace number 4
201 bindsym $mod+Shift+5 move container to workspace number 5
202 bindsym $mod+Shift+6 move container to workspace number 6
203 bindsym $mod+Shift+7 move container to workspace number 7
204 bindsym $mod+Shift+8 move container to workspace number 8
205 bindsym $mod+Shift+9 move container to workspace number 9
206 bindsym $mod+Shift+0 move container to workspace number 10
207 # Note: workspaces can have any name you want, not just numbers.
208 # We just use 1-10 as the default.
212 # You can "split" the current object of your focus with
213 # $mod+b or $mod+v, for horizontal and vertical splits
215 bindsym $mod+b splith
216 bindsym $mod+v splitv
218 # Switch the current container between different layout styles
219 bindsym $mod+s layout stacking
220 bindsym $mod+w layout tabbed
221 bindsym $mod+e layout toggle split
223 # Make the current focus fullscreen
224 bindsym $mod+f fullscreen
226 # Toggle the current focus between tiling and floating mode
227 bindsym $mod+Shift+space floating toggle
229 # Swap focus between the tiling area and the floating area
230 bindsym $mod+space focus mode_toggle
232 # Move focus to the parent container
233 bindsym $mod+a focus parent
237 # Sway has a "scratchpad", which is a bag of holding for windows.
238 # You can send windows there and get them back later.
240 # Move the currently focused window to the scratchpad
241 bindsym $mod+Shift+minus move scratchpad
243 # Show the next scratchpad window or hide the focused scratchpad window.
244 # If there are multiple scratchpad windows, this command cycles through them.
245 bindsym $mod+minus scratchpad show
247 # Resizing containers:
250 # left will shrink the containers width
251 # right will grow the containers width
252 # up will shrink the containers height
253 # down will grow the containers height
254 bindsym $left resize shrink width 10px
255 bindsym $down resize grow height 10px
256 bindsym $up resize shrink height 10px
257 bindsym $right resize grow width 10px
259 # Ditto, with arrow keys
260 bindsym Left resize shrink width 10px
261 bindsym Down resize grow height 10px
262 bindsym Up resize shrink height 10px
263 bindsym Right resize grow width 10px
265 # Return to default mode
266 bindsym Return mode "default"
267 bindsym Escape mode "default"
269 bindsym $mod+r mode "resize"
271 bindsym $mod+Alt+l exec '{{ lockcmd }}'
274 include /etc/sway/config.d/*
275 # host specific section
276 {%- do salt.log.error('sway/files/' + host) -%}
277 {% include 'sway/files/' + host %}