From deee914a5e0868fe2c93216cc6dc372f45c708d3 Mon Sep 17 00:00:00 2001 From: Steve Losh Date: Sun, 30 Sep 2012 12:01:01 -0400 Subject: [PATCH] Moar. --- bash_profile | 5 ++++ bin/addcontact | 4 +++ bin/mutt-notmuch-py | 1 + fish/config.fish | 4 +-- moom/com.manytricks.Moom.plist | Bin 6236 -> 6236 bytes mutt/mailcap | 1 + mutt/muttrc | 51 ++++++++++++++------------------ vim/custom-dictionary.utf-8.add | 4 +++ vim/vimrc | 10 ++----- 9 files changed, 41 insertions(+), 39 deletions(-) create mode 120000 bin/mutt-notmuch-py diff --git a/bash_profile b/bash_profile index c225235..134d7ac 100644 --- a/bash_profile +++ b/bash_profile @@ -1,5 +1,8 @@ #!/usr/bin/env bash +shopt -s expand_aliases + + # This file contains aliases and functions that duplicate some fish # functionality, because Vim will use bash as its external command shell. @@ -10,3 +13,5 @@ function a() { ag $* fi } + +export PATH=~/bin:~/lib/dotfiles/bin:/usr/local/share/python:$PATH diff --git a/bin/addcontact b/bin/addcontact index d033713..aa251d0 100755 --- a/bin/addcontact +++ b/bin/addcontact @@ -25,6 +25,10 @@ osascript -e "tell application \"Address Book\"" \ -e " set contactEmailLabel to firstEmailParam" \ -e " set contactEmail to secondEmailParam" \ -e " end if" \ +-e " set bracketOffset to (offset of \"<\" in contactEmail)" \ +-e " if (bracketOffset is not equal to 0) then" \ +-e " set contactEmail to text 2 thru -2 of contactEmail" \ +-e " end if" \ -e " if (contactEmailLabel is equal to \"\") then" \ -e " set contactEmailLabel to \"Home\"" \ -e " end if" \ diff --git a/bin/mutt-notmuch-py b/bin/mutt-notmuch-py new file mode 120000 index 0000000..587ba2e --- /dev/null +++ b/bin/mutt-notmuch-py @@ -0,0 +1 @@ +../../../src/mutt-notmuch-py/mutt-notmuch-py.py \ No newline at end of file diff --git a/fish/config.fish b/fish/config.fish index 429cb81..269a749 100644 --- a/fish/config.fish +++ b/fish/config.fish @@ -30,7 +30,7 @@ alias spotlight-on 'sudo mdutil -a -i on ; and sudo mv /System/Library/CoreServi alias spotlight-wat 'sudo fs_usage -w -f filesys mdworker | grep "open"' set MUTT_BIN (which mutt) -alias mutt "bash -c 'cd ~/Desktop; $MUTT_BIN'" +alias mutt "bash --login -c 'cd ~/Desktop; $MUTT_BIN'" alias h 'hg' alias g 'git' @@ -166,7 +166,7 @@ function virtualenv_prompt end function hg_prompt - # hg prompt --angle-brackets $hg_promptstring 2>/dev/null + hg prompt --angle-brackets $hg_promptstring 2>/dev/null end function git_prompt diff --git a/moom/com.manytricks.Moom.plist b/moom/com.manytricks.Moom.plist index e101ed244b3a5aae5d85136946fb05b09de1d533..e7c48e7ef1e2f192a9e62b2f075f988abca77005 100644 GIT binary patch delta 32 ocmca(aK~W77bfBKGWB3%J%a!aPGiSy;%k@JcFow#&KxQV0LvK*b^rhX delta 32 ocmca(aK~W77bf8}m6gH9dIkX;oW_pZ#9}o0ZvWiO&KxQV0LU>57ytkO diff --git a/mutt/mailcap b/mutt/mailcap index d87cb75..1800de3 100644 --- a/mutt/mailcap +++ b/mutt/mailcap @@ -18,6 +18,7 @@ application/vnd.ms-excel; ~/.mutt/view_attachment.sh %s application/msword; ~/.mutt/view_attachment.sh %s "-" '/Applications/TextEdit.app' # Images +image/jpg; ~/.mutt/view_attachment.sh %s jpg image/jpeg; ~/.mutt/view_attachment.sh %s jpg image/pjpeg; ~/.mutt/view_attachment.sh %s jpg image/png; ~/.mutt/view_attachment.sh %s png diff --git a/mutt/muttrc b/mutt/muttrc index ac72dcd..d550b34 100644 --- a/mutt/muttrc +++ b/mutt/muttrc @@ -125,6 +125,7 @@ mailboxes +steve-stevelosh.com/INBOX \ +steve-stevelosh.com/archive \ +steve-stevelosh.com/sent \ +steve-stevelosh.com/drafts \ + +temporary/search \ # Other special folders. set mbox = "+steve-stevelosh.com/archive" @@ -144,30 +145,10 @@ unset record # }}} # Key Bindings {{{ -# Unbind Stupid Keys {{{ - -bind index,pager \# noop -bind index i noop -bind index w noop - -# }}} -# Pager {{{ - -bind pager i exit -bind pager / search -bind pager k previous-line -bind pager j next-line -bind pager gg top -bind pager G bottom -bind pager R group-reply - -macro pager \Cu "|urlview" "call urlview to open links" -macro pager s "cat > ~/Desktop/" "save message as" - -# }}} # Index {{{ -bind index R group-reply +bind index \# noop +bind index R group-reply bind index sync-mailbox bind index k previous-entry bind index j next-entry @@ -175,15 +156,12 @@ bind index gg first-entry bind index G last-entry bind index p recall-message bind index collapse-thread +bind index N search-opposite macro index s "cat > ~/Desktop/" "save message as" # Mark all as read macro index \Cr "T~UN." "mark all messages as read" -# Quickly change date formats -macro index f ":set date_format = \"%m/%d\"" "short date format" -macro index F ":set date_format = \"%m/%d at %I:%M %P\"" "long date format" - # Sync email macro index O "offlineimap" "run offlineimap to sync all mail" macro index o "offlineimap -qf INBOX" "run offlineimap to sync inbox" @@ -196,12 +174,27 @@ macro index M "?" "move a message to a mailbox" macro index \' "+steve-stevelosh.com/INBOX" "go to stevelosh/INBOX" macro index \" "+steve-stevelosh.com/archive" "go to stevelosh/archive" -# Just use notmuch for everything -macro index / "unset wait_keyread -p 'notmuch query: ' x; echo \$x >~/.cache/mutt_terms~i \"\`notmuch search --output=messages \$(cat ~/.cache/mutt_terms) | head -n 600 | tr '+' '.' | perl -le '@a=<>;chomp@a;s/\^id:// for@a;$,=\"|\";print@a'\`\"" "show only messages matching a notmuch pattern" +# Search with notmuch +macro index S "unset wait_keymutt-notmuch-py -G ~/.mail/temporary/search+temporary/search" "search mail (using notmuch)" -# Unlimit aka show [a]ll +# Unlimit (show [a]ll) macro index a "all\n" "show all messages (undo limit)" +# }}} +# Pager {{{ + +bind pager \# noop +bind pager k previous-line +bind pager j next-line +bind pager gg top +bind pager G bottom + +bind pager R group-reply +bind pager N search-opposite + +macro pager \Cu "|urlview" "call urlview to open links" +macro pager s "cat > ~/Desktop/" "save message as" + # }}} # Compose {{{ diff --git a/vim/custom-dictionary.utf-8.add b/vim/custom-dictionary.utf-8.add index 0190697..82d3a3c 100644 --- a/vim/custom-dictionary.utf-8.add +++ b/vim/custom-dictionary.utf-8.add @@ -87,3 +87,7 @@ signoffs SubtitleLanguage SubtitleLanguages signoff +offline +bikeshed +bikesheds +inbox diff --git a/vim/vimrc b/vim/vimrc index f8d6d7d..0b2339a 100644 --- a/vim/vimrc +++ b/vim/vimrc @@ -760,12 +760,6 @@ augroup ft_html " Use t to fold the current templatetag. au FileType html,jinja,htmldjango nmap t viikojozf - " Smarter pasting - au FileType html,jinja,htmldjango nnoremap p :YRPaste 'p'v`]=`] - au FileType html,jinja,htmldjango nnoremap P :YRPaste 'P'v`]=`] - au FileType html,jinja,htmldjango nnoremap π :YRPaste 'p' - au FileType html,jinja,htmldjango nnoremap ∏ :YRPaste 'P' - " Indent tag au FileType html,jinja,htmldjango nnoremap = Vat= @@ -956,8 +950,8 @@ augroup END augroup ft_steveloshcom au! - au BufRead,BufNewFile */stevelosh/content/blog/20*/*/*.html set ft=markdown - au BufRead,BufNewFile */stevelosh/content/projects/*.html set ft=markdown + au BufRead,BufNewFile */stevelosh/content/blog/20*/*/*.html set ft=markdown spell + au BufRead,BufNewFile */stevelosh/content/projects/*.html set ft=markdown spell augroup END " }}}