Skip to content
Permalink
Browse files

different battery styles

  • Loading branch information
neeasade committed Mar 16, 2020
1 parent 5426ae0 commit 12a46ad39227460d3ab47e56db778f1c2adb0450
Showing with 12 additions and 7 deletions.
  1. +3 −1 templates/zathura
  2. +9 −6 wm/.wm/panel/lemons/battery
@@ -1,4 +1,6 @@

# todo: steal from noctuid to get a colemak pdf experience

# note font format
set font "Cantarell 8"
set default-bg "#{{background}}" #00
@@ -34,4 +36,4 @@ set recolor "true"

# setting recolor-keep true will keep any color your pdf has.
# if it is false, itll just be black and white
set recolor-keephue "false"
set recolor-keephue "false"
@@ -1,15 +1,18 @@
#!/bin/sh

icon battery
# icon battery

BATC=/sys/class/power_supply/BAT0/capacity
BATS=/sys/class/power_supply/BAT0/status

if [ -f $BATC ]; then
[ "$(cat $BATS)" = "Charging" ] && echo -n '+' || echo -n '-'
cat $BATC

# compact:
# printf '%s%s\n' $(iif '[ "$(cat $BATS)" = "Charging" ]' \+ \-) $(cat $BATC)

printf '%s%s\n' $(iif '[ "$(cat $BATS)" = "Charging" ]' \+ '') $(mkb $(cat $BATC) 20)
else
# no battery information found.
# TODO: plugged in icon if full
echo '+100'
# no battery information found.
# TODO: plugged in icon if full
echo '+100'
fi

0 comments on commit 12a46ad

Please sign in to comment.
You can’t perform that action at this time.