aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--dot-config/sway/config10
1 files changed, 10 insertions, 0 deletions
diff --git a/dot-config/sway/config b/dot-config/sway/config
index 89d0576..ee05c0c 100644
--- a/dot-config/sway/config
+++ b/dot-config/sway/config
@@ -12,6 +12,8 @@
# | bemenu | menu prompt
# | yambar | status bar
# | wlsunset | screen temperature
+# | swaylock | lock service
+# | swayidle | idle management
# Variables
set $mod Mod4
@@ -26,7 +28,9 @@ set $igap 20
set $ogap $igap
set $wallpaper ~/.cache/wallpaper
+set $lockwallpaper ~/.cache/lockwallpaper
exec [ -f ~/.cache/wallpaper ] || cp /usr/share/backgrounds/sway/*_1920x1080.png ~/.cache/wallpaper
+exec [ -f ~/.cache/lockwallpaper ] || cp ~/.cache/wallpaper ~/.cache/lockwallpaper
# Processes
exec brightnessctl set 40%
@@ -38,6 +42,12 @@ exec_always sh -c "pkill pipewire-pulse; pipewire-pulse"
exec_always sh -c "pkill wireplumber; wireplumber"
exec_always sh -c "pkill yambar; yambar"
+exec swayidle -w \
+ timeout 300 swaylock -Fe -i "$lockwallpaper" \
+ timeout 600 swaymsg "output * power off" \
+ resume swaymsg "output * power on" \
+ before-sleep swaylock -f -i "$lockwallpaper"
+
# Input
seat * hide_cursor when-typing enable