From a8a9b68dca50d829c45c10803b3ed2329724726e Mon Sep 17 00:00:00 2001 From: Alan Pearce Date: Mon, 28 Aug 2017 15:17:25 +0200 Subject: zsh: Default to current ledger file --- zsh/.config/zsh/.zshenv | 2 ++ 1 file changed, 2 insertions(+) diff --git a/zsh/.config/zsh/.zshenv b/zsh/.config/zsh/.zshenv index 4f7b20f..797dc62 100644 --- a/zsh/.config/zsh/.zshenv +++ b/zsh/.config/zsh/.zshenv @@ -70,4 +70,6 @@ then export GTAGSLABEL=ctags export GHQ_ROOT="$HOME/projects:$HOME/go/src" + + export LEDGER_FILE="$HOME/Sync/Default/ledger/my.ledger" fi -- cgit 1.4.1 From 51784ea0031ab238e3c9fa6c5e18c12e2ee56225 Mon Sep 17 00:00:00 2001 From: Alan Pearce Date: Tue, 29 Aug 2017 10:17:16 +0200 Subject: Emacs: Load mu4e only if mu executable is present --- emacs/.emacs.d/main.el | 95 +++++++++++++++++++++++++------------------------- 1 file changed, 48 insertions(+), 47 deletions(-) diff --git a/emacs/.emacs.d/main.el b/emacs/.emacs.d/main.el index 17d38b1..69f584e 100644 --- a/emacs/.emacs.d/main.el +++ b/emacs/.emacs.d/main.el @@ -1368,53 +1368,54 @@ ;; *** mu ;; #+BEGIN_SRC emacs-lisp -(add-to-list 'load-path (expand-file-name - "../share/emacs/site-lisp/mu4e" - (f-dirname - (file-truename - (executable-find "mu"))))) -(use-package mu4e - :config - (setq mu4e-use-fancy-chars nil - mu4e-attachment-dir "~/Downloads/" - mu4e-view-show-images t - mu4e-headers-date-format "%Y-%m-%d %H:%M" - - mu4e-maildir (expand-file-name "~/mail/alanpearce") - mu4e-sent-folder "/Sent" - mu4e-drafts-folder "/Drafts" - mu4e-refile-folder "/Archive" - mu4e-trash-folder "/Trash" - - message-send-mail-function #'message-send-mail-with-sendmail - sendmail-program "msmtp" - - mu4e-maildir-shortcuts '(("/INBOX" . ?i)) - ;; mu4e-get-mail-command "offlineimap -o" - mu4e-contexts - (list - (make-mu4e-context - :name "Personal" - :match-func (lambda (msg) - (when msg - (mu4e-message-contact-field-matches - msg :to "alan@alanpearce\..*"))) - :vars '((user-mail-address . "alan@alanpearce.eu"))) - (make-mu4e-context - :name "Work" - :match-func (lambda (msg) - (when msg - (mu4e-message-contact-field-matches - msg :to "alan.*@satoshipay.io"))) - :vars '((user-mail-address . "alan@satoshipay.io")))) - mu4e-user-mail-address-list (append - (delq nil - (mapcar (lambda (context) - (when (mu4e-context-vars context) - (cdr (assq 'user-mail-address (mu4e-context-vars context))))) - mu4e-contexts)) - '("alan@alanpearce.uk" - "alan@alanpearce.co.uk")))) +(when (executable-find "mu") + (add-to-list 'load-path (expand-file-name + "../share/emacs/site-lisp/mu4e" + (f-dirname + (file-truename + (executable-find "mu"))))) + (use-package mu4e + :config + (setq mu4e-use-fancy-chars nil + mu4e-attachment-dir "~/Downloads/" + mu4e-view-show-images t + mu4e-headers-date-format "%Y-%m-%d %H:%M" + + mu4e-maildir (expand-file-name "~/mail/alanpearce") + mu4e-sent-folder "/Sent" + mu4e-drafts-folder "/Drafts" + mu4e-refile-folder "/Archive" + mu4e-trash-folder "/Trash" + + message-send-mail-function #'message-send-mail-with-sendmail + sendmail-program "msmtp" + + mu4e-maildir-shortcuts '(("/INBOX" . ?i)) + ;; mu4e-get-mail-command "offlineimap -o" + mu4e-contexts + (list + (make-mu4e-context + :name "Personal" + :match-func (lambda (msg) + (when msg + (mu4e-message-contact-field-matches + msg :to "alan@alanpearce\..*"))) + :vars '((user-mail-address . "alan@alanpearce.eu"))) + (make-mu4e-context + :name "Work" + :match-func (lambda (msg) + (when msg + (mu4e-message-contact-field-matches + msg :to "alan.*@satoshipay.io"))) + :vars '((user-mail-address . "alan@satoshipay.io")))) + mu4e-user-mail-address-list (append + (delq nil + (mapcar (lambda (context) + (when (mu4e-context-vars context) + (cdr (assq 'user-mail-address (mu4e-context-vars context))))) + mu4e-contexts)) + '("alan@alanpearce.uk" + "alan@alanpearce.co.uk"))))) ;; #+END_SRC ;; *** BBDB -- cgit 1.4.1 From 82485764d3001c5759bb2e56a4e2779633dcc644 Mon Sep 17 00:00:00 2001 From: Alan Pearce Date: Tue, 29 Aug 2017 14:33:44 +0200 Subject: zsh: Don't configure GPG SSH agent on osx --- zsh/.config/zsh/.zshenv | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/zsh/.config/zsh/.zshenv b/zsh/.config/zsh/.zshenv index 797dc62..dc84f1d 100644 --- a/zsh/.config/zsh/.zshenv +++ b/zsh/.config/zsh/.zshenv @@ -10,12 +10,6 @@ then . $ZDOTDIR/zshenv.private fi - unset SSH_AGENT_PID - if [[ "${gnupg_SSH_AUTH_SOCK_by:-0}" -ne $$ ]] - then - export SSH_AUTH_SOCK="$(gpgconf --list-dirs agent-ssh-socket)" - fi - if [[ -e $HOME/.nix-profile/etc/profile.d/nix.sh ]] then . $HOME/.nix-profile/etc/profile.d/nix.sh; @@ -47,6 +41,15 @@ then fi fi + if [[ $os != "darwin" ]] + then + unset SSH_AGENT_PID + if [[ "${gnupg_SSH_AUTH_SOCK_by:-0}" -ne $$ ]] + then + export SSH_AUTH_SOCK="$(gpgconf --list-dirs agent-ssh-socket)" + fi + fi + case $MACHTYPE in *64) arch=amd64 -- cgit 1.4.1 From 508479288c0843099d8f11da65a62e3d20950af8 Mon Sep 17 00:00:00 2001 From: Alan Pearce Date: Tue, 29 Aug 2017 16:57:33 +0200 Subject: Remove sshrc --- ssh/.ssh/rc | 5 ----- 1 file changed, 5 deletions(-) delete mode 100755 ssh/.ssh/rc diff --git a/ssh/.ssh/rc b/ssh/.ssh/rc deleted file mode 100755 index 59e4cfd..0000000 --- a/ssh/.ssh/rc +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/sh -if [ "$SSH_AUTH_SOCK" ] -then - ln -sf $SSH_AUTH_SOCK ~/.ssh/ssh_auth_sock -fi -- cgit 1.4.1