diff options
| author | Florian Fischer <florian.fl.fischer@fau.de> | 2016-06-01 19:28:25 +0200 |
|---|---|---|
| committer | Florian Fischer <florian.fl.fischer@fau.de> | 2016-06-01 19:28:25 +0200 |
| commit | 59d37ada838e8233a65c4527c79c8624a4cb0ee6 (patch) | |
| tree | 40e06d10eef0f402e7876d3cd42127f20b335fbf | |
| parent | 7fd121ad1846158c2f420c7f77d9706ae3bb2679 (diff) | |
| download | dotfiles-59d37ada838e8233a65c4527c79c8624a4cb0ee6.tar.gz dotfiles-59d37ada838e8233a65c4527c79c8624a4cb0ee6.zip | |
include a password file for mutt and other misc changes
config.fish: 1) include ~/.local/bin in the PATH variable
2) prepend new PATH components
muttrc: 1) write comment about new password file
2) use variables exported by mutt.sh
3) use dmenu instead of rofi to select links from urlscan
mutt.sh: 1) mutt wrapper script that decrypts and reads the password file
2) start mutt dependend on the calling context (Termial|XSession)
password: new password file. The Layout is explained in muttrc
setup.py: include mutt.sh in the mutt target
| -rw-r--r-- | config/fish/config.fish | 25 | ||||
| -rw-r--r-- | mutt/passwords | bin | 0 -> 622 bytes | |||
| -rw-r--r-- | muttrc | 15 | ||||
| -rwxr-xr-x | scripts/mutt.sh | 19 | ||||
| -rwxr-xr-x | setup.py | 3 |
5 files changed, 51 insertions, 11 deletions
diff --git a/config/fish/config.fish b/config/fish/config.fish index 37ee23a..322df54 100644 --- a/config/fish/config.fish +++ b/config/fish/config.fish @@ -6,14 +6,6 @@ set fish_complete_path $HOME/.dotfiles/config/fish/completions $fish_complete_pa # add git-alias subdirectory to functions path set fish_function_path $HOME/.dotfiles/config/fish/functions/git-alias $fish_function_path -# include cargo binaries -if type -q multirust - for p in $HOME/.multirust/toolchains/*/cargo/bin - if not contains $p $PATH - set PATH $PATH $p - end - end -end if not set -q __fish_git_prompt_show_informative_status set -Ux __fish_git_prompt_show_informative_status true @@ -35,6 +27,21 @@ if not set -q SSH_KEY_PATH set -Ux SSH_KEY_PATH $HOME/.ssh/rsa_id end +# PATH Stuff + +# include cargo binaries +if type -q multirust + for p in $HOME/.multirust/toolchains/*/cargo/bin + if not contains $p $PATH + set PATH $PATH $p + end + end +end + +if not contains ~/.local/bin $PATH + set PATH ~/.local/bin $PATH +end + if not contains /usr/local/bin $PATH - set PATH $PATH /usr/local/bin + set PATH /usr/local/bin $PATH end diff --git a/mutt/passwords b/mutt/passwords Binary files differnew file mode 100644 index 0000000..172224a --- /dev/null +++ b/mutt/passwords @@ -33,6 +33,18 @@ set use_from = yes set smtp_url="smtps://$imap_user@smtp-auth.uni-erlangen.de" + +############### PASSWORDS ################## +# the passwords are stored in the file .mutt/passwords.gpg +# and this file is read and evaluated before mutt is started. +# the file format should be: +# export <var> <passwd> +# +# see: http://www.mail-archive.com/mutt-users@mutt.org/msg36375.html + +set smtp_pass=$FAU_PASS +set imap_pass=$FAU_PASS + ############### GPG ######################## source ~/.mutt/gpg.rc @@ -46,7 +58,8 @@ set crypt_verify_sig=yes set sort=threads set sort_aux=last-date-received -macro pager,index \cb <pipe-entry>'eval $BROWSER $(urlscan -n | rofi -dmenu)'<enter> 'Follow links with urlview' +# open links with urlscan +macro pager,index \cb <pipe-entry>'eval $BROWSER $(urlscan -n | dmenu)'<enter> 'Follow links with urlview' ############## Bindings #################### diff --git a/scripts/mutt.sh b/scripts/mutt.sh new file mode 100755 index 0000000..31702ca --- /dev/null +++ b/scripts/mutt.sh @@ -0,0 +1,19 @@ +#!/bin/sh + +# read the password file +pwds=`gpg -d ~/.mutt/passwords` +eval "$pwds" +# execute mutt in a terminal if we are in a graphical session ( X or Wayland ) +# and TERM is linux => this script was started not from a terminal +if [ "$DISPLAY" ] || [ "$WAYLAND_DISPLAY" ] && [ "$TERM" == "linux" ] +then + # change font size on my main laptop + if [ "$(hostname)" = "fishtank" ] + then + exec urxvt -fn "xft: Terminess Powerline:pixelsize=18" -e "mutt" + else + exec urxvt -e "mutt" + fi +else + exec mutt "$@" +fi @@ -45,7 +45,8 @@ targets = {"vimrc": [("vimrc", home_dir + "/.vimrc")], "ssh-config": [("ssh/config", home_dir + "/.ssh/config")], "xinitrc": [("xinitrc", home_dir + "/.xinitrc")], "Xresources": [("Xresources", home_dir + "/.Xresources")], - "mutt": [("muttrc", home_dir + "/.muttrc"), ("mutt", home_dir + "/.mutt")], + "mutt": [("muttrc", home_dir + "/.muttrc"), ("mutt", home_dir +"/.mutt") + ("scripts/mutt.sh", home_dir+"/.local/bin/mutt.sh"),], "zshrc": [("zshrc", home_dir + "/zshrc")], "i3-config": [("i3", home_dir + "/.i3")], "dir_colors": [("dir_colors", home_dir + "/.dir_colors")], |
