Feature 57 (config and provisioning): modules declare config and provisions, their files rendered from templates; synced with main (issues of feature 57, 874)
This commit is contained in:
@@ -1,26 +0,0 @@
|
||||
{{- /* 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}}
|
||||
|
||||
@@ -74,7 +74,7 @@ format_alt = "$icon_swap $swap_used.eng(w:2) ($swap_used_percents.eng(w:2))"
|
||||
|
||||
# Blocks other modules contribute beside the machine's resources (novox/hq ADR 0255), rendered from
|
||||
# what they show by this module's template, and only on a machine that has what they show.
|
||||
${contribution:node-bar:block:bar=bottom,place=resources}
|
||||
${collected:contribution:node-bar:block:bar=bottom,place=resources}
|
||||
[[block]]
|
||||
block = "docker"
|
||||
interval = 2
|
||||
@@ -88,7 +88,7 @@ cmd = "pavucontrol"
|
||||
|
||||
# Blocks other modules contribute beside the sound (novox/hq ADR 0255): the power module's battery and
|
||||
# power draw, where the machine has them.
|
||||
${contribution:node-bar:block:bar=bottom,place=status}
|
||||
${collected:contribution:node-bar:block:bar=bottom,place=status}
|
||||
# The weather from the Norwegian Meteorological Institute, which needs no key, where the machine is.
|
||||
[[block]]
|
||||
block = "weather"
|
||||
|
||||
@@ -34,4 +34,4 @@ interval = 60
|
||||
|
||||
# Blocks other modules contribute to the top bar (novox/hq ADR 0255). None do yet; both places are kept
|
||||
# so that one that does is never dropped.
|
||||
${contribution:node-bar:block:bar=top,place=resources}${contribution:node-bar:block:bar=top,place=status}
|
||||
${collected:contribution:node-bar:block:bar=top,place=resources}${collected:contribution:node-bar:block:bar=top,place=status}
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
# The bar watchdog (module i3status-rust, novox/hq ADR 0208): i3 never restarts a bar that dies; this
|
||||
# brings it back. Once per session, ending with the session's own process ($$).
|
||||
"$HOME/.local/bin/i3bar-watchdog" "$$" &
|
||||
Reference in New Issue
Block a user