summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSean Whitton <spwhitton@spwhitton.name>2021-04-18 19:02:34 -0700
committerSean Whitton <spwhitton@spwhitton.name>2021-04-18 19:02:34 -0700
commit4ba507371af79284eecea4a6e67f9663217ade99 (patch)
tree080c90f7e7815e0b90810d6bc5203108e8418a61
parentb3a67b966e969ccf96bfc45d0d24e7967af06d93 (diff)
downloaddotfiles-4ba507371af79284eecea4a6e67f9663217ade99.tar.gz
opaque automatic swaylock; manual still semi-transparent
-rw-r--r--.config/sway/config14
-rw-r--r--.config/sway/melete/bg12
2 files changed, 12 insertions, 14 deletions
diff --git a/.config/sway/config b/.config/sway/config
index 1440c4f4..25ca1f01 100644
--- a/.config/sway/config
+++ b/.config/sway/config
@@ -349,18 +349,4 @@ exec update-emacs-daemon-environment
exec_always fcitx5 -d --replace
-# ideally we wouldn't try to call swaylock if the screen is already locked,
-# but discovering whether swaylock is already running in a way that avoids
-# races is difficult or impossible because swaylock doesn't have a mechanism
-# to report that it's successfully locked the screen other than daemonising.
-# so, until it does, the following means a lot of "failed to lock; already
-# locked?" messages on stderr.
-exec swayidle -w \
- lock 'swaylock -f' \
- before-sleep 'swaylock -f' \
- timeout 300 'swaylock -f' \
- timeout 300 'swaymsg "output * dpms off"' resume 'swaymsg "output * dpms on"'
-
-# TODO non-transparent automatic lock, manual lock still semi-transparent?
-
include ~/.config/sway/$(hostname)/*
diff --git a/.config/sway/melete/bg b/.config/sway/melete/bg
index e6524647..53a8cdf0 100644
--- a/.config/sway/melete/bg
+++ b/.config/sway/melete/bg
@@ -1 +1,13 @@
output "eDP-1" bg $HOME/local/wallpaper.png fill
+
+# ideally we wouldn't try to call swaylock if the screen is already locked,
+# but discovering whether swaylock is already running in a way that avoids
+# races is difficult or impossible because swaylock doesn't have a mechanism
+# to report that it's successfully locked the screen other than daemonising.
+# so, until it does, the following means a lot of "failed to lock; already
+# locked?" messages on stderr.
+exec swayidle -w \
+ lock 'swaylock -f' \
+ before-sleep 'swaylock -f -i eDP-1:$HOME/local/wallpaper.png -s fill' \
+ timeout 300 'swaylock -f -i eDP-1:$HOME/local/wallpaper.png -s fill' \
+ timeout 300 'swaymsg "output * dpms off"' resume 'swaymsg "output * dpms on"'