Compare commits

..

13 Commits

Author SHA1 Message Date
Jeremy Isaac Dormitzer
0aee305905 Add pass and aws omz plugins 2024-03-20 12:06:33 -04:00
Jeremy Isaac Dormitzer
29ed040631 Add notion-calendar cask 2024-03-20 12:06:33 -04:00
Jeremy Isaac Dormitzer
76565d4b48 Don't use ssh for straight be default 2024-03-20 12:06:33 -04:00
Jeremy Isaac Dormitzer
3cc63254ae Add vterm binding to send C-g 2024-03-20 12:06:33 -04:00
Jeremy Isaac Dormitzer
3394957063 Suppress message when switching python versions with pyenv 2024-03-20 12:06:33 -04:00
Jeremy Isaac Dormitzer
81d1164f58 Update org notes setup 2024-03-20 12:06:33 -04:00
Jeremy Isaac Dormitzer
a92a1e0eaa Add shut-up package 2024-03-20 12:06:33 -04:00
Jeremy Isaac Dormitzer
3890c5fb90 Set up eglot for ruby and bash 2024-03-20 12:06:33 -04:00
Jeremy Isaac Dormitzer
a3eb134450 Fix corfu move to minibuffer command 2024-03-20 12:06:33 -04:00
Jeremy Isaac Dormitzer
f8772c9120 Don't use custom branch for evil-mode 2024-03-20 12:06:33 -04:00
Jeremy Isaac Dormitzer
7ea370ddec Add hummingbird to email config
Update email setup

Update email for hummingbird
2024-03-20 12:06:19 -04:00
Jeremy Isaac Dormitzer
26c1c7d025 Update aws integration 2024-03-20 12:06:19 -04:00
Jeremy Isaac Dormitzer
c99cf97d63 Set up nix
Add nix-mode

Set up nix

Require nix
2024-03-20 12:06:08 -04:00
15 changed files with 117 additions and 84 deletions

View File

