From 9e4c993849e939d881068589e4ae446bde047e12 Mon Sep 17 00:00:00 2001 From: William Carroll Date: Wed, 15 Jan 2020 15:57:05 +0000 Subject: [PATCH] Support direnv DRY up environment variable definition by using direnv and an .envrc file. --- .envrc | 1 + configs/shared/.config/lf/marks | 4 ++-- configs/shared/.emacs.d/wpc/bookmark.el | 2 +- configs/shared/.emacs.d/wpc/dotfiles.el | 4 ++-- configs/shared/.profile | 1 - configs/shared/.zshrc | 3 --- 6 files changed, 6 insertions(+), 9 deletions(-) create mode 100644 .envrc diff --git a/.envrc b/.envrc new file mode 100644 index 000000000..f95eed11e --- /dev/null +++ b/.envrc @@ -0,0 +1 @@ +export DOTFILES=~/dotfiles diff --git a/configs/shared/.config/lf/marks b/configs/shared/.config/lf/marks index 79c1e2dcf..295576a0d 100644 --- a/configs/shared/.config/lf/marks +++ b/configs/shared/.config/lf/marks @@ -1,6 +1,6 @@ D:~/Dropbox G:/usr/local/google/home/wpcarro/Downloads M:/usr/local/google/home/wpcarro/Downloads -c:~/Dropbox/dotfiles/configs -d:~/Dropbox/dotfiles +c:~/dotfiles/configs +d:~/dotfiles s:~/Pictures/screenshots diff --git a/configs/shared/.emacs.d/wpc/bookmark.el b/configs/shared/.emacs.d/wpc/bookmark.el index 2a4156041..60759a841 100644 --- a/configs/shared/.emacs.d/wpc/bookmark.el +++ b/configs/shared/.emacs.d/wpc/bookmark.el @@ -52,7 +52,7 @@ Otherwise, open with `counsel-find-file'." :path "~/Dropbox/org" :kbd "o") (make-bookmark :label "dotfiles" - :path "~/Dropbox/dotfiles" + :path "~/dotfiles" :kbd "d") (make-bookmark :label "current project" :path constants/current-project diff --git a/configs/shared/.emacs.d/wpc/dotfiles.el b/configs/shared/.emacs.d/wpc/dotfiles.el index d7fd3e400..0de84f6a6 100644 --- a/configs/shared/.emacs.d/wpc/dotfiles.el +++ b/configs/shared/.emacs.d/wpc/dotfiles.el @@ -22,7 +22,7 @@ (defconst dotfiles/whitelist '(("compton" . "~/.config/compton.conf") - ("dotfiles" . "~/Dropbox/dotfiles/") + ("dotfiles" . "~/dotfiles/") ("functions" . "~/functions.zsh") ("aliases" . "~/aliases.zsh") ("variables" . "~/variables.zsh") @@ -47,7 +47,7 @@ (defun dotfiles/find-emacs-file (name) "Call `find-file' on NAME located in dotfiles's emacs.d directory." (find-file - (f-join "~/Dropbox/dotfiles/configs/shared/.emacs.d" name))) + (f-join "~/dotfiles/configs/shared/.emacs.d" name))) (when dotfiles/install-kbds? (evil-leader/set-key "J" #'dotfiles/edit) diff --git a/configs/shared/.profile b/configs/shared/.profile index 725817222..2f201c37d 100644 --- a/configs/shared/.profile +++ b/configs/shared/.profile @@ -37,7 +37,6 @@ export CM_LAUNCHER=rofi export FZF_DEFAULT_COMMAND='fd --hidden --follow --exclude ".git"' export FZF_CTRL_T_COMMAND="$FZF_DEFAULT_COMMAND" -export DOTFILES="$HOME/Dropbox/dotfiles" export ORG_DIRECTORY="$HOME/Dropbox/org" # Prevent compton from fading to the lock screen. This also prevents the white diff --git a/configs/shared/.zshrc b/configs/shared/.zshrc index 0783f3552..7f846ce54 100644 --- a/configs/shared/.zshrc +++ b/configs/shared/.zshrc @@ -21,9 +21,6 @@ command_exists() { command -v $1 >/dev/null } -# TODO: remove this from here -export DOTFILES=$HOME/Dropbox/dotfiles - # Load the oh-my-zsh library antigen use oh-my-zsh