From 4ba507371af79284eecea4a6e67f9663217ade99 Mon Sep 17 00:00:00 2001 From: Sean Whitton Date: Sun, 18 Apr 2021 19:02:34 -0700 Subject: opaque automatic swaylock; manual still semi-transparent --- .config/sway/config | 14 -------------- .config/sway/melete/bg | 12 ++++++++++++ 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"' -- cgit v1.2.3