Dims your display using brightnessctl
Find a file
2024-08-23 08:07:22 +00:00
README.md Initial commit 2024-08-23 08:07:22 +00:00
swaydim.py Initial commit 2024-08-23 08:07:22 +00:00
UNLICENSE Initial commit 2024-08-23 08:07:22 +00:00

swaydim

Dims your display using brightnessctl

Usage

swaydim dims your display and by running swaydim again it sets the display brightness like it was before.

For example in use with sway and swayidle:

# ~/.config/sway/config
exec swayidle -w \
	timeout 150 "swaydim" resume "swaydim" \
	timeout 300 "swaylock -f -c 000000 -F -k -l" \
	timeout 600 'swaymsg "output * power off"' resume 'swaymsg "output * power on"' \
	before-sleep "swaylock -p -f -c 000000 -F -k -l" \

Installation

On Arch Linux, you may want to install the AUR package

On other systems, you can install the file to your $PATH.

But you should consider packaging swaydim to your distribution!

sudo curl -L https://codeberg.org/fossdd/swaydim/raw/branch/main/swaydim.py -o /usr/local/bin/swaydim

License

Unlicense