#!/bin/sh # mark this file as executable, # then change your sway config (.config/sway/) # by replacing swaystatus with this script: # # [...] # bindsym $mod+Shift+s exec ~/.config/sway/swaylock_mark # [...] swayidle -w timeout 2 'swaymsg "output * power off"' resume 'swaymsg "output * power on"' & swaylock --color 000000 kill $(jobs -p)