]> git.friedersdorff.com Git - max/saltfiles.git/blobdiff - states/sway/files/config.jinja
Some more configuration
[max/saltfiles.git] / states / sway / files / config.jinja
index 6a3a8e048a2f83408a76e6ae320be1ab3f4ed483..ac0da0fc34a50897115e69bd0ff01de8f07ccdd2 100644 (file)
@@ -74,6 +74,14 @@ output * bg /usr/share/backgrounds/sway/Sway_Wallpaper_Blue_1920x1080.png fill
 # your displays after another 300 seconds, and turn your screens back on when
 # resumed. It will also lock your screen before your computer goes to sleep.
 
+{% set lockcmd = "swaylock -e -f -i ~/Pictures/Backgrounds/DSC02113.jpg" %}
+
+exec swayidle -w \
+timeout 300 "{{lockcmd}}" \
+  timeout 600 'systemctl suspend' \
+    before-sleep "{{lockcmd}}"
+
+
 ### Input configuration
 #
 # Example configuration:
@@ -260,6 +268,8 @@ mode "resize" {
 }
 bindsym $mod+r mode "resize"
 
+bindsym $mod+Alt+l exec '{{ lockcmd }}'
+
 
 include /etc/sway/config.d/*
 # host specific section