aboutsummaryrefslogtreecommitdiff
path: root/.config/swayrbar/scripts/brightness-status
diff options
context:
space:
mode:
Diffstat (limited to '.config/swayrbar/scripts/brightness-status')
-rwxr-xr-x.config/swayrbar/scripts/brightness-status14
1 files changed, 2 insertions, 12 deletions
diff --git a/.config/swayrbar/scripts/brightness-status b/.config/swayrbar/scripts/brightness-status
index 562ee62..db93076 100755
--- a/.config/swayrbar/scripts/brightness-status
+++ b/.config/swayrbar/scripts/brightness-status
@@ -1,17 +1,7 @@
#!/usr/bin/env sh
-brightness_path=/sys/class/backlight/*/brightness
-brightness_max_path=/sys/class/backlight/*/max_brightness
-
-if [ -f "${brightness_path}" ]
-then
- brightness="$(cat $brightness_path)"
-fi
-
-if [ -f "${brightness_max_path}" ]
-then
- brightness_max="$(cat /sys/class/backlight/*/max_brightness)"
-fi
+brightness="$(cat /sys/class/backlight/*/brightness)"
+brightness_max="$(cat /sys/class/backlight/*/max_brightness)"
if [ -n "${brightness}" ] && [ -n "${brightness_max}" ]
then