From 3f1d182535b7c541151d036b1f7e4951278618fd Mon Sep 17 00:00:00 2001 From: Thomas Dehaeze Date: Fri, 23 Aug 2019 10:00:47 +0200 Subject: [PATCH] Change checkmail script: instead of "all" accept "-a" --- dotfiles/mail.org | 12 +++--------- dotfiles/systemd.org | 2 +- 2 files changed, 4 insertions(+), 10 deletions(-) diff --git a/dotfiles/mail.org b/dotfiles/mail.org index 044c8e6..db05081 100644 --- a/dotfiles/mail.org +++ b/dotfiles/mail.org @@ -632,7 +632,7 @@ Sync Mailbox Sync email #+BEGIN_SRC conf macro index,pager o "$HOME/.config/neomutt/bin/get_new_mail.sh" - macro index,pager O "$HOME/.config/neomutt/bin/get_new_mail.sh all" + macro index,pager O "$HOME/.config/neomutt/bin/get_new_mail.sh -a" #+END_SRC Make quick html view macro @@ -1226,16 +1226,10 @@ First, tag the files you want to send using =t=, then =;= to apply the action on :header-args+: :shebang "#!/usr/bin/env bash" :END: #+begin_src bash - if [ "$1" = "all" ]; then - arg='-a' - else - arg='' - fi - if [ $TMUX ]; then - tmux split -v -l 1 ~/scripts/checkmail.sh $arg && tmux select-pane -U + tmux split -v -l 1 ~/scripts/checkmail.sh $1 && tmux select-pane -U else - $command + ~/scripts/checkmail.sh $1 fi #+end_src diff --git a/dotfiles/systemd.org b/dotfiles/systemd.org index e2adf38..aca1032 100644 --- a/dotfiles/systemd.org +++ b/dotfiles/systemd.org @@ -166,7 +166,7 @@ #+begin_src bash while [ -n "$1" ]; do # while loop starts case "$1" in - -a) opt_mbsync_all='--all' ;; # Check All inboxes + -a) opt_all='--all' ;; # Check All inboxes -v) opt_verbose='--verbose' ;; # Verbose -q) opt_quiet='--quiet' ;; # Quiet *) echo "Option $1 not recognized" ;; # In case you typed a different option