Skip to content

Commit

Permalink
batterybar: use injected properties
Browse files Browse the repository at this point in the history
  • Loading branch information
kb100 committed Jun 1, 2018
1 parent 0167145 commit e0bd55f
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 6 deletions.
14 changes: 13 additions & 1 deletion batterybar/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,21 @@ Left-clicking briefly shows the battery level in percent.

```ini
[batterybar]
command=$SCRIPT_DIR/batterybar #run batterybar -h for options
command=$SCRIPT_DIR/batterybar
label=bat:
interval=5
markup=pango
min_width=bat: ■■■■■
# Discharging colors low to high
#C1=#FF0027
#C2=#FF3B05
#C3=#FFB923
#C4=#FFD000
#C5=#E4FF00
#C6=#ADFF00
#C7=#6DFF00
#C8=#10BA00
#CHARGING_COLOR=#00AFE3
#FULL_COLOR=#FFFFFF
#AC_COLOR=#535353
```
11 changes: 6 additions & 5 deletions batterybar/batterybar
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,12 @@ squares="■"

#There are 8 colors that reflect the current battery percentage when
#discharging
dis_colors=("#FF0027" "#FF3B05" "#FFB923" "#FFD000" "#E4FF00" "#ADFF00"
"#6DFF00" "#10BA00")
charging_color="#00AFE3"
full_color="#FFFFFF"
ac_color="#535353"
dis_colors=("${C1:-#FF0027}" "${C2:-#FF3B05}" "${C3:-#FFB923}"
"${C4:-#FFD000}" "${C5:-#E4FF00}" "${C6:-#ADFF00}"
"${C7:-#6DFF00}" "${C8:-#10BA00}")
charging_color="${CHARGING_COLOR:-#00AFE3}"
full_color="${FULL_COLOR:-#FFFFFF}"
ac_color="${AC_COLOR:-#535353}"


while getopts 1:2:3:4:5:6:7:8:c:f:a:h opt; do
Expand Down

0 comments on commit e0bd55f

Please sign in to comment.