added quickshell and updated zsh
This commit is contained in:
12
home/hypr/quickshell/scripts/get_brightness.sh
Executable file
12
home/hypr/quickshell/scripts/get_brightness.sh
Executable file
@@ -0,0 +1,12 @@
|
||||
#!/usr/bin/env bash
|
||||
# Read brightness
|
||||
percent=100
|
||||
|
||||
if command -v brightnessctl &>/dev/null; then
|
||||
percent=$(brightnessctl -m 2>/dev/null | cut -d, -f4 | tr -d '%' | head -n 1)
|
||||
if [ -z "$percent" ]; then
|
||||
percent=100
|
||||
fi
|
||||
fi
|
||||
|
||||
echo "{\"brightness\": ${percent:-100}}"
|
||||
Reference in New Issue
Block a user