-
Notifications
You must be signed in to change notification settings - Fork 57
/
battery_code
24 lines (17 loc) · 916 Bytes
/
battery_code
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
HOW TO ADD BATTERY LEVEL TO A CONKY
_____________________________________
1. Copy and paste this section ABOVE the line "conky.text = [["
--########################
-- - Templates - #
--########################
template1 = '${color4}${font RobotoMono-Light:bold:pixelsize=12}${offset 8}',
template2 = '${offset 4} ${color3}batt${offset 6}',
2. Copy and paste this section BELOW the line "conky.text = [[" and ABOVE the final "]];"
Add below "#battery" offsets as needed, e.g. "${offset 0}${voffset -8}\"
#battery
${if_existing /sys/class/power_supply/BAT0/present/ 1}${template1}
${template2}${battery_bar 8,80 BAT0} ${battery_percent BAT0}% ${endif}\
${if_existing /sys/class/power_supply/BAT0}${template1}
${template2}${battery_bar 8,80 BAT0} ${battery_percent BAT0}% ${endif}\
${if_existing /sys/class/power_supply/BAT1}${template1}
${template2}${battery_bar 8,80 BAT1} ${battery_percent BAT1}% ${endif}