updates to tiling
This commit is contained in:
parent
0680b63126
commit
7c4101d064
8 changed files with 122 additions and 13 deletions
16
home/tiling/waybar/config/scripts/brightness.sh
Executable file
16
home/tiling/waybar/config/scripts/brightness.sh
Executable file
|
|
@ -0,0 +1,16 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
MAX=500
|
||||
|
||||
current=$(brightnessctl g)
|
||||
|
||||
# Guard against empty or non-numeric output
|
||||
if ! [[ "$current" =~ ^[0-9]+$ ]]; then
|
||||
echo "brightnessctl returned invalid value" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
percentage=$(( current * 100 / MAX ))
|
||||
|
||||
echo "bright ${percentage}%"
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue