]> git.rmz.io Git - dotfiles.git/commitdiff
zsh/motd: list failed units
authorSamir Benmendil <me@rmz.io>
Sat, 14 Jan 2023 01:22:02 +0000 (01:22 +0000)
committerSamir Benmendil <me@rmz.io>
Sat, 14 Jan 2023 02:35:29 +0000 (02:35 +0000)
zsh/lib/motd.zsh

index c931d9663e1c2d088785a257b728989d26798765..64c93248d00f5f506b2f38452b2a5a9686cd181e 100644 (file)
@@ -26,5 +26,11 @@ if (( $+commands[pacman] )); then
     kercmp -q || short "linux" "$(kercmp)"
 fi
 
+if (( $+commands[systemctl] )); then
+    if (( $(systemctl show -P NFailedUnits) )); then
+        systemctl list-units -q --failed
+    fi
+fi
+
 # list sessions if possible
 tmux list-sessions 2>/dev/null || true