diff options
author | Urbain Vaes <urbain@vaes.uk> | 2016-01-22 16:52:03 +0000 |
---|---|---|
committer | Urbain Vaes <urbain@vaes.uk> | 2016-01-22 16:52:03 +0000 |
commit | e9c25ee0bbbf2f97c223d037b83b89915db63999 (patch) | |
tree | 0efe84fc2968d0ebc22f7c6d5098bb04e8c8a1aa | |
parent | fe054f7d5f4ffe6f6bf3121e821b7783c93d9ee2 (diff) |
Add script to fetch email
-rw-r--r-- | .crontab | 1 | ||||
-rw-r--r-- | .mutt/muttrc | 3 | ||||
-rw-r--r-- | .vifm/scripts/README | 6 | ||||
-rw-r--r-- | .vim/vimrc | 11 | ||||
-rwxr-xr-x | bin/email | 14 |
5 files changed, 18 insertions, 17 deletions
diff --git a/.crontab b/.crontab new file mode 100644 index 0000000..cc69c4c --- /dev/null +++ b/.crontab @@ -0,0 +1 @@ +*/5 * * * * /home/urbain/bin/email >> /home/urbain/.cron_email_log diff --git a/.mutt/muttrc b/.mutt/muttrc index 102b92d..5fdc682 100644 --- a/.mutt/muttrc +++ b/.mutt/muttrc @@ -20,6 +20,7 @@ set sort = reverse-date set weed set fcc_clear unset markers +set sleep_time = 0 # Encryption set crypt_autosign = no @@ -60,8 +61,6 @@ macro index,pager gp "<change-folder> +Personal/Personal<enter>" macro index,pager gi "<change-folder> +Informal/Informal<enter>" macro index,pager gw "<change-folder> +Work/Work<enter>" -macro index d "WNk<delete-message>" - # Key bindings bind attach <return> view-mailcap diff --git a/.vifm/scripts/README b/.vifm/scripts/README new file mode 100644 index 0000000..8165c2f --- /dev/null +++ b/.vifm/scripts/README @@ -0,0 +1,6 @@ +This directory is dedicated for user-supplied scripts/executables. +vifm modifies its PATH environment variable to let user run those +scripts without specifying full path. All subdirectories are added +as well. File in a subdirectory overrules file with the same name +in parent directories. Restart might be needed to recognize files +in newly created or renamed subdirectories. @@ -174,7 +174,7 @@ set lazyredraw set hidden " mutt -au BufRead *mutt* set tw=72 +au BufRead /tmp/mutt-* set tw=72 " Colorscheme if $COLORSCHEME=="light" @@ -224,11 +224,10 @@ nnoremap <Leader>sc :source %<cr> " File edits nnoremap <Leader>es :UltiSnipsEdit<cr> -nnoremap <Leader>em :e ~/dotfiles/mutt/muttrc<cr> -nnoremap <Leader>en :e ~/dotfiles/nvimrc<cr> -nnoremap <Leader>ev :e ~/dotfiles/vimrc<cr> -nnoremap <Leader>ez :e ~/dotfiles/zshrc<cr> -nnoremap <Leader>et :e ~/dotfiles/tmux.conf<cr> +nnoremap <Leader>em :e ~/dotfiles/.mutt/muttrc<cr> +nnoremap <Leader>ev :e ~/dotfiles/.vim/vimrc<cr> +nnoremap <Leader>ez :e ~/dotfiles/.zsh/zshrc<cr> +nnoremap <Leader>et :e ~/dotfiles/.tmux.conf<cr> " Formatting nnoremap <Leader>fw :%s/\s\+$//<cr> @@ -1,10 +1,6 @@ #! /usr/bin/env bash - -while true; -do - mbsync -a - nmails=$(find $HOME/.mail -path '*/new/*' -type f | wc -l) - [[ nmails -ge 1 ]] && notify-send -t 1 "New mail!" - date - sleep 5m -done +export DISPLAY=:0 +mbsync -a +nmails=$(find $HOME/.mail -path '*/new/*' -type f | wc -l) +[[ nmails -ge 1 ]] && /usr/bin/notify-send -t 1 "New mail!" || /usr/bin/notify-send -u low -t 1 "No new mail!" +echo "Email last checked on $(date)". |