Add eww/sh/values/brightness.sh
This commit is contained in:
parent
92a972a047
commit
163c2f51d9
20
eww/sh/values/brightness.sh
Normal file
20
eww/sh/values/brightness.sh
Normal file
@ -0,0 +1,20 @@
|
||||
#!/bin/bash
|
||||
|
||||
b=$(xbacklight -get);
|
||||
|
||||
if [[ $b -le 1 ]]; then
|
||||
b=0;
|
||||
s="empty";
|
||||
else
|
||||
s="low";
|
||||
if [[ $b -gt 35 ]]; then
|
||||
s="med"; fi
|
||||
if [[ $b -gt 50 ]]; then
|
||||
s="high"; fi
|
||||
if [[ $b -gt 80 ]]; then
|
||||
s="vhigh"; fi
|
||||
if [[ $b -eq 100 ]]; then
|
||||
s="full"; fi
|
||||
fi
|
||||
|
||||
echo "{\"level\":\"$b\",\"status\":\"$s\",\"icon\":\"\"}"
|
Loading…
Reference in New Issue
Block a user