]>
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
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 -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 # list sessions if possible
30 tmux list
-sessions 2>/dev
/null
|| true