commit 2818449d35598c1337c44ee1a9c976b6dc5a9f3e parent 8364b4bd868dcc5bd0299d88be90a72d5b260dc1 Author: Anders Damsgaard <anders@adamsgaard.dk> Date: Thu, 25 Apr 2019 14:42:02 +0200 Move nnn scripts to new hardcoded folder, open xdg-open in background, improve mail print formatting Diffstat:
7 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/.config/nnn/copy-selection-to-clipboard b/.config/nnn/plugins/copy-selection-to-clipboard diff --git a/.config/nnn/fzf-edit b/.config/nnn/plugins/fzf-edit diff --git a/.config/nnn/fzf-open b/.config/nnn/plugins/fzf-open diff --git a/.config/nnn/open-images b/.config/nnn/plugins/open-images diff --git a/.config/nnn/unpack b/.config/nnn/plugins/unpack diff --git a/.mutt/muttprint-groff.sh b/.mutt/muttprint-groff.sh @@ -40,7 +40,7 @@ mail_subject="$(grep '^Subject: ' "$infile")" grep -v "^Date:\|^From:\|^To:\|^Subject:\|^C[Cc]:\|^X-Mailer:\|^User-Agent:" "$infile" |\ sed 's/^>\s*$//' |\ sed 's/ *\(---*\)/\1\n/' |\ - awk -v RS= -v ORS='\n\n' '{$1=$1}1' |\ + sed '$!N;s/\n \([a-z]\)/ \1/;P;D' |\ sed 's/^> *\(.*\)$/.I "\1"/' |\ sed 's/ > / /g' |\ sed 's/\(Fra\|Dato\|Til\|Emne\): /\n\1: /g' |\ @@ -53,6 +53,8 @@ mail_subject="$(grep '^Subject: ' "$infile")" echo "running groff $tmpfile $outfile" preconv "$tmpfile" | groff -ms -T pdf > "$outfile" +cat "$tmpfile" + xdg-open "$outfile" & sleep 1 #rm "$infile" "$tmpfile" "$outfile" diff --git a/.profile b/.profile @@ -20,7 +20,7 @@ NNN_BMS+="u:$HOME/uni;" NNN_BMS+="v:$HOME/videos" export NNN_BMS # bookmarks (max 10) export NNN_USE_EDITOR=1 # always open text files in $EDITOR -export NNN_SCRIPT="$HOME/.config/nnn" +export NNN_OPENER_DETACH=1 # do not block nnn with file opener # shellcheck source=/dev/null [ -f ~/.secret_env_vars ] && . ~/.secret_env_vars