From efd882787f4f5b5accd8ff6cfb4068608ea545d4 Mon Sep 17 00:00:00 2001 From: Hsieh Chin Fan Date: Wed, 30 Mar 2022 10:41:25 +0800 Subject: update --- Makefile | 1 + alias | 5 ++++- misc/mailcap | 2 ++ muttrc | 3 +++ 4 files changed, 10 insertions(+), 1 deletion(-) create mode 100644 misc/mailcap diff --git a/Makefile b/Makefile index 1d26882..84c7bc9 100644 --- a/Makefile +++ b/Makefile @@ -57,6 +57,7 @@ gpg: mutt: mkdir -p ~/.config/mutt ln -sf `pwd`/muttrc ~/.config/mutt/muttrc + ln -sf `pwd`/misc/mailcap ~/.mailcap tmux: ln -sf `pwd`/misc/tmux.conf ~/.tmux.conf diff --git a/alias b/alias index e259b63..260963a 100644 --- a/alias +++ b/alias @@ -54,7 +54,10 @@ alias s='sudo systemctl' alias j='sudo journalctl -xe' alias m='mutt' alias ju='sudo journalctl -u' -alias path="echo $PATH" +# Should not use alias, because $PATH is not initialized +path() { + echo $PATH +} alias fd="echo /proc/$$/fd; ls -l /proc/$$/fd" alias src="source $HOME/.$(basename $SHELL)rc" alias ll='ls -alh' diff --git a/misc/mailcap b/misc/mailcap new file mode 100644 index 0000000..b3ae9f4 --- /dev/null +++ b/misc/mailcap @@ -0,0 +1,2 @@ +text/html; xdg-open '%s' &; test=test -n "$DISPLAY"; needsterminal; +text/html; lynx -dump %s; nametemplate=%s.html; copiousoutput; diff --git a/muttrc b/muttrc index c25bde3..4d1ef75 100644 --- a/muttrc +++ b/muttrc @@ -33,6 +33,9 @@ set header = no set pager_stop set sleep_time=0 # When changing folder +# Open mail externally +bind attach x view-mailcap + # Vim-style key binding, \c means Ctrl # ref: https://fancyseeker.github.io/2015/08/19/mutt/#vim%E9%A3%8E%E6%A0%BC%E9%94%AE%E4%BD%8D%E7%BB%91%E5%AE%9A bind pager G bottom -- cgit v1.2.3-70-g09d2