]>
git.rmz.io Git - dotfiles.git/blob - zsh/lib/motd.zsh
1 autoload colors
; colors
;
5 print
"$fg_bold[white]$1$reset_color $2"
10 print
"$fg_bold[white]$1$reset_color\n$2\n"
13 if [[ -d ~
/org
]]; then
17 if (( $
+commands
[checkupdates
] )); then
18 # checkupdate.service populates this db
19 pkg_count
=$(CHECKUPDATES_DB=/tmp/checkup-db-0 checkupdates -n | grep -cv '\[.*\]')
20 if (( $pkg_count > 0 )); then
21 short
"Outdated packages: $pkg_count"
24 if (( $
+commands
[pacman
] )); then
25 kercmp
-q || short
"linux" "$(kercmp)"
28 if (( $
+commands
[systemctl
] )); then
29 if (( $(systemctl show -P NFailedUnits) )); then
30 systemctl
--no-pager list
-units -q --failed
34 # list sessions if possible
35 tmux list
-sessions 2>/dev
/null
|| true