@ -13,12 +13,14 @@
(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)
(add-to-list 'aws-profiles "personal") (defun aws-list-profiles ()
(add-to-list 'aws-profiles "lola-cde") (when (not (executable-find "aws"))
(add-to-list 'aws-profiles "lola-gbt") (user-error "Unable to find executable \"aws\"!"))
(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-profiles))) (interactive (list (completing-read "Profile: " (aws-list-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)
@ -26,6 +28,10 @@
(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 (:host github :repo "djcb/mu" :files ("mu4e/*")) :straight (:local-repo (directory-file-name (file-name-directory (locate-library "mu4e"))) :type built-in)
: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:/jdormitzer-spotify-com/Inbox" :query "maildir:/jeremy-dormitzer-gmail-com/Inbox OR maildir:/jeremydormitzer-hummingbird-co/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,7 +44,8 @@
;; 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
@ -52,20 +53,20 @@
mu4e-compose-context-policy 'ask mu4e-compose-context-policy 'ask
mu4e-contexts mu4e-contexts
`(,(make-mu4e-context `(,(make-mu4e-context
:name "Spotify Gmail" :name "Hummingbird Gmail"
:match-func (lambda (msg) :match-func (lambda (msg)
(when msg (when msg
(string-match-p (string-match-p
"jdormitzer-spotify-com" "jeremydormitzer-hummingbird-co"
(mu4e-message-field msg :path)))) (mu4e-message-field msg :path))))
:vars '((user-mail-address . "jdormitzer@spotify.com") :vars '((user-mail-address . "jeremydormitzer@hummingbird.co")
(mu4e-compose-signature . nil) (mu4e-compose-signature . nil)
(mu4e-sent-folder . "/jdormitzer-spotify-com/Sent") (mu4e-sent-folder . "/jeremydormitzer-hummingbird-co/Sent")
(mu4e-drafts-folder . "/jdormitzer-spotify-com/Drafts") (mu4e-drafts-folder . "/jeremydormitzer-hummingbird-co/Drafts")
(mu4e-refile-folder . "/jdormitzer-spotify-com/Archive") (mu4e-refile-folder . "/jeremydormitzer-hummingbird-co/Archive")
(mu4e-trash-folder . "/jdormitzer-spotify-com/Trash") (mu4e-trash-folder . "/jeremydormitzer-hummingbird-co/Trash")
(message-sendmail-extra-arguments (message-sendmail-extra-arguments
. ("-a" "jdormitzer-spotify-com")))) . ("-a" "jeremydormitzer-hummingbird-co"))))
,(make-mu4e-context ,(make-mu4e-context
:name "Personal Gmail" :name "Personal Gmail"
:match-func (lambda (msg) :match-func (lambda (msg)

View File

@ -25,7 +25,6 @@
(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,10 +11,11 @@
:config :config
(defun corfu-move-to-minibuffer () (defun corfu-move-to-minibuffer ()
(interactive) (interactive)
(when completion-in-region--data (pcase completion-in-region--data
(let ((completion-extra-properties corfu--extra) (`(,beg ,end ,table ,pred ,extras)
(let ((completion-extra-properties extras)
completion-cycle-threshold completion-cycling) completion-cycle-threshold completion-cycling)
(apply #'consult-completion-in-region completion-in-region--data)))) (consult-completion-in-region beg end table pred)))))
(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)))
@ -57,6 +58,17 @@
`(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
@ -193,8 +205,12 @@
(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,4 +123,7 @@
process-environment))) process-environment)))
,@body)) ,@body))
(use-package shut-up
:commands (shut-up))
(provide 'init-lib) (provide 'init-lib)

View File

@ -0,0 +1,4 @@
;; -*- 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))
("s" "Spotify task" entry ("h" "Hummingbird task" entry
(file+headline ,(expand-file-name "~/org/todo.org") "Spotify") (file+headline ,(expand-file-name "~/org/todo.org") "Hummingbird")
"* 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,17 +106,12 @@
: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)
(pyenv-use-corresponding)) (shut-up (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,11 +38,15 @@
(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,9 +37,6 @@
(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
@ -106,6 +103,7 @@
(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,6 +66,7 @@ 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 jdormitzer-spotify-com IMAPAccount jeremydormitzer-hummingbird-co
Host imap.gmail.com Host imap.gmail.com
User jdormitzer@spotify.com User jeremydormitzer@hummingbird.co
PassCmd "pass show spotify-google-app-password | head -n 1" PassCmd "pass show hummingbird-gmail-app-password | head -n 1"
SSLType IMAPS SSLType IMAPS
CertificateFile ~/cert.pem CertificateFile ~/cert.pem
AuthMechs LOGIN AuthMechs LOGIN
PipelineDepth 50 PipelineDepth 50
IMAPStore jdormitzer-spotify-com-remote IMAPStore jeremydormitzer-hummingbird-co-remote
Account jdormitzer-spotify-com Account jeremydormitzer-hummingbird-co
MaxSize 25M MaxSize 25M
MaildirStore jdormitzer-spotify-com-local MaildirStore jeremydormitzer-hummingbird-co-local
Path ~/.mail/jdormitzer-spotify-com/ Path ~/.mail/jeremydormitzer-hummingbird-co/
Inbox ~/.mail/jdormitzer-spotify-com/Inbox Inbox ~/.mail/jeremydormitzer-hummingbird-co/Inbox
SubFolders Verbatim SubFolders Verbatim
Channel jdormitzer-spotify-com-inbox Channel jeremydormitzer-hummingbird-co-inbox
Master :jdormitzer-spotify-com-remote:INBOX Master :jeremydormitzer-hummingbird-co-remote:INBOX
Slave :jdormitzer-spotify-com-local:Inbox Slave :jeremydormitzer-hummingbird-co-local:Inbox
Channel jdormitzer-spotify-com-all Channel jeremydormitzer-hummingbird-co-all
Master :jdormitzer-spotify-com-remote: Master :jeremydormitzer-hummingbird-co-remote:
Slave :jdormitzer-spotify-com-local: Slave :jeremydormitzer-hummingbird-co-local:
Patterns * ![Gmail]* !"[Google Mail]*" !INBOX !Inbox !Archive !Trash !Sent !Drafts Patterns * ![Gmail]* !"[Google Mail]*" !INBOX !Inbox !Archive !Trash !Sent !Drafts
Channel jdormitzer-spotify-com-trash Channel jeremydormitzer-hummingbird-co-trash
Master :jdormitzer-spotify-com-remote:"[Gmail]/Trash" Master :jeremydormitzer-hummingbird-co-remote:"[Gmail]/Trash"
Slave :jdormitzer-spotify-com-local:"Trash" Slave :jeremydormitzer-hummingbird-co-local:"Trash"
Channel jdormitzer-spotify-com-sent Channel jeremydormitzer-hummingbird-co-sent
Master :jdormitzer-spotify-com-remote:"[Gmail]/Sent Mail" Master :jeremydormitzer-hummingbird-co-remote:"[Gmail]/Sent Mail"
Slave :jdormitzer-spotify-com-local:"Sent" Slave :jeremydormitzer-hummingbird-co-local:"Sent"
Channel jdormitzer-spotify-com-drafts Channel jeremydormitzer-hummingbird-co-drafts
Master :jdormitzer-spotify-com-remote:"[Gmail]/Drafts" Master :jeremydormitzer-hummingbird-co-remote:"[Gmail]/Drafts"
Slave :jdormitzer-spotify-com-local:"Drafts" Slave :jeremydormitzer-hummingbird-co-local:"Drafts"
Channel jdormitzer-spotify-com-archive Channel jeremydormitzer-hummingbird-co-archive
Master :jdormitzer-spotify-com-remote:"[Gmail]/All Mail" Master :jeremydormitzer-hummingbird-co-remote:"[Gmail]/All Mail"
Slave :jdormitzer-spotify-com-local:"Archive" Slave :jeremydormitzer-hummingbird-co-local:"Archive"
Group jdormitzer-spotify-com Group jeremydormitzer-hummingbird-co
Channel jdormitzer-spotify-com-trash Channel jeremydormitzer-hummingbird-co-trash
Channel jdormitzer-spotify-com-inbox Channel jeremydormitzer-hummingbird-co-inbox
Channel jdormitzer-spotify-com-all Channel jeremydormitzer-hummingbird-co-all
Channel jdormitzer-spotify-com-drafts Channel jeremydormitzer-hummingbird-co-drafts
Channel jdormitzer-spotify-com-sent Channel jeremydormitzer-hummingbird-co-sent
Channel jdormitzer-spotify-com-archive Channel jeremydormitzer-hummingbird-co-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 jdormitzer-spotify-com account jeremydormitzer-hummingbird-co
from jdormitzer@spotify.com from jeremydormitzer@hummingbird.co
user jdormitzer@spotify.com user jeremydormitzer@hummingbird.co
passwordeval pass show spotify-google-app-password | head -n 1 passwordeval pass show hummingbird-gmail-app-password | head -n 1
account default : jeremy-dormitzer-gmail-com account default : jeremy-dormitzer-gmail-com

View File

@ -35,3 +35,9 @@ 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) plugins=(git direnv pipenv npm nvm rbenv pass aws)
source $ZSH/oh-my-zsh.sh source $ZSH/oh-my-zsh.sh