summaryrefslogtreecommitdiff
path: root/.bashrc
diff options
context:
space:
mode:
authorMike Crute <crutem@amazon.com>2019-02-13 10:25:48 -0800
committerMike Crute <crutem@amazon.com>2019-02-13 10:38:32 -0800
commit8858eb3bae537d5e5fe38b3862064a297c6d693c (patch)
tree3a6e23a1aeed85eed237a005cca2104d5292e59c /.bashrc
parentcef6edf982bebcb0b3cb4e69aef5b34a6516fa24 (diff)
downloaddotfiles-8858eb3bae537d5e5fe38b3862064a297c6d693c.tar.bz2
dotfiles-8858eb3bae537d5e5fe38b3862064a297c6d693c.tar.xz
dotfiles-8858eb3bae537d5e5fe38b3862064a297c6d693c.zip
Handle mutt colorschemes
Diffstat (limited to '.bashrc')
-rw-r--r--.bashrc20
1 files changed, 19 insertions, 1 deletions
diff --git a/.bashrc b/.bashrc
index 2107636..4bda3e8 100644
--- a/.bashrc
+++ b/.bashrc
@@ -309,7 +309,6 @@ have_command tidy && alias tidy_xml='tidy -xml -indent -wrap 0 2>/dev/null'
309have_command gitx && alias gitx="gitx --all" 309have_command gitx && alias gitx="gitx --all"
310have_command play && alias noise='play -n synth brownnoise synth pinknoise mix vol 0.5' 310have_command play && alias noise='play -n synth brownnoise synth pinknoise mix vol 0.5'
311have_command socat && alias hproxy="socat TCP4-LISTEN:6600,fork SOCKS4:127.0.0.1:172.16.0.166:6600,socksport=9999" 311have_command socat && alias hproxy="socat TCP4-LISTEN:6600,fork SOCKS4:127.0.0.1:172.16.0.166:6600,socksport=9999"
312have_command neomutt && alias mutt=neomutt
313 312
314have_command docker && alias docker-interactive="docker run -ti --rm --detach-keys=ctrl-^ -v $HOME:$HOME " 313have_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}
382func_export vimgrep 381func_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
385function 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}
400func_export mutt
401
384# 402#
385# tmux Sessions 403# tmux Sessions
386# 404#