From e8a133f89b5c1550ad1709ac339c411d0cc8241a Mon Sep 17 00:00:00 2001 From: frosty Date: Tue, 10 Sep 2024 01:05:50 +0000 Subject: [PATCH] add brightness script --- .local/bin/sys-brightness | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100755 .local/bin/sys-brightness diff --git a/.local/bin/sys-brightness b/.local/bin/sys-brightness new file mode 100755 index 0000000..7c61322 --- /dev/null +++ b/.local/bin/sys-brightness @@ -0,0 +1,15 @@ +#!/bin/sh + +set -eu + +NOTIFY_ID=9990 + +amount=$1 +device=$2 +name=$3 + +brightness=$(brightnessctl -md "$device" s "$amount") +brightness=${brightness#*,*,*,} +brightness=${brightness%\%,*} + +notify-send -u low -r "$NOTIFY_ID" -h int:value:"$brightness" "$name Brightness"