]>
git.rmz.io Git - dotfiles.git/blob - zsh/lib/motd.zsh
64c93248d00f5f506b2f38452b2a5a9686cd181e
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
14 # 44 seems to be the number of color escape characters used by grep
15 todo
| cut
-c-$((COLUMNS + 44))
18 if (( $
+commands
[checkupdates
] )); then
19 # checkupdate.service populates this db
20 pkg_count
=$(CHECKUPDATES_DB=/tmp/checkup-db-0 checkupdates -n | grep -cv '\[.*\]')
21 if (( $pkg_count > 0 )); then
22 short
"Outdated packages: $pkg_count"
25 if (( $
+commands
[pacman
] )); then
26 kercmp
-q || short
"linux" "$(kercmp)"
29 if (( $
+commands
[systemctl
] )); then
30 if (( $(systemctl show -P NFailedUnits) )); then
31 systemctl list
-units -q --failed
35 # list sessions if possible
36 tmux list
-sessions 2>/dev
/null
|| true