mail notifications through my prompt
This commit is contained in:
parent
62fa940cdb
commit
8668756b4f
@ -6,6 +6,6 @@ ip route ls | grep -q '.'
|
|||||||
# check if the gpg-agent is running
|
# check if the gpg-agent is running
|
||||||
pgrep gpg-agent > /dev/null
|
pgrep gpg-agent > /dev/null
|
||||||
|
|
||||||
notmuch new --quiet 2>&1 | xargs -0 --no-run-if-empty notify-send
|
notmuch new --quiet 2>&1
|
||||||
|
|
||||||
exec sleep 3m
|
exec sleep 3m
|
||||||
|
7
yashrc
7
yashrc
@ -35,6 +35,10 @@ prompt_pwd() {
|
|||||||
prompt_agent() {
|
prompt_agent() {
|
||||||
[ -z "$SSH_AGENT_PID" ] || echo " (A)"
|
[ -z "$SSH_AGENT_PID" ] || echo " (A)"
|
||||||
}
|
}
|
||||||
|
prompt_mail() {
|
||||||
|
unread="$(notmuch count tag:unread)"
|
||||||
|
[ "$unread" = "0" ] || echo " ($unread mails)"
|
||||||
|
}
|
||||||
prompt_status() {
|
prompt_status() {
|
||||||
if [ "$?" = "0" ]
|
if [ "$?" = "0" ]
|
||||||
then echo "$"
|
then echo "$"
|
||||||
@ -47,7 +51,7 @@ prompt_date() {
|
|||||||
BOLD="\fo."
|
BOLD="\fo."
|
||||||
GREEN="\fg."
|
GREEN="\fg."
|
||||||
RESET="\fD."
|
RESET="\fD."
|
||||||
PS1="$BOLD[\$(ks prompt_date)]$RESET $GREEN\$(ks prompt_pwd)$RESET\$(ks prompt_git)\$(ks prompt_agent) \$(prompt_status) "
|
PS1="$BOLD[\$(ks prompt_date)]$RESET $GREEN\$(ks prompt_pwd)$RESET\$(ks prompt_git)\$(ks prompt_agent)\$(ks prompt_mail) \$(prompt_status) "
|
||||||
unset BOLD
|
unset BOLD
|
||||||
unset GREEN
|
unset GREEN
|
||||||
unset RESET
|
unset RESET
|
||||||
@ -69,6 +73,7 @@ alias agent='eval "$(ssh-agent)" && ssh-add'
|
|||||||
alias unlock='gpg-connect-agent <<<bye'
|
alias unlock='gpg-connect-agent <<<bye'
|
||||||
|
|
||||||
alias weechat="ssh -t weechat@Chatmachine abduco -A weechat"
|
alias weechat="ssh -t weechat@Chatmachine abduco -A weechat"
|
||||||
|
alias agenda="khal list today 7d"
|
||||||
|
|
||||||
go() {
|
go() {
|
||||||
dir="$(lr /home /data /etc -t '(name ~~ ".*" && prune || print) && type = d && !(name = ".git")' \
|
dir="$(lr /home /data /etc -t '(name ~~ ".*" && prune || print) && type = d && !(name = ".git")' \
|
||||||
|
Loading…
Reference in New Issue
Block a user