summaryrefslogtreecommitdiff
path: root/modules/home-manager/personal/gui/x/i3/bar
diff options
context:
space:
mode:
Diffstat (limited to 'modules/home-manager/personal/gui/x/i3/bar')
-rw-r--r--modules/home-manager/personal/gui/x/i3/bar/i3status.go15
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")