]> git.rmz.io Git - dotfiles.git/commitdiff
mutt: use NeoMutt and its config path in XDG_CONFIG_HOME
authorSamir Benmendil <me@rmz.io>
Thu, 28 Dec 2017 20:23:01 +0000 (20:23 +0000)
committerSamir Benmendil <me@rmz.io>
Thu, 28 Dec 2017 20:23:01 +0000 (20:23 +0000)
Makefile
aliases
mutt/hooks
mutt/mailcap
mutt/muttrc
offlineimap/config

index 889268751d46a1d148da7c7582df5fd5dc37ca84..3184bb619f16f60853b29708be82c716bbfeda38 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,7 +1,7 @@
 APATH := $(realpath .)
 
 FILES := bin
-DOTFILES := goobookrc msmtp* mutt profile tmux.conf weechat Xresources
+DOTFILES := goobookrc msmtp* profile tmux.conf weechat Xresources
 CONFIGFILES := aliases compton.conf git mpv offlineimap ranger retroarch xbindkeys xkb
 
 .PHONY: install $(FILES) $(DOTFILES) $(CONFIGFILES)
@@ -16,6 +16,10 @@ vim:
        git clone https://github.com/gmarik/vundle ~/.local/share/vim/vundle
 .PHONY: vim
 
+mutt:
+       ln -sfT $(APATH)/mutt ~/.config/mutt
+.PHONY: mutt
+
 gdb:
        ln -sfT $(APATH)/gdbinit ~/.gdbinit
        ln -sfT $(APATH)/cgdb ~/.cgdb
diff --git a/aliases b/aliases
index a1641cba6a2943cee65a2f0fb2ad0942213c9c9b..5b306079460336f6a5f74d221fbda6e34807b8af 100644 (file)
--- a/aliases
+++ b/aliases
@@ -18,6 +18,8 @@ alias svi='sudo -e'
 #alias vp='vim PKGBUILD' # I have a script for that in ~/bin
 alias vs='vim SPLITBUILD'
 
+alias mutt='neomutt'
+
 # colours, I want more colours
 [[ -x /usr/bin/colordiff ]] && alias diff='colordiff'
 
index b002615bd4df65146a2ca300b74ac9c18876d291..4a8685d99381486f1ad49ff5a778f1a5611103bc 100644 (file)
@@ -1,13 +1,13 @@
 # vim: ft=muttrc
-reply-hook .            source ~/.mutt/accounts/gmail
-reply-hook "%L chakra"  source ~/.mutt/accounts/chakra
-reply-hook "%L unimaas" source ~/.mutt/accounts/unimaas
-reply-hook "%L cadscan" source ~/.mutt/accounts/cadscan
+reply-hook .            source $my_config_dir/accounts/gmail
+reply-hook "%L chakra"  source $my_config_dir/accounts/chakra
+reply-hook "%L unimaas" source $my_config_dir/accounts/unimaas
+reply-hook "%L cadscan" source $my_config_dir/accounts/cadscan
 
-folder-hook .       source ~/.mutt/accounts/gmail
-folder-hook chakra  source ~/.mutt/accounts/chakra
-folder-hook unimaas source ~/.mutt/accounts/unimaas
-folder-hook cadscan source ~/.mutt/accounts/cadscan
+folder-hook .       source $my_config_dir/accounts/gmail
+folder-hook chakra  source $my_config_dir/accounts/chakra
+folder-hook unimaas source $my_config_dir/accounts/unimaas
+folder-hook cadscan source $my_config_dir/accounts/cadscan
 
 folder-hook .* "exec collapse-all"
 
@@ -26,6 +26,6 @@ set my_pipe_decode=$pipe_decode
 folder-hook .* bind index,pager m mail
 folder-hook .* bind pager <return> next-line
 folder-hook .* set pipe_decode=$my_pipe_decode
-folder-hook youtube 'macro index,pager m "<pipe-message>~/.mutt/mutt_mpv<enter>"'
-folder-hook youtube 'macro pager <return> "<pipe-message>~/.mutt/mutt_mpv<enter>"'
+folder-hook youtube 'macro index,pager m "<pipe-message>$my_config_dir/mutt_mpv<enter>"'
+folder-hook youtube 'macro pager <return> "<pipe-message>$my_config_dir/mutt_mpv<enter>"'
 folder-hook youtube 'set my_pipe_decode=$pipe_decode;set pipe_decode=yes'
index b5c4dee59bd2ded0df002787a1a25a94cb288022..71b75025784305a94a6bde73a9896d2c49885981 100644 (file)
@@ -1,4 +1,4 @@
-text/html;       ~/.mutt/mutt_bgrun qutebrowser %s; test=test -n "$DISPLAY"; nametemplate=%s.html
+text/html;       $XDG_CONFIG_HOME/mutt_bgrun qutebrowser %s; test=test -n "$DISPLAY"; nametemplate=%s.html
 text/html;       w3m -I %{charset} -dump %s -T text/html -cols "$COLUMNS" -o display_link_number=1; copiousoutput; nametemplate=%s.html
-application/*;   ~/.mutt/mutt_bgrun rifle -f F %s;
+application/*;   $XDG_CONFIG_HOME/mutt_bgrun rifle -f F %s;
 image/*;         rifle -f F %s;
index 44cec6a54c84005fc933434f777090bee78f7273..e7b41ba63bd41182da382b4368069a0ad74513e2 100644 (file)
@@ -1,3 +1,5 @@
+set my_config_dir = $XDG_CONFIG_HOME/mutt
+
 # general settings
 alternates -group me samir.benmendil@gmail.com ram-z@hotmail.com @rmz.io
 alternates -group me -group chakra ram-z@chakra chakra@rmz.io
@@ -69,7 +71,7 @@ unhdr_order *
 hdr_order from: to: cc: date: subject: x-clacks-overhead:
 
 # deal with crap
-set mailcap_path = ~/.mutt/mailcap
+set mailcap_path = $my_config_dir/mailcap
 auto_view text/html                                     # view html automatically
 alternative_order text/plain text/enriched text/html    # save html for last
 
@@ -80,7 +82,7 @@ unset record                        # do not move sent msgs to a folder, gmail d
 unset move                          # do not move read msgs, gmail does that
 set postponed    = "+gmail/drafts"  # drafts folder
 set header_cache = "~/.cache/mutt"  # cache headers for speedss
-source ~/.mutt/mailboxes            # source mailboxes generetated by offlineimap
+source $my_config_dir/mailboxes            # source mailboxes generetated by offlineimap
 
 # SMTP: msmtp
 set sendmail = /usr/bin/msmtp       # use msmtp
@@ -101,6 +103,6 @@ group -group nosign -rx jira@.*atlassian.net
 send-hook .            "set crypt_autosign = yes"
 send-hook "%t nosign"  "set crypt_autosign = no"
 
-source ~/.mutt/hooks
-source ~/.mutt/bindings
-source ~/.mutt/colors/badfox         # color theme
+source $my_config_dir/hooks
+source $my_config_dir/bindings
+source $my_config_dir/colors/badfox         # color theme
index e79d65e8cb6923f8c2785e4eb0701f94d9c5b89d..ac15582b9d8b6672ef95f8ef94b764f1552276b0 100644 (file)
@@ -10,7 +10,7 @@ fsync = false
 
 [mbnames]
 enabled = yes
-filename = ~/.mutt/mailboxes
+filename = $my_config_dir/mailboxes
 header = "mailboxes "
 peritem = "+%(accountname)s/%(foldername)s"
 sep = " "