Various dotfile changes. Emacs, mail, music, etc.

master
Dustin Swan 8 years ago
parent 9eceac229e
commit bb5320b9d2

Binary file not shown.

@ -0,0 +1,34 @@
#!/usr/bin/env /usr/local/bin/node
const bitbar = require('bitbar');
const exec = require('child_process').exec;
let cmd = `/usr/local/bin/mu find flag:unread AND NOT flag:trashed AND \\(maildir:/Fastmail/INBOX OR maildir:/IOCOM/INBOX\\) --fields \"l f s\"`;
exec(cmd, function(error, stdout, stderr) {
let mails = stderr.match(/no matches/)
? []
: stdout.trim().split("\n").map(parseMailString);
bitbar([
':envelope:' + mails.length || "",
bitbar.sep,
...mails
]);
});
function parseMailString(m) {
const MAX = 80;
let matches = m.match(/([^\s]+)\s(.*)/);
let filename = matches[1];
let text = matches[2].substring(0, MAX) + (matches[2].length > MAX ? "..." : "");
return {
text,
bash: "/usr/local/bin/emacsclient -n " + filename,
terminal: false
}
}

@ -1,6 +1,21 @@
{
"profiles": [
{
"devices": [],
"fn_function_keys": {
"f1": "vk_consumer_brightness_down",
"f10": "mute",
"f11": "volume_down",
"f12": "volume_up",
"f2": "vk_consumer_brightness_up",
"f3": "vk_mission_control",
"f4": "vk_launchpad",
"f5": "vk_consumer_illumination_down",
"f6": "vk_consumer_illumination_up",
"f7": "vk_consumer_previous",
"f8": "vk_consumer_play",
"f9": "vk_consumer_next"
},
"name": "Default profile",
"selected": true,
"simple_modifications": {

@ -0,0 +1,8 @@
visualizer_fifo_path = "/tmp/mpd.fifo"
visualizer_output_name = "my_fifo"
visualizer_sync_interval = "30"
visualizer_in_stereo = "yes"
#visualizer_type = "wave" (spectrum/wave)
#visualizer_type = "spectrum" (spectrum/wave)
mpd_music_dir = "/Users/dustinswan/Music"
user_interface = alternative

@ -72,7 +72,7 @@ values."
emacs-lisp
common-lisp
scheme
(haskell :variables haskell-enable-hindent-style "fundamental")
(haskell :variables haskell-enable-hindent-style "johan-tibell" haskell-completion-backend 'intero)
idris
purescript
elm
@ -139,7 +139,10 @@ values."
;; with `:variables' keyword (similar to layers). Check the editing styles
;; section of the documentation for details on available variables.
;; (default 'vim)
dotspacemacs-editing-style 'vim
dotspacemacs-editing-style '(hybrid :variables
hybrid-mode-enable-evilified-state t
hybrid-mode-enable-hjkl-bindings t
hybrid-mode-default-state 'normal)
;; If non nil output loading progress in `*Messages*' buffer. (default nil)
dotspacemacs-verbose-loading nil
;; Specify the startup banner. Default value is `official', it displays
@ -156,7 +159,8 @@ values."
;; List sizes may be nil, in which case
;; `spacemacs-buffer-startup-lists-length' takes effect.
dotspacemacs-startup-lists '((recents . 5)
(projects . 7))
(projects . 7)
(bookmarks . 5))
;; True if the home buffer should respond to resize events.
dotspacemacs-startup-buffer-responsive t
;; Default major mode of the scratch buffer (default `text-mode')
@ -337,6 +341,8 @@ in `dotspacemacs/user-config'."
This function is called at the very end of Spacemacs initialization after
layers configuration. You are free to put any user code."
(spacemacs/toggle-transparency)
(spacemacs|define-custom-layout "@Mail"
:binding "m"
:body
@ -390,11 +396,15 @@ layers configuration. You are free to put any user code."
mu4e-html2text-command "w3m -dump -T text/html"
w3m-command "/usr/local/bin/w3m"
org-mu4e-link-query-in-headers-mode nil
;; Sending Mail
message-send-mail-function 'message-send-mail-with-sendmail
message-sendmail-extra-arguments '("--read-envelope-from")
message-sendmail-f-is-evil 't
sendmail-program "/usr/local/bin/msmtp"
mu4e-hide-index-messages 't
)
(when (fboundp 'imagemagick-register-types)
@ -478,11 +488,20 @@ layers configuration. You are free to put any user code."
;; Org
(with-eval-after-load 'org
(setq org-startup-indented t)
(setq org-agenda-files '("~/Sync/Notes"
"~/Sync/org.org"
"~/Sync/IOCOM/IOCOM.org"))
(setq org-directory "~/Sync/Notes/")
;; Capture
(setq org-capture-templates
'(("t" "TODO" entry (file+headline "~/Sync/org.org" "Inbox")
"* TODO [#A] %?\nSCHEDULED: %(org-insert-time-stamp (org-read-date nil t \"+0d\"))\n%a\n")
("i" "IOCOM TODO" entry (file+headline "~/Sync/IOCOM/IOCOM.org" "Inbox")
"* TODO [#A] %?\nSCHEDULED: %(org-insert-time-stamp (org-read-date nil t \"+0d\"))\n%a\n")))
;; Org Journal
(setq org-journal-dir "~/Sync/Notes/"
org-journal-file-format "%Y%m%d.org")
@ -509,8 +528,8 @@ layers configuration. You are free to put any user code."
"<div class='bio'>
<img src='static/avatar.png'></img>
<h1>Dustin Swan</h1>
<p>Software Engineer at IOCOM. JavaScript, Haskell, functional programming, design, piano, motorcycles, languages, games, bikes, books, fashion, minimalism, spreadsheets, travel, etc.</p>
<h5>Moriarty, NM | Chicago, IL</h5>
<p>Software Engineer at IOCOM. Interested in decentralization, pure functional programming, types, math, Emacs, design, piano, motorcycles, languages, games, bikes, books, fashion, spreadsheets, travel, climbing, speedcubing, etc.</p>
<h5>Troy NY</h5>
<a href='mailto://dustin@dustinswan.com'><i class='fa fa-envelope'></i></a>
<a href='https://twitter.com/dustinswan'><i class='fa fa-twitter'></i></a>
<a href='http://github.com/dustinswan'><i class='fa fa-github'></i></a>
@ -576,7 +595,7 @@ layers configuration. You are free to put any user code."
)))
)
(setq wttrin-default-cities '("Moriarty NM" "Albuquerque" "Chicago"))
(setq wttrin-default-cities '("Troy NY" "Albuquerque" "Chicago"))
(setq tramp-default-method "ssh")
@ -593,11 +612,11 @@ layers configuration. You are free to put any user code."
;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right.
'(ac-ispell-requires 4 t)
'(ahs-case-fold-search nil)
'(ahs-default-range (quote ahs-range-whole-buffer))
'(ahs-idle-interval 0.25)
'(ahs-case-fold-search nil t)
'(ahs-default-range (quote ahs-range-whole-buffer) t)
'(ahs-idle-interval 0.25 t)
'(ahs-idle-timer 0 t)
'(ahs-inhibit-face-list nil)
'(ahs-inhibit-face-list nil t)
'(erc-modules
(quote
(autoaway button completion list match move-to-prompt netsplit networks notify notifications readonly scrolltobottom services smiley spelling track completion autoaway autojoin button log match menu move-to-prompt netsplit notify notifications readonly ring scrolltobottom spelling track image hl-nicks networks services)))
@ -606,8 +625,11 @@ layers configuration. You are free to put any user code."
'(mac-auto-operator-composition-mode t)
'(org-journal-date-format "%A, %B %d, %Y")
'(org-journal-time-format "%R %Z")
'(package-selected-packages
(quote
(auctex counsel smartparens go-mode haskell-mode flycheck magit with-editor yasnippet rake company ivy helm helm-core xterm-color auctex-latexmk yapfify yaml-mode xkcd wttrin ws-butler writeroom-mode wolfram-mode window-numbering which-key wgrep web-mode web-beautify volatile-highlights vi-tilde-fringe vdirel uuidgen use-package typit twittering-mode tumblesocks toml-mode toc-org thrift tagedit stan-mode spray spotify spacemacs-theme spaceline smex smeargle slime-company slim-mode shell-pop scss-mode scad-mode sass-mode rvm ruby-tools ruby-test-mode rubocop rspec-mode robe reveal-in-osx-finder restclient restart-emacs request rbenv ranger rainbow-mode rainbow-identifiers rainbow-delimiters racer quelpa qml-mode pyvenv pytest pyenv-mode py-isort pug-mode psci psc-ide projectile-rails popwin pip-requirements phpunit phpcbf php-extras php-auto-yasnippets persp-mode pbcopy paradox pandoc-mode pacmacs p4 ox-pandoc ox-gfm osx-trash osx-dictionary orgit org-projectile org-present org-pomodoro org-plus-contrib org-journal org-download org-bullets open-junk-file ob-http neotree mwim multi-term mu4e-maildirs-extension mu4e-alert move-text monokai-theme mmm-mode minitest mingus matlab-mode markdown-toc magit-gitflow magit-gh-pulls lorem-ipsum livid-mode live-py-mode linum-relative link-hint less-css-mode ledger-mode launchctl julia-mode json-mode js2-refactor js-doc ivy-hydra intero insert-shebang info+ indent-guide idris-mode ido-vertical-mode hy-mode hungry-delete hlint-refactor hl-todo hindent highlight-parentheses highlight-numbers highlight-indentation hide-comnt help-fns+ helm-make haskell-snippets hackernews google-translate golden-ratio go-guru go-eldoc gnuplot gitignore-mode github-search github-clone github-browse-file gitconfig-mode gitattributes-mode git-timemachine git-messenger git-link git-gutter-fringe git-gutter-fringe+ gist gh-md geiser flyspell-correct-ivy flycheck-rust flycheck-pos-tip flycheck-ledger flycheck-haskell flycheck-elm flx-ido fish-mode fill-column-indicator feature-mode fancy-battery eyebrowse expand-region exec-path-from-shell evil-visualstar evil-visual-mark-mode evil-unimpaired evil-tutor evil-surround evil-snipe evil-search-highlight-persist evil-numbers evil-nerd-commenter evil-mc evil-matchit evil-magit evil-lisp-state evil-indent-plus evil-iedit-state evil-exchange evil-escape evil-ediff evil-args evil-anzu eval-sexp-fu eshell-z eshell-prompt-extras esh-help erc-yt erc-view-log erc-terminal-notifier erc-social-graph erc-image erc-hl-nicks engine-mode emoji-cheat-sheet-plus emmet-mode elm-mode elisp-slime-nav dumb-jump drupal-mode disaster diff-hl deft cython-mode counsel-projectile company-web company-tern company-statistics company-shell company-go company-ghci company-ghc company-emoji company-cabal company-c-headers company-auctex company-anaconda common-lisp-snippets column-enforce-mode color-identifiers-mode coffee-mode cmm-mode cmake-mode clean-aindent-mode clang-format chruby chess cargo bundler bracketed-paste beacon auto-yasnippet auto-highlight-symbol auto-dictionary auto-compile arduino-mode aggressive-indent adaptive-wrap ace-window ace-link ac-ispell 2048-game)))
'(paradox-github-token t)
'(ring-bell-function (quote ignore) t))
'(ring-bell-function (quote ignore)))
(custom-set-faces
;; custom-set-faces was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.

@ -1,3 +1,7 @@
Host dswan
HostName dswan.insors.net
HostName dswan.iocom.com
User root
Host dustinswan
HostName dustinswan.com
User dustinswan

@ -21,6 +21,7 @@ rm ~/.muttrc; ln -s ~/dotfiles/muttrc ~/.muttrc
# mac only
rm ~/Library/KeyBindings/DefaultKeyBinding.dict; cp ~/dotfiles/DefaultKeyBinding.dict ~/Library/KeyBindings/DefaultKeyBinding.dict
rm ~/.karabiner.d/configuration/karabiner.json; ln -s ~/dotfiles/karabiner.json ~/.karabiner.d/configuration/karabiner.json
touch ~/.hushlogin
# linux only
rm -rf ~/.i3; mkdir ~/.i3; ln -s ~/dotfiles/i3/config ~/.i3/config

@ -1,39 +1,39 @@
[general]
status_path = ~/.vdirsyncer/status/
status_path = "~/.vdirsyncer/status/"
[pair fastmail_contacts]
a = fastmail_contacts_local
b = fastmail_contacts_remote
a = "fastmail_contacts_local"
b = "fastmail_contacts_remote"
collections = ["from b"]
conflict_resolution = b wins
conflict_resolution = "b wins"
[storage fastmail_contacts_local]
type = filesystem
path = ~/Contacts/
fileext = .vcf
type = "filesystem"
path = "~/Contacts/"
fileext = ".vcf"
[storage fastmail_contacts_remote]
type = carddav
url = https://carddav.messagingengine.com
auth = basic
username = dustinswan@fastmail.com
type = "carddav"
url = "https://carddav.messagingengine.com"
auth = "basic"
username = "dustinswan@fastmail.com"
password.fetch = ["command", "~/dotfiles/bin/decrypt_password.sh", "dustinswan@fastmail.com"]
[pair fastmail_calendar]
a = fastmail_calendar_local
b = fastmail_calendar_remote
a = "fastmail_calendar_local"
b = "fastmail_calendar_remote"
collections = ["from b"]
conflict_resolution = b wins
conflict_resolution = "b wins"
metadata = ["color", "displayname"]
[storage fastmail_calendar_local]
type = filesystem
path = ~/Calendars/
fileext = .ics
type = "filesystem"
path = "~/Calendars/"
fileext = ".ics"
[storage fastmail_calendar_remote]
type = caldav
url = https://caldav.messagingengine.com/
auth = basic
username = dustinswan@fastmail.com
type = "caldav"
url = "https://caldav.messagingengine.com/"
auth = "basic"
username = "dustinswan@fastmail.com"
password.fetch = ["command", "~/dotfiles/bin/decrypt_password.sh", "dustinswan@fastmail.com"]

11
zshrc

@ -18,18 +18,13 @@ alias vi=nvim
alias vim=nvim
alias l="ls -la"
alias ta="tmux attach -d"
alias dustinswan="ssh dustinswan@dustinswan.com"
alias kill_offlineimap="ps aux | grep offlineimap | awk '{ print $2 }' | xargs kill -9"
alias e='emacsclient -a "" -t -nw'
alias weather='curl http://wttr.in'
export EDITOR=nvim
export MOSH_TITLE_NOPREFIX=1
export BROWSER=open
# IOCOM stuff
alias dswan="ssh root@dswan.iocom.com"
export P4USER=dswan
export P4PORT="humu.iocom.com:1666"
export P4CONFIG=p4.cfg
@ -40,7 +35,6 @@ alias er='rm -rf logs; unzip -o'
export PATH=$HOME/.local/bin:$PATH # Stack
export PATH=$HOME/dotfiles/bin:$PATH
export PATH=$HOME/.npm-packages/bin:$PATH
# export PYTHONPATH=$PYTHONPATH:/usr/local/lib/python2.7/site-packages
# nix
if [ -e $HOME/.nix-profile/etc/profile.d/nix.sh ]; then . $HOME/.nix-profile/etc/profile.d/nix.sh; fi
@ -51,10 +45,11 @@ if [ -e $HOME/.nix-profile/etc/profile.d/nix.sh ]; then . $HOME/.nix-profile/etc
# export SSL_CERT_FILE=${OPENSSL_X509_CERT_FILE}
# Keychain
eval `keychain --eval id_rsa`
export GPG_AGENT_INFO="~/.gnupg/S.gpg-agent:$(pgrep gpg-agent):1" # Take this out when keychain fixes this bug
eval `keychain --eval --inherit any --agents gpg,ssh --quiet id_rsa 2B3A6377`
# Homebrew Github Token
export HOMEBREW_GITHUB_API_TOKEN=`gpg -d ~/.homebrew@github-password.gpg`
alias brew='[[ $HOMEBREW_GITHUB_API_TOKEN ]] || export HOMEBREW_GITHUB_API_TOKEN=`gpg -d ~/.homebrew@github-password.gpg`; brew'
# Heroku Toolbelt
export PATH="/usr/local/heroku/bin:$PATH"

Loading…
Cancel
Save