This repository has been archived on 2024-04-07. You can view files and clone it, but cannot push or open issues or pull requests.
dotfiles-old/scripts/.local/bin/checkmail
2020-04-17 01:54:35 -03:00

15 lines
280 B
Bash
Executable file

#!/bin/sh
set -e
[ "$1" = "update" ] && mbsync -a
NEW=$(find ~/.mail/INBOX{,.{Contas,Faculdade,Git,Trabalhos}}/new -type f | wc -l)
echo $NEW | sed 's/^0$//'
if [ "$(ps -o comm= $PPID)" != "waybar" ] && pgrep waybar>/dev/null;then
pkill -SIGRTMIN+4 waybar
fi
# vim:ft=sh