Being a bit of user interface snob, I prefer tiling window managers (TWMs) over traditional floating window managers. Since the modus operandi of TWMs is complete user control and following the Unix Philosophy of
"Do one thing and do it well"
and they tend to be rather minimal. This minimalism allows users to customize the tiling window manager to their heart's content. The Arcolinux group graciously provides builds of the distribution that include specific desktop environments/window managers. I am going to concentrate this article on one:
ArcolinuxB + Qtile
The ISO includes many custom utitlities to help configure your system. However, certain decicions were made by the Arcolinux team for the sake of being able to sanely crank out of these ArcolinuxB ISOs (26 at last count) in a timely manner. One of the decisions was to use
xfce4-powermanager to handle screen blanking and
betterlockscreen to handle screen locking. They work OK, but don't actually coordinate with each other.
To correct this oversight, I installed
xidlehook, a Rust-based fork of
xautolock that adds a few new features. To this, I add my own special sauce in the form of a custom configuration, some modified settings in
archlinux-logout and the installation of a systemd service (with a second one for laptops).
Here are the steps for a desktop PC:
paru -S xidlehook
git clone https://github.com/etrigan63/twm-screenlock.git
cp ~/twm-screenlock/xidlehook/xidlehook.service ~/.config/systemd/user/
- 'cp ~/twm-screenlock/archlinux-logout/archlinux-logout.conf ~/.config/archlinux-logout/`
systemctl --user enable --now xidlehook.service
systemctl --user restart xidlehook.service(this will fix the service crashing if you restart Qtile)
- Save the file.
- Open the Control Panel (Ctrl + M)
- Click on Power Manager.
- Make sure Sleep and Hibernation are set tot Suspend.
- On the Display tab, disable screen blanking.
- Logout and login.
That will allow
xidlehook to trigger
betterlockscreen at a pre-determined interval of idle time, but not if audio or fullscreen video is playing. The screen will then blank after 30 seconds. Edit the
xidlehook.service to adjust the timeout value.
For a laptop PC, do all of the above plus the following:
sudo cp ~/twm-screenlock/betterlockscreen/[email protected] /etc/systemd/system/
sudo systemctl enable [email protected](Replace USER with your user ID).
- In the Power Manager Control Panel, make sure lid locking is set to suspend.
Now when you close your lid to suspend the machine,
betterlockscreen will be triggered before the
suspend command and when you open your lid, it will be screen locked.
Remember to clean up after yourself.