]> git.rmz.io Git - dotfiles.git/commitdiff
zsh/motd: print both --system and --user failed units
authorSamir Benmendil <me@rmz.io>
Tue, 14 May 2024 21:45:11 +0000 (22:45 +0100)
committerSamir Benmendil <me@rmz.io>
Tue, 14 May 2024 21:47:07 +0000 (22:47 +0100)
zsh/lib/motd.zsh

index a929b352d4f776656a7fc928cdef2b0960273688..04dd32c571bea2d42a6d11ff9f9685d2b79e3891 100644 (file)
@@ -31,9 +31,8 @@ if (( $+commands[pacman] )); then
 fi
 
 if (( $+commands[systemctl] )); then
-    if (( $(systemctl show -P NFailedUnits) )); then
-        systemctl --no-pager list-units -q --failed
-    fi
+    systemctl --system --no-pager list-units -q --failed
+    systemctl --user   --no-pager list-units -q --failed
 fi
 
 # list sessions if possible