Compare commits

..

No commits in common. "0aee305905f1c1506e392f759f75e1977ba9ebce" and "3313d963244810b2017b0781bbc62d8a46d254dd" have entirely different histories.

15 changed files with 84 additions and 117 deletions

View File

@ -13,14 +13,12 @@
(add-hook 'vterm-mode-hook #'aws-local-profile) (add-hook 'vterm-mode-hook #'aws-local-profile)
(add-hook 'term-mode-hook #'aws-local-profile) (add-hook 'term-mode-hook #'aws-local-profile)
(defun aws-list-profiles () (add-to-list 'aws-profiles "personal")
(when (not (executable-find "aws")) (add-to-list 'aws-profiles "lola-cde")
(user-error "Unable to find executable \"aws\"!")) (add-to-list 'aws-profiles "lola-gbt")
(let ((profile-string (shell-command-to-string "aws configure list-profiles")))
(s-split "\n" profile-string)))
(defun aws-switch-profile (profile) (defun aws-switch-profile (profile)
(interactive (list (completing-read "Profile: " (aws-list-profiles)))) (interactive (list (completing-read "Profile: " aws-profiles)))
(setenv "AWS_PROFILE" profile) (setenv "AWS_PROFILE" profile)
(when (eq major-mode 'vterm-mode) (when (eq major-mode 'vterm-mode)
(vterm-send-C-e) (vterm-send-C-e)
@ -28,10 +26,6 @@
(vterm-send-string (format "export AWS_PROFILE=%s\n" profile))) (vterm-send-string (format "export AWS_PROFILE=%s\n" profile)))
(setq aws-current-profile profile)) (setq aws-current-profile profile))
(defun aws-sso-login ()
(interactive)
(async-shell-command "AWS_PROFILE=default aws sso login"))
(add-hook 'emacs-startup-hook (add-hook 'emacs-startup-hook
(lambda () (lambda ()
(aws-switch-profile "default"))) (aws-switch-profile "default")))

View File

@ -1,6 +1,6 @@
;; Email in Emacs via mu4e ;; Email in Emacs via mu4e
(use-package mu4e (use-package mu4e
:straight (:local-repo (directory-file-name (file-name-directory (locate-library "mu4e"))) :type built-in) :straight (:host github :repo "djcb/mu" :files ("mu4e/*"))
:if (locate-library "mu4e") :if (locate-library "mu4e")
:commands (mu4e mu4e-update-mail-and-index) :commands (mu4e mu4e-update-mail-and-index)
:hook (after-init . (lambda () (mu4e t))) :hook (after-init . (lambda () (mu4e t)))
@ -24,7 +24,7 @@
("View in browser" . mu4e-action-view-in-browser)) ("View in browser" . mu4e-action-view-in-browser))
;; Bookmarked searches ;; Bookmarked searches
mu4e-bookmarks '((:name "Inbox" mu4e-bookmarks '((:name "Inbox"
:query "maildir:/jeremy-dormitzer-gmail-com/Inbox OR maildir:/jeremydormitzer-hummingbird-co/Inbox" :query "maildir:/jeremy-dormitzer-gmail-com/Inbox OR maildir:/jdormitzer-spotify-com/Inbox"
:key ?i) :key ?i)
(:name "Unread messages" (:name "Unread messages"
:query "flag:unread AND NOT flag:trashed" :query "flag:unread AND NOT flag:trashed"
@ -44,8 +44,7 @@
;; Let Gmail handle putting sent messages in the sent folder ;; Let Gmail handle putting sent messages in the sent folder
mu4e-sent-messages-behavior 'delete mu4e-sent-messages-behavior 'delete
;; Move to trash folder instead of adding trash flag for Gmail mailboxes ;; Move to trash folder instead of adding trash flag for Gmail mailboxes
mu4e-move-to-trash-patterns '("jeremy-dormitzer-gmail-com", mu4e-move-to-trash-patterns '("jeremy-dormitzer-gmail-com")
"jeremydormitzer-hummingbird-co")
;; HTML email rendering ;; HTML email rendering
shr-use-colors nil shr-use-colors nil
;; Make sure mu4e knows about my different accounts ;; Make sure mu4e knows about my different accounts
@ -53,20 +52,20 @@
mu4e-compose-context-policy 'ask mu4e-compose-context-policy 'ask
mu4e-contexts mu4e-contexts
`(,(make-mu4e-context `(,(make-mu4e-context
:name "Hummingbird Gmail" :name "Spotify Gmail"
:match-func (lambda (msg) :match-func (lambda (msg)
(when msg (when msg
(string-match-p (string-match-p
"jeremydormitzer-hummingbird-co" "jdormitzer-spotify-com"
(mu4e-message-field msg :path)))) (mu4e-message-field msg :path))))
:vars '((user-mail-address . "jeremydormitzer@hummingbird.co") :vars '((user-mail-address . "jdormitzer@spotify.com")
(mu4e-compose-signature . nil) (mu4e-compose-signature . nil)
(mu4e-sent-folder . "/jeremydormitzer-hummingbird-co/Sent") (mu4e-sent-folder . "/jdormitzer-spotify-com/Sent")
(mu4e-drafts-folder . "/jeremydormitzer-hummingbird-co/Drafts") (mu4e-drafts-folder . "/jdormitzer-spotify-com/Drafts")
(mu4e-refile-folder . "/jeremydormitzer-hummingbird-co/Archive") (mu4e-refile-folder . "/jdormitzer-spotify-com/Archive")
(mu4e-trash-folder . "/jeremydormitzer-hummingbird-co/Trash") (mu4e-trash-folder . "/jdormitzer-spotify-com/Trash")
(message-sendmail-extra-arguments (message-sendmail-extra-arguments
. ("-a" "jeremydormitzer-hummingbird-co")))) . ("-a" "jdormitzer-spotify-com"))))
,(make-mu4e-context ,(make-mu4e-context
:name "Personal Gmail" :name "Personal Gmail"
:match-func (lambda (msg) :match-func (lambda (msg)

View File

@ -25,6 +25,7 @@
(evil-vsplit-window-right t)) (evil-vsplit-window-right t))
(use-package evil-collection (use-package evil-collection
;; :straight (:host github :repo "meliache/evil-collection" :branch "mu4e-development")
:after evil :after evil
:config :config
(evil-collection-init '(dashboard (evil-collection-init '(dashboard

View File

@ -11,11 +11,10 @@
:config :config
(defun corfu-move-to-minibuffer () (defun corfu-move-to-minibuffer ()
(interactive) (interactive)
(pcase completion-in-region--data (when completion-in-region--data
(`(,beg ,end ,table ,pred ,extras) (let ((completion-extra-properties corfu--extra)
(let ((completion-extra-properties extras)
completion-cycle-threshold completion-cycling) completion-cycle-threshold completion-cycling)
(consult-completion-in-region beg end table pred))))) (apply #'consult-completion-in-region completion-in-region--data))))
(defun corfu-enable-in-minibuffer () (defun corfu-enable-in-minibuffer ()
"Enable Corfu in the minibuffer if `completion-at-point' is bound." "Enable Corfu in the minibuffer if `completion-at-point' is bound."
(when (where-is-internal #'completion-at-point (list (current-local-map))) (when (where-is-internal #'completion-at-point (list (current-local-map)))
@ -58,17 +57,6 @@
`(html-web-mode . ,(eglot-alternatives `(html-web-mode . ,(eglot-alternatives
'(("vscode-html-language-server" "--stdio") '(("vscode-html-language-server" "--stdio")
("html-languageserver" "--stdio"))))) ("html-languageserver" "--stdio")))))
(add-to-list 'eglot-server-programs
`((ruby-mode ruby-ts-mode) . ,(eglot-alternatives
'(("srb" "typecheck" "--lsp")
("solargraph" "socket" "--port" :autoport)))))
;; Sorbet passes an out-of-spec key in its connection JSON, filter it out to prevent eglot blowing up
(cl-defun jsonrpc-connection-receive--filter-args ((conn foreign-message) &rest args)
(let ((msg (cl-loop for (k v) on foreign-message by #'cddr
if (-contains? '(:method :id :error :params :result :jsonrpc) k)
collect k and collect v)))
(append (list conn msg) args)))
(advice-add 'jsonrpc-connection-receive :filter-args #'jsonrpc-connection-receive--filter-args)
(defvar eglot-java-java-agent nil (defvar eglot-java-java-agent nil
"Java agent JVM arg for eglot JDTLS.") "Java agent JVM arg for eglot JDTLS.")
;; Custom eglot java server for deeper customization ;; Custom eglot java server for deeper customization
@ -205,12 +193,8 @@
(c-mode . eglot-ensure) (c-mode . eglot-ensure)
(terraform-mode . eglot-ensure) (terraform-mode . eglot-ensure)
(ruby-mode . eglot-ensure) (ruby-mode . eglot-ensure)
(ruby-ts-mode . eglot-ensure)
(sh-mode . eglot-ensure)
(bash-ts-mode . eglot-ensure)
:custom :custom
(eglot-confirm-server-initiated-edits nil) (eglot-confirm-server-initiated-edits nil))
(eglot-connect-timeout nil))
;; Some compilation-mode conveniences ;; Some compilation-mode conveniences
(use-package compile (use-package compile

View File

@ -123,7 +123,4 @@
process-environment))) process-environment)))
,@body)) ,@body))
(use-package shut-up
:commands (shut-up))
(provide 'init-lib) (provide 'init-lib)

View File

@ -1,4 +0,0 @@
;; -*- lexical-binding: t; -*-
(use-package nix-mode)
(provide 'init-nix)

View File

@ -57,8 +57,8 @@
(function org-find-daily-note) (function org-find-daily-note)
"* %<%I:%M %p>") "* %<%I:%M %p>")
("n" "Org-roam note" plain (function org-roam-capture)) ("n" "Org-roam note" plain (function org-roam-capture))
("h" "Hummingbird task" entry ("s" "Spotify task" entry
(file+headline ,(expand-file-name "~/org/todo.org") "Hummingbird") (file+headline ,(expand-file-name "~/org/todo.org") "Spotify")
"* TODO %i%?") "* TODO %i%?")
("p" "Personal task" entry ("p" "Personal task" entry
(file+headline ,(expand-file-name "~/org/todo.org") "Personal") (file+headline ,(expand-file-name "~/org/todo.org") "Personal")
@ -106,12 +106,17 @@
:custom :custom
(org-super-agenda-groups `((:name "In progress" (org-super-agenda-groups `((:name "In progress"
:todo "IN PROGRESS") :todo "IN PROGRESS")
(:name "Hummingbird"
:tag "@hummingbird")
(:name "Daily" (:name "Daily"
:file-path ,(expand-file-name "~/org/daily")) :file-path ,(expand-file-name "~/org/daily"))
(:name "Spotify"
:tag "@spotify")
(:name "Lola"
:tag "@lola")
(:name "unifyDB"
:tag "@unifydb")
(:name "Personal" (:name "Personal"
:tag "@personal")))) :tag "@personal")
(:name "Jira" :file-path ,(expand-file-name "~/org/jira")))))
;; (use-package org-gcal ;; (use-package org-gcal
;; :commands (org-gcal-sync ;; :commands (org-gcal-sync

View File

@ -65,15 +65,15 @@
(pyenv--call-process "version-alias-file"))) (pyenv--call-process "version-alias-file")))
(global-pyenv-mode) (global-pyenv-mode)
(defun pyenv-switch-buffer-hook (prev curr) (defun pyenv-switch-buffer-hook (prev curr)
(shut-up (pyenv-use-corresponding))) (pyenv-use-corresponding))
;; (defun pyenv-use-corresponding-vterm-hook () (defun pyenv-use-corresponding-vterm-hook ()
;; (when (eq major-mode 'vterm-mode) (when (eq major-mode 'vterm-mode)
;; (vterm-send-C-e) (vterm-send-C-e)
;; (vterm-send-C-u) (vterm-send-C-u)
;; (vterm-send-string (format "export PYENV_VERSION=%s\n" (getenv "PYENV_VERSION"))))) (vterm-send-string (format "export PYENV_VERSION=%s\n" (getenv "PYENV_VERSION")))))
(add-hook 'switch-buffer-functions #'pyenv-switch-buffer-hook) (add-hook 'switch-buffer-functions #'pyenv-switch-buffer-hook)
(add-hook 'eshell-directory-change-hook #'pyenv-use-corresponding) (add-hook 'eshell-directory-change-hook #'pyenv-use-corresponding)
;; (add-hook 'pyenv-mode-hook #'pyenv-use-corresponding-vterm-hook) (add-hook 'pyenv-mode-hook #'pyenv-use-corresponding-vterm-hook)
:custom :custom
(pyenv-show-active-python-in-modeline nil)) (pyenv-show-active-python-in-modeline nil))

View File

@ -38,15 +38,11 @@
(defun vterm-edit-zsh-command-line () (defun vterm-edit-zsh-command-line ()
"Edit the current command line in a temp buffer." "Edit the current command line in a temp buffer."
(interactive) (interactive)
(vterm-send "C-x") (vterm-send-C-x)
(vterm-send "C-e")) (vterm-send-C-e))
(defun vterm-send-C-g ()
(interactive)
(vterm-send "C-g"))
:general :general
(leader-map "v" #'vterm) (leader-map "v" #'vterm)
(vterm-mode-map "C-x C-e" #'vterm-edit-zsh-command-line (vterm-mode-map "C-x C-e" #'vterm-edit-zsh-command-line)
"C-c C-g" #'vterm-send-C-g)
:custom :custom
(vterm-max-scrollback 10000) (vterm-max-scrollback 10000)
(vterm-environment '("TYPEWRITTEN_CURSOR=terminal")) (vterm-environment '("TYPEWRITTEN_CURSOR=terminal"))

View File

@ -37,6 +37,9 @@
(straight-use-package 'use-package) (straight-use-package 'use-package)
(setq straight-use-package-by-default t) (setq straight-use-package-by-default t)
;; Tell straight to use SSH for git connections
(setq straight-vc-git-default-protocol 'ssh)
;; "Garbage Collection Magic Hack" ;; "Garbage Collection Magic Hack"
(use-package gcmh (use-package gcmh
:demand t :demand t
@ -103,7 +106,6 @@
(require 'init-groovy) (require 'init-groovy)
(require 'init-terraform) (require 'init-terraform)
(require 'init-docker) (require 'init-docker)
(require 'init-nix)
(require 'init-lua) (require 'init-lua)
(require 'init-run-command) (require 'init-run-command)
(require 'init-aws) (require 'init-aws)

View File

@ -66,7 +66,6 @@ cask "google-cloud-sdk"
cask "intellij-idea" cask "intellij-idea"
cask "iterm2" cask "iterm2"
cask "notion" cask "notion"
cask "notion-calendar"
cask "railwaycat/emacsmacport/emacs-mac" cask "railwaycat/emacsmacport/emacs-mac"
cask "rectangle" cask "rectangle"
cask "slack" cask "slack"

View File

@ -53,53 +53,53 @@ Channel jeremy-dormitzer-gmail-com-drafts
Channel jeremy-dormitzer-gmail-com-sent Channel jeremy-dormitzer-gmail-com-sent
Channel jeremy-dormitzer-gmail-com-archive Channel jeremy-dormitzer-gmail-com-archive
IMAPAccount jeremydormitzer-hummingbird-co IMAPAccount jdormitzer-spotify-com
Host imap.gmail.com Host imap.gmail.com
User jeremydormitzer@hummingbird.co User jdormitzer@spotify.com
PassCmd "pass show hummingbird-gmail-app-password | head -n 1" PassCmd "pass show spotify-google-app-password | head -n 1"
SSLType IMAPS SSLType IMAPS
CertificateFile ~/cert.pem CertificateFile ~/cert.pem
AuthMechs LOGIN AuthMechs LOGIN
PipelineDepth 50 PipelineDepth 50
IMAPStore jeremydormitzer-hummingbird-co-remote IMAPStore jdormitzer-spotify-com-remote
Account jeremydormitzer-hummingbird-co Account jdormitzer-spotify-com
MaxSize 25M MaxSize 25M
MaildirStore jeremydormitzer-hummingbird-co-local MaildirStore jdormitzer-spotify-com-local
Path ~/.mail/jeremydormitzer-hummingbird-co/ Path ~/.mail/jdormitzer-spotify-com/
Inbox ~/.mail/jeremydormitzer-hummingbird-co/Inbox Inbox ~/.mail/jdormitzer-spotify-com/Inbox
SubFolders Verbatim SubFolders Verbatim
Channel jeremydormitzer-hummingbird-co-inbox Channel jdormitzer-spotify-com-inbox
Master :jeremydormitzer-hummingbird-co-remote:INBOX Master :jdormitzer-spotify-com-remote:INBOX
Slave :jeremydormitzer-hummingbird-co-local:Inbox Slave :jdormitzer-spotify-com-local:Inbox
Channel jeremydormitzer-hummingbird-co-all Channel jdormitzer-spotify-com-all
Master :jeremydormitzer-hummingbird-co-remote: Master :jdormitzer-spotify-com-remote:
Slave :jeremydormitzer-hummingbird-co-local: Slave :jdormitzer-spotify-com-local:
Patterns * ![Gmail]* !"[Google Mail]*" !INBOX !Inbox !Archive !Trash !Sent !Drafts Patterns * ![Gmail]* !"[Google Mail]*" !INBOX !Inbox !Archive !Trash !Sent !Drafts
Channel jeremydormitzer-hummingbird-co-trash Channel jdormitzer-spotify-com-trash
Master :jeremydormitzer-hummingbird-co-remote:"[Gmail]/Trash" Master :jdormitzer-spotify-com-remote:"[Gmail]/Trash"
Slave :jeremydormitzer-hummingbird-co-local:"Trash" Slave :jdormitzer-spotify-com-local:"Trash"
Channel jeremydormitzer-hummingbird-co-sent Channel jdormitzer-spotify-com-sent
Master :jeremydormitzer-hummingbird-co-remote:"[Gmail]/Sent Mail" Master :jdormitzer-spotify-com-remote:"[Gmail]/Sent Mail"
Slave :jeremydormitzer-hummingbird-co-local:"Sent" Slave :jdormitzer-spotify-com-local:"Sent"
Channel jeremydormitzer-hummingbird-co-drafts Channel jdormitzer-spotify-com-drafts
Master :jeremydormitzer-hummingbird-co-remote:"[Gmail]/Drafts" Master :jdormitzer-spotify-com-remote:"[Gmail]/Drafts"
Slave :jeremydormitzer-hummingbird-co-local:"Drafts" Slave :jdormitzer-spotify-com-local:"Drafts"
Channel jeremydormitzer-hummingbird-co-archive Channel jdormitzer-spotify-com-archive
Master :jeremydormitzer-hummingbird-co-remote:"[Gmail]/All Mail" Master :jdormitzer-spotify-com-remote:"[Gmail]/All Mail"
Slave :jeremydormitzer-hummingbird-co-local:"Archive" Slave :jdormitzer-spotify-com-local:"Archive"
Group jeremydormitzer-hummingbird-co Group jdormitzer-spotify-com
Channel jeremydormitzer-hummingbird-co-trash Channel jdormitzer-spotify-com-trash
Channel jeremydormitzer-hummingbird-co-inbox Channel jdormitzer-spotify-com-inbox
Channel jeremydormitzer-hummingbird-co-all Channel jdormitzer-spotify-com-all
Channel jeremydormitzer-hummingbird-co-drafts Channel jdormitzer-spotify-com-drafts
Channel jeremydormitzer-hummingbird-co-sent Channel jdormitzer-spotify-com-sent
Channel jeremydormitzer-hummingbird-co-archive Channel jdormitzer-spotify-com-archive

View File

@ -11,9 +11,9 @@ from jeremy.dormitzer@gmail.com
user jeremy.dormitzer@gmail.com user jeremy.dormitzer@gmail.com
passwordeval pass show imap.gmail.com | head -n 1 passwordeval pass show imap.gmail.com | head -n 1
account jeremydormitzer-hummingbird-co account jdormitzer-spotify-com
from jeremydormitzer@hummingbird.co from jdormitzer@spotify.com
user jeremydormitzer@hummingbird.co user jdormitzer@spotify.com
passwordeval pass show hummingbird-gmail-app-password | head -n 1 passwordeval pass show spotify-google-app-password | head -n 1
account default : jeremy-dormitzer-gmail-com account default : jeremy-dormitzer-gmail-com

View File

@ -35,9 +35,3 @@ if [ -d "/opt/homebrew/Caskroom/google-cloud-sdk" ]; then
fi fi
[[ -e "$HOME/.cargo/env" ]] && . "$HOME/.cargo/env" [[ -e "$HOME/.cargo/env" ]] && . "$HOME/.cargo/env"
# Nix
if [ -e '/nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh' ]; then
. '/nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh'
fi
# End Nix

View File

@ -93,7 +93,7 @@ fi
# Custom plugins may be added to $ZSH_CUSTOM/plugins/ # Custom plugins may be added to $ZSH_CUSTOM/plugins/
# Example format: plugins=(rails git textmate ruby lighthouse) # Example format: plugins=(rails git textmate ruby lighthouse)
# Add wisely, as too many plugins slow down shell startup. # Add wisely, as too many plugins slow down shell startup.
plugins=(git direnv pipenv npm nvm rbenv pass aws) plugins=(git direnv pipenv npm nvm rbenv)
source $ZSH/oh-my-zsh.sh source $ZSH/oh-my-zsh.sh