class Widgets::Systemd

Show the status of a systemd unit.

service:

what service?

user:

user service?

Example:

# display collectd.service status
widget :systemd, service: "collectd.service"

# control gammastep as an icon
widget :systemd, user: true, service: "gammastep.service" do
  case @unit["ActiveState"]
  when "active" then "🕯️"
  else "☀️"
  end
end