55e4e6c73b2bb067974c6d49ba9da2ba1ee3295c

Author
the.brain.w <the.brain.w@gmail.com>
Committer
GitHub <noreply@github.com>
Date

Message

feat(systemd): add support for user units in prompt (#11417)

Diff

 1diff --git a/plugins/systemd/systemd.plugin.zsh b/plugins/systemd/systemd.plugin.zsh
 2index 7afd2be58ebdc2b6a8bdbc934d8c0dd470ef0d7b..1270bea0e376c26711f2809eeafc4fbe8c2ad29e 100644
 3--- a/plugins/systemd/systemd.plugin.zsh
 4+++ b/plugins/systemd/systemd.plugin.zsh
 5@@ -107,6 +107,8 @@ function systemd_prompt_info {
 6 
 7     if systemctl is-active "$unit" &>/dev/null; then
 8       echo -n "$ZSH_THEME_SYSTEMD_PROMPT_ACTIVE"
 9+    elif systemctl --user is-active "$unit" &>/dev/null; then
10+      echo -n "$ZSH_THEME_SYSTEMD_PROMPT_ACTIVE"
11     else
12       echo -n "$ZSH_THEME_SYSTEMD_PROMPT_NOTACTIVE"
13     fi