]> git.rmz.io Git - dotfiles.git/blob - zsh/lib/motd.zsh
nvim: install nvim files
[dotfiles.git] / zsh / lib / motd.zsh
1 autoload colors; colors;
2
3 short()
4 {
5 print "$fg_bold[white]$1$reset_color $2"
6 }
7
8 msg()
9 {
10 print "$fg_bold[white]$1$reset_color\n$2\n"
11 }
12
13 if [[ -d ~/org ]]; then
14 org-agenda
15 fi
16
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"
22 fi
23 fi
24 if (( $+commands[pacman] )); then
25 kercmp -q || short "linux" "$(kercmp)"
26 fi
27
28 if (( $+commands[systemctl] )); then
29 if (( $(systemctl show -P NFailedUnits) )); then
30 systemctl --no-pager list-units -q --failed
31 fi
32 fi
33
34 # list sessions if possible
35 tmux list-sessions 2>/dev/null || true