workspace/arch-user/bin/sway/brightness-set-and-notify.sh
2025-03-30 00:04:54 +00:00

5 lines
202 B
Bash
Executable File

#!/bin/sh
brig="$(brightnessctl set "$1" -m | sed -e 's/.*,\([0-9]*\)%.*/\1/')"
notify-send -t 2000 -h "int:value:$brig" -a "brightness" "$brig%" \
-h string:x-canonical-private-synchronous:brightness