mirror of
https://codeberg.org/frosty/dotfiles.git
synced 2024-09-19 03:37:10 -04:00
add brightness script
This commit is contained in:
parent
62fae924ef
commit
e8a133f89b
15
.local/bin/sys-brightness
Executable file
15
.local/bin/sys-brightness
Executable file
|
@ -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"
|
Loading…
Reference in a new issue