From 35f4b5e7d2e190a899e9ab3c58619d03460db53b Mon Sep 17 00:00:00 2001 From: Charles Date: Sun, 26 Jul 2020 21:54:02 +0200 Subject: Added mail config with mutt --- .gitmodules | 3 +++ .mailcap | 2 ++ .mbsyncrc | 19 ++++++++++++++ .muttrc | 27 ++++++++++++++++++-- .vimrc | 2 ++ .zsh_aliases | 3 +++ .zshrc | 7 +++--- README.md | 5 ++-- install | 70 +++++++++++++++++++++++++++++++++++++++++++++++++++ install.sh | 70 --------------------------------------------------- mutt-colors-solarized | 1 + 11 files changed, 131 insertions(+), 78 deletions(-) create mode 100644 .gitmodules create mode 100644 .mailcap create mode 100644 .mbsyncrc create mode 100755 install delete mode 100755 install.sh create mode 160000 mutt-colors-solarized diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000..1335b96 --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "mutt-colors-solarized"] + path = mutt-colors-solarized + url = https://github.com/altercation/mutt-colors-solarized diff --git a/.mailcap b/.mailcap new file mode 100644 index 0000000..e00e02c --- /dev/null +++ b/.mailcap @@ -0,0 +1,2 @@ +text/html; "$BROWSER" %s &: test=test -n "$DISPLAY"; needsterminal; +text/html; "$BROWSERCLI" -I %{charse} -T text/html; copiousoutput; diff --git a/.mbsyncrc b/.mbsyncrc new file mode 100644 index 0000000..649e823 --- /dev/null +++ b/.mbsyncrc @@ -0,0 +1,19 @@ +IMAPStore cacharle-remote +Host mail.cacharle.xyz +Port 993 +User me +SSLType IMAPS +CertificateFile /etc/ssl/certs/ca-certificates.crt + +MaildirStore cacharle-local +Path ~/Mail/cacharle/ +Inbox ~/Mail/cacharle/INBOX +Subfolders Verbatim + +Channel cacharle +Master :cacharle-remote: +Slave :cacharle-local: +Create Both +Expunge Both +Patterns * +SyncState * diff --git a/.muttrc b/.muttrc index 7bbcce8..dbc07bd 100644 --- a/.muttrc +++ b/.muttrc @@ -1,12 +1,35 @@ +############################################################################### +# muttrc +############################################################################### + set from = 'me@cacharle.xyz' set realname = 'Charles Cabergs' -set smtp_url = 'smtp://me@cacharle.xyz@mail.cacharle.xyz:587' -set folder = 'imaps://me@cacharle.xyz@mail.cacharle.xyz:993' +set smtp_url = 'smtp://me@mail.cacharle.xyz:587' +set folder = 'imaps://me@mail.cacharle.xyz:993' +# set folder = "~/Mail/cacharle" + +auto_view text/html +alternative_order text/plain text/enriched text/html + set spoolfile = '+INBOX' +set record = "+Send" +set trash = "+Trash" +set postponed = "+Drafts" + +mailboxes =INBOX =Sent =Trash =Drafts + +set editor = 'vim' +set sort = 'reverse-date' + +set date_format = "%d/%m %I:%M" +set index_format = "%2C %Z %d %-15.15F %s (%-4.4c)" set header_cache = "~/.mutt/cache/headers" set message_cachedir = "~/.mutt/cache/bodies" set certificate_file = "~/.mutt/certificates" set ssl_force_tls = yes + +# color scheme +source "$DOTDIR/mutt-colors-solarized/mutt-colors-solarized-dark-16.muttrc" diff --git a/.vimrc b/.vimrc index c7799b7..5faf344 100644 --- a/.vimrc +++ b/.vimrc @@ -216,6 +216,8 @@ nnoremap m :make all " hook {{{ " remove trailing white space on save autocmd BufWritePre * %s/\s\+$//e +" dirty hack to disable this feature on markdown (autocmd! wouldn't work) +autocmd BufReadPre *.md autocmd! BufWritePre " }}} " filetype {{{ diff --git a/.zsh_aliases b/.zsh_aliases index 16361af..b2bbcf1 100644 --- a/.zsh_aliases +++ b/.zsh_aliases @@ -86,6 +86,7 @@ alias zshaliasrc="vim $DOTDIR/.zsh_aliases && source $DOTDIR/.zshrc" alias vimrc="vim $DOTDIR/.vimrc" alias vimplugrc="vim $DOTDIR/.pluggins.vim" alias xmonadrc="vim $DOTDIR/xmonad.hs" +alias muttrc="vim $DOTDIR/.muttrc" # other alias date="date -R" @@ -111,3 +112,5 @@ alias openpdf='zathura `ls -1 *.pdf | dmenu` &' alias cagob='RUSTFLAGS="$RUSTFLAGS -A dead_code" cargo build' alias cagor='RUSTFLAGS="$RUSTFLAGS -A dead_code" cargo run' + +# alias mutt='neomutt' diff --git a/.zshrc b/.zshrc index 85fa78e..284db68 100644 --- a/.zshrc +++ b/.zshrc @@ -83,10 +83,9 @@ export XDG_DATA_HOME="/home/charles/.data/" export EDITOR="vim" export TERM="st-256color" -# export TERM="xterm-256color" - -# mail -export MAIL='charles.cabergs@gmail.com' +export MAIL='me@cacharle.xyz' +export BROWSER='chromium' +export BROWSERCLI='w3m' # ignore filetypes in autocomplete fignore=(o hi) diff --git a/README.md b/README.md index 28f8cf1..a8a1825 100644 --- a/README.md +++ b/README.md @@ -2,9 +2,9 @@ ## Installation -1. Backup your current configuration files, they will be overwrite +1. Backup your current configuration files, they will be overwritten 2. `cd` in this repo -3. Run the `install.sh` script +3. Run the `install` script ## Tools I use @@ -12,6 +12,7 @@ * [zsh](https://www.zsh.org/) - interactive shell * [xmonad](https://xmonad.org) - window manager * [redshift](https://github.com/jonls/redshift) - change screen color temperature +* [mutt](http://www.mutt.org/) - email client ## School 19 Config diff --git a/install b/install new file mode 100755 index 0000000..8975dd3 --- /dev/null +++ b/install @@ -0,0 +1,70 @@ +#!/bin/sh + +create_dotfile_link() +{ + ln -svf $DOTDIR/$1 $HOME/$2 +} + +create_dotfile_link_same() +{ + create_dotfile_link $1 $1 +} + +########################### +# dotfiles install script # +########################### + +# dotfiles directory +[ -z $DOTDIR ] && export DOTDIR=`pwd` + +# Creating links +create_dotfile_link_same .zshrc +create_dotfile_link_same .bashrc +create_dotfile_link_same .vimrc +create_dotfile_link_same .pluggins.vim +[ ! -d $HOME/.vim/plugin ] && mkdir -p $HOME/.vim/plugin +create_dotfile_link grep.vim .vim/plugin/grep.vim + +[ ! -d $HOME/.xmonad ] && mkdir $HOME/.xmonad +create_dotfile_link xmonad.hs .xmonad/xmonad.hs + +create_dotfile_link_same .gdbinit +create_dotfile_link_same .ghci +create_dotfile_link_same .gitconfig +create_dotfile_link_same .muttrc +create_dotfile_link_same .mailcap +create_dotfile_link_same .xinitrc +create_dotfile_link_same .zprofile + +[ ! -d $HOME/.config ] && mkdir $HOME/.config +create_dotfile_link redshift.conf .config/redshift.conf + +################ +# dependencies # +################ + +[ $# -ge 1 ] || [ "$1" = "--ln" ] && exit 0 +echo "Installing Dependencies" + +# vim Plug +PLUGFILE=$HOME/.vim/autoload/plug.vim +PLUGURL='https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim' +[ ! -f $PLUGFILE ] && echo "Downloading plug.vim" && \ + curl -fLo $PLUGFILE --create-dirs $PLUGURL +echo "Installing plug.vim Pluggins" +vim -c "PlugInstall" -c "qa" + +# zsh pluggins +[ ! -d $HOME/.zsh ] && make $HOME/.zsh +# pure theme +[ ! -d $HOME/.zsh/pure ] && echo "Installing zsh pure theme" && \ + git clone https://github.com/sindresorhus/pure \ + $HOME/.zsh/pure +# syntax hightlighting +[ ! -d $HOME/.zsh/zsh-syntax-highlighting ] && echo "Installing zsh syntax highlighting plugin" && \ + git clone https://github.com/zsh-users/zsh-syntax-highlighting \ + $HOME/.zsh/zsh-syntax-highlighting +# you should use +[ ! -d $HOME/.zsh/zsh-you-should-use ] && echo "Installing zsh you should use plugin" && \ + git clone https://github.com/MichaelAquilina/zsh-you-should-use \ + $HOME/.zsh/zsh-you-should-use diff --git a/install.sh b/install.sh deleted file mode 100755 index 3cbe6a3..0000000 --- a/install.sh +++ /dev/null @@ -1,70 +0,0 @@ -#!/bin/sh - -create_dotfile_link() -{ - ln -svf $DOTDIR/$1 $HOME/$2 -} - -create_dotfile_link_same() -{ - create_dotfile_link $1 $1 -} - -########################### -# dotfiles install script # -########################### - -# dotfiles directory -[ -z $DOTDIR ] && export DOTDIR=`pwd` - -# Creating links -create_dotfile_link_same .zshrc -create_dotfile_link_same .bashrc -create_dotfile_link_same .vimrc -create_dotfile_link_same .pluggins.vim -[ ! -d $HOME/.vim/plugin ] && mkdir -p $HOME/.vim/plugin -create_dotfile_link grep.vim .vim/plugin/grep.vim - -[ ! -d $HOME/.xmonad ] && mkdir $HOME/.xmonad -create_dotfile_link xmonad.hs .xmonad/xmonad.hs - -create_dotfile_link_same .gdbinit -create_dotfile_link_same .ghci -create_dotfile_link_same .gitconfig -create_dotfile_link_same muttrc - -[ ! -d $HOME/.config ] && mkdir $HOME/.config -create_dotfile_link redshift.conf .config/redshift.conf - -ln -sf $DOTDIR/.xinitrc $HOME/.xinitrc -ln -sf $DOTDIR/.zprofile $HOME/.zprofile - -################ -# dependencies # -################ - -[ $# -ge 1 ] || [ "$1" = "--ln" ] && exit 0 -echo "Installing Dependencies" - -# vim Plug -PLUGFILE=$HOME/.vim/autoload/plug.vim -PLUGURL='https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim' -[ ! -f $PLUGFILE ] && echo "Downloading plug.vim" && \ - curl -fLo $PLUGFILE --create-dirs $PLUGURL -echo "Installing plug.vim Pluggins" -vim -c "PlugInstall" -c "qa" - -# zsh pluggins -[ ! -d $HOME/.zsh ] && make $HOME/.zsh -# pure theme -[ ! -d $HOME/.zsh/pure ] && echo "Installing zsh pure theme" && \ - git clone https://github.com/sindresorhus/pure \ - $HOME/.zsh/pure -# syntax hightlighting -[ ! -d $HOME/.zsh/zsh-syntax-highlighting ] && echo "Installing zsh syntax highlighting plugin" && \ - git clone https://github.com/zsh-users/zsh-syntax-highlighting \ - $HOME/.zsh/zsh-syntax-highlighting -# you should use -[ ! -d $HOME/.zsh/zsh-you-should-use ] && echo "Installing zsh you should use plugin" && \ - git clone https://github.com/MichaelAquilina/zsh-you-should-use \ - $HOME/.zsh/zsh-you-should-use diff --git a/mutt-colors-solarized b/mutt-colors-solarized new file mode 160000 index 0000000..3b23c55 --- /dev/null +++ b/mutt-colors-solarized @@ -0,0 +1 @@ +Subproject commit 3b23c55eb43849975656dd89e3f35dacd2b93e69 -- cgit