From 4b738deb2686385938c85b3fc3ce06e9d51fb484 Mon Sep 17 00:00:00 2001 From: Przemek Grondek Date: Thu, 10 Aug 2023 00:51:55 +0200 Subject: [PATCH] Add brightness script --- bin/brightness | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100755 bin/brightness diff --git a/bin/brightness b/bin/brightness new file mode 100755 index 0000000..10c0e04 --- /dev/null +++ b/bin/brightness @@ -0,0 +1,18 @@ +#!/usr/bin/env sh + +set -x + +DEVICE=pulse +NAME=Master +URGENCY=low +EXPIRE=5000 + +brightnessctl $@ + +LEVEL=$(brightnessctl -m | awk -F, '{print $4}' | tr -d %) + +notify-send -u $URGENCY \ + -h "int:value:$LEVEL" \ + -h string:x-dunst-stack-tag:brightness_notif \ + -t $EXPIRE \ + "BRIGHTNESS: $LEVEL"