The bar left the battery out because it belongs to whoever knows the hardware, and had no way to take it back in. i3status-rust now renders bar-neutral blocks through its template; the power module contributes the battery where the machine reports one and the power draw where something measures it, sampling the root-only energy counter as root and publishing only a rate. The memory block shows what programs hold, the figure memory-pressure judges by, instead of counting the cache as used.
21 lines
689 B
Cheetah
21 lines
689 B
Cheetah
{{- /* A block other modules contribute, in i3status-rust's grammar (novox/hq ADR 0255). The controller
|
|
renders one piece at a time: its fields (bar, place, order, shows, options) and module. */ -}}
|
|
{{- if eq .shows "battery" -}}
|
|
[[block]]
|
|
block = "battery"
|
|
{{with .options}}{{with .device}}device = {{quote .}}
|
|
{{end}}{{end -}}
|
|
format = "$icon $percentage{ $time|}"
|
|
charging_format = "$icon $percentage{ $time|}"
|
|
not_charging_format = "$icon $percentage"
|
|
full_format = "$icon $percentage"
|
|
empty_format = "$icon $percentage"
|
|
missing_format = ""
|
|
{{- else if eq .shows "command" -}}
|
|
[[block]]
|
|
block = "custom"
|
|
command = {{quote .options.command}}
|
|
interval = {{.options.interval}}
|
|
{{- end}}
|
|
|