diff options
author | Mike Crute <crutem@amazon.com> | 2019-02-13 10:25:48 -0800 |
---|---|---|
committer | Mike Crute <crutem@amazon.com> | 2019-02-13 10:38:32 -0800 |
commit | 8858eb3bae537d5e5fe38b3862064a297c6d693c (patch) | |
tree | 3a6e23a1aeed85eed237a005cca2104d5292e59c /.bashrc | |
parent | cef6edf982bebcb0b3cb4e69aef5b34a6516fa24 (diff) | |
download | dotfiles-8858eb3bae537d5e5fe38b3862064a297c6d693c.tar.bz2 dotfiles-8858eb3bae537d5e5fe38b3862064a297c6d693c.tar.xz dotfiles-8858eb3bae537d5e5fe38b3862064a297c6d693c.zip |
Handle mutt colorschemes
Diffstat (limited to '.bashrc')
-rw-r--r-- | .bashrc | 20 |
1 files changed, 19 insertions, 1 deletions
@@ -309,7 +309,6 @@ have_command tidy && alias tidy_xml='tidy -xml -indent -wrap 0 2>/dev/null' | |||
309 | have_command gitx && alias gitx="gitx --all" | 309 | have_command gitx && alias gitx="gitx --all" |
310 | have_command play && alias noise='play -n synth brownnoise synth pinknoise mix vol 0.5' | 310 | have_command play && alias noise='play -n synth brownnoise synth pinknoise mix vol 0.5' |
311 | have_command socat && alias hproxy="socat TCP4-LISTEN:6600,fork SOCKS4:127.0.0.1:172.16.0.166:6600,socksport=9999" | 311 | have_command socat && alias hproxy="socat TCP4-LISTEN:6600,fork SOCKS4:127.0.0.1:172.16.0.166:6600,socksport=9999" |
312 | have_command neomutt && alias mutt=neomutt | ||
313 | 312 | ||
314 | have_command docker && alias docker-interactive="docker run -ti --rm --detach-keys=ctrl-^ -v $HOME:$HOME " | 313 | have_command docker && alias docker-interactive="docker run -ti --rm --detach-keys=ctrl-^ -v $HOME:$HOME " |
315 | 314 | ||
@@ -381,6 +380,25 @@ function vimgrep | |||
381 | } | 380 | } |
382 | func_export vimgrep | 381 | func_export vimgrep |
383 | 382 | ||
383 | # Start the correct version of mutt for the environment and revise the config | ||
384 | # for whatever color-scheme is appropriate for the terminal background color | ||
385 | function mutt | ||
386 | { | ||
387 | local muttrc="$(mktemp)" | ||
388 | local shade="${TERM_BG_SHADE:-dark}" | ||
389 | local mutt="$(have_command neomutt && echo neomutt || echo mutt)" | ||
390 | |||
391 | echo "source ~/.mutt/muttrc" > $muttrc | ||
392 | echo "source ~/.mutt/colorscheme-${shade}" >> $muttrc | ||
393 | |||
394 | # Run in a sub-shell so the config gets cleaned up | ||
395 | ( | ||
396 | trap "rm $muttrc" EXIT | ||
397 | $mutt -F $muttrc | ||
398 | ) | ||
399 | } | ||
400 | func_export mutt | ||
401 | |||
384 | # | 402 | # |
385 | # tmux Sessions | 403 | # tmux Sessions |
386 | # | 404 | # |