{{- /* 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), module and machine. */ -}} {{- 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}} {{- else if eq .shows "state" -}} [[block]] block = "custom" command = {{quote (printf "~/.local/bin/i3status-value %s %s" .options.state (or .options.key .machine))}} interval = 5 hide_when_empty = true {{- end}}