waybar: add mouse baterry indicator
This commit is contained in:
parent
910670ba0b
commit
b8cd22e425
7 changed files with 96 additions and 24 deletions
33
scripts/print-battery-icon
Executable file
33
scripts/print-battery-icon
Executable file
|
@ -0,0 +1,33 @@
|
|||
#!/bin/sh
|
||||
|
||||
set -e
|
||||
|
||||
if test $# -ne 1; then
|
||||
echo "Usage $0" >&2
|
||||
exit 1
|
||||
fi
|
||||
CAPACITY="$1"
|
||||
|
||||
if test "$CAPACITY" -ge 90; then
|
||||
echo -n ''
|
||||
elif test "$CAPACITY" -ge 90; then
|
||||
echo -n ''
|
||||
elif test "$CAPACITY" -ge 80; then
|
||||
echo -n ''
|
||||
elif test "$CAPACITY" -ge 70; then
|
||||
echo -n ''
|
||||
elif test "$CAPACITY" -ge 60; then
|
||||
echo -n ''
|
||||
elif test "$CAPACITY" -ge 50; then
|
||||
echo -n ''
|
||||
elif test "$CAPACITY" -ge 40; then
|
||||
echo -n ''
|
||||
elif test "$CAPACITY" -ge 30; then
|
||||
echo -n ''
|
||||
elif test "$CAPACITY" -ge 20; then
|
||||
echo -n ''
|
||||
elif test "$CAPACITY" -ge 10; then
|
||||
echo -n ''
|
||||
else
|
||||
echo -n ''
|
||||
fi
|
Loading…
Add table
Add a link
Reference in a new issue