diff options
| author | quentin@aristote.fr <quentin@aristote.fr> | 2023-08-04 16:40:35 +0200 |
|---|---|---|
| committer | quentin@aristote.fr <quentin@aristote.fr> | 2023-08-04 16:48:11 +0200 |
| commit | 0108c12a777130929bc1a6817431cffbc5db06db (patch) | |
| tree | 517e60101aafde5de787a8f87a354715e70ef2e8 /modules/home-manager/personal/gui/x | |
| parent | a15811c30f3ef521697ff2b7f905dafc4a19ca96 (diff) | |
home: i3: bar: add emacs status
Diffstat (limited to 'modules/home-manager/personal/gui/x')
| -rw-r--r-- | modules/home-manager/personal/gui/x/i3/bar/i3status.go | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/modules/home-manager/personal/gui/x/i3/bar/i3status.go b/modules/home-manager/personal/gui/x/i3/bar/i3status.go index 134be9f..c26ae78 100644 --- a/modules/home-manager/personal/gui/x/i3/bar/i3status.go +++ b/modules/home-manager/personal/gui/x/i3/bar/i3status.go @@ -77,6 +77,21 @@ func main() { } return outputs.Pango(output).Color(colors.Scheme(colorScheme)) }))) + emacsIcon := pango.Icon("mdi-alpha-e-circle") + barista.Add(systemd.UserService("emacs").Output(func(i systemd.ServiceInfo) bar.Output { + state := i.UnitInfo.State + var colorScheme string + switch { + case state == systemd.StateActive: + colorScheme = "good" + case state == systemd.StateActivating: + colorScheme = "degraded" + default: + colorScheme = "bad" + } + return outputs.Pango(emacsIcon).Color(colors.Scheme(colorScheme)) + })) + // Display space left on / storageIcon := pango.Icon("mdi-database") |
