It turns out that the idle-inhibitor provided by sway only works
with views (application windows), i.e. inhibition cannot be run
on empty workspaces because they do not contain views.
Also, when switching between different workspaces, the views of
the previous workspace may have idle inhibitors, causing inhibition
to be active even if no sound is played until the old views are
updated. To update the old views, it is necessary to switch to the
appropriate workspace and wait for the script to execute, which
will remove the inhibitors that is incorrect and inconvenient.
This patch introduces a new inhibit method based on
systemd-inhibit, which has none of the above problems.
Running a screensaver is a very important security feature.
It is necessary that it always works and does not depend on the
state of the user's directories, so the screensaver run-script
should be placed in the system directory.
However, the locking process remains customizable because the user
script can be used too.
The service enables or disables swayidle inhibition depending on
whether any audio plays or not. It replaces the activation of
inhibition for fullscreen browser windows.
As stated in the ssh-agent manual, running desktop-manager as a fork of ssh-agent
is a possible way to configure the agent and pass its socket to all underlying processes.
A similar trick is used in LMDE.
Before entering sleep mode, make sure that the swayidle is waiting for all commands to be completed. This prevents unprotected content from briefly flashing on the laptop screen when it wakes up.
systemd integration for Sway is cool, but introduces a lot of
unexpected problems, such as race conditions. So switch back to classic
config-based systemd for autostarting services until all major problems
with systemd integration (sway-systemd) will resolved
This is also removes the ability to substitute system-wide Waybar config
with our own, because Waybar's systemd unit file doesn't provide
such functional. Default Waybar config is now placed in ~/.config/waybar/