Move ~/personal to $PERSONAL.
parent
69e95d403d
commit
5d32b5a8e7
|
@ -108,9 +108,12 @@ Recognized formats:
|
|||
:shortcut (getf (nthcdr 3 object) :keybinding)
|
||||
:search-url (format-c->lisp (nth 2 object)))))
|
||||
|
||||
(defun personal-file (path)
|
||||
,(str:concat (uiop:getenv "PERSONAL") "/" path))
|
||||
|
||||
(defvar my-search-engines
|
||||
(loop for file in '("~/.emacs.d/lisp/init-engine.el"
|
||||
"~/personal/bookmarks/engines.el")
|
||||
(loop for file in `("~/.emacs.d/lisp/init-engine.el"
|
||||
,(personal-file "/bookmarks/engines.el"))
|
||||
append (nyxt::with-maybe-gpg-file (s file)
|
||||
(read-emacs-engines s))))
|
||||
|
||||
|
@ -119,9 +122,9 @@ Recognized formats:
|
|||
(define-configuration buffer ; Multiple configurations work!
|
||||
((search-engines (append my-search-engines %slot-default))
|
||||
(bookmarks-path (make-instance 'bookmarks-data-path
|
||||
:basename "~/personal/bookmarks/bookmarks.lisp.gpg"))
|
||||
:basename (personal-file "bookmarks/bookmarks.lisp.gpg")))
|
||||
(auto-mode-rules-path
|
||||
(make-instance 'auto-mode-rules-data-path :basename "~/personal/bookmarks/auto-mode-rules.lisp.gpg"))))
|
||||
(make-instance 'auto-mode-rules-data-path :basename (personal-file "bookmarks/auto-mode-rules.lisp.gpg")))))
|
||||
|
||||
(define-configuration web-buffer
|
||||
((default-modes (append
|
||||
|
@ -174,7 +177,7 @@ format."
|
|||
"Restore the bookmarks from EWW."
|
||||
(handler-case
|
||||
(let ((data (with-data-file (file (make-instance 'data-path
|
||||
:basename "~/personal/bookmarks/eww-bookmarks.gpg")
|
||||
:basename (personal-file "bookmarks/eww-bookmarks.gpg"))
|
||||
:direction :input
|
||||
:if-does-not-exist nil)
|
||||
(when file
|
||||
|
|
|
@ -417,7 +417,8 @@
|
|||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
;;; Finalization
|
||||
|
||||
(load "~/personal/hackpool/hacks.el" 'noerror)
|
||||
|
||||
(load (expand-file-name "hackpool/hacks.el" (getenv "PERSONAL")) :noerror)
|
||||
|
||||
;;; Don't let `customize' clutter my config.
|
||||
(setq custom-file
|
||||
|
|
|
@ -101,6 +101,6 @@ visit otherwise."
|
|||
;; This is too slow on big buffers.
|
||||
;; (add-hook 'elfeed-search-mode-hook 'ambrevar/elfeed-setup)
|
||||
|
||||
(load "~/personal/news/elfeed.el.gpg" t)
|
||||
(load (expand-file-name "news/elfeed.el.gpg" (getenv "PERSONAL")) :noerror)
|
||||
|
||||
(provide 'init-elfeed)
|
||||
|
|
|
@ -130,6 +130,6 @@
|
|||
"http://www.youtube.com/results?search_query=%s"
|
||||
:keybinding "yt")
|
||||
|
||||
(load "~/personal/bookmarks/engines.el" t)
|
||||
(load (expand-file-name "bookmarks/engines.el" (getenv "PERSONAL")) t)
|
||||
|
||||
(provide 'init-engine)
|
||||
|
|
|
@ -195,8 +195,8 @@
|
|||
|
||||
;;; Version and encrypt history.
|
||||
;; TODO: The following makes EPA always prompt for recipients for some reason. Bug?
|
||||
;; (make-directory "~/personal/history/" :parents)
|
||||
;; (setq eshell-history-file-name (expand-file-name "eshell.gpg" "~/personal/history"))
|
||||
;; (make-directory "~/projects/personal/history/" :parents)
|
||||
;; (setq eshell-history-file-name (expand-file-name "eshell.gpg" "~/projects/personal/history"))
|
||||
;; (defun ambrevar/fix-local-epa-file-encrypt-to ()
|
||||
;; (unless (local-variable-p 'epa-file-encrypt-to (current-buffer))
|
||||
;; (make-local-variable 'epa-file-encrypt-to))
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
|
||||
(require 'helm-eww nil t)
|
||||
|
||||
(setq eww-bookmarks-directory "~/personal/bookmarks")
|
||||
(setq eww-bookmarks-directory (expand-file-name "bookmarks" (getenv "PERSONAL")))
|
||||
;; (add-to-list 'auto-mode-alist '("eww-bookmarks$" . emacs-lisp-mode))
|
||||
|
||||
(defvar ambrevar/eww-bookmarks-file (expand-file-name "eww-bookmarks.gpg"
|
||||
|
|
|
@ -121,6 +121,6 @@ If MSG is nil, use message at point."
|
|||
(interactive)
|
||||
(kill-new (mu4e-message-field (or msg (mu4e-message-at-point)) :message-id)))
|
||||
|
||||
(load "~/personal/mail/mu4e.el" t)
|
||||
(load (expand-file-name "mail/mu4e.el" (getenv "PERSONAL")) :noerror)
|
||||
|
||||
(provide 'init-mu4e)
|
||||
|
|
|
@ -27,7 +27,7 @@
|
|||
(notmuch-config-get-tags "new.tags")
|
||||
(notmuch-config-get-tags "search.exclude_tags")))
|
||||
|
||||
(defvar notmuch-dump-file (expand-file-name "~/personal/mail/notmuch.dump"))
|
||||
(defvar notmuch-dump-file (expand-file-name "mail/notmuch.dump" (getenv "PERSONAL")))
|
||||
|
||||
(defun notmuch-dump-important-tags (&optional file)
|
||||
"Dump notmuch tag database to `notmuch-dump-file'.
|
||||
|
|
|
@ -27,8 +27,8 @@
|
|||
org-catch-invisible-edits 'smart)
|
||||
|
||||
;;; Agendas.
|
||||
(add-to-list 'org-agenda-files "~/personal/todo/todo.org.gpg")
|
||||
(load "~/personal/todo/agenda-list.el" 'noerror)
|
||||
(add-to-list 'org-agenda-files (expand-file-name "todo/todo.org.gpg"(getenv "PERSONAL")))
|
||||
(load (expand-file-name "todo/agenda-list.el" (getenv "PERSONAL"))'noerror)
|
||||
|
||||
;;; Set PDF association in Org-mode (original is 'default).
|
||||
(setcdr (assoc "\\.pdf\\'" org-file-apps) 'emacs)
|
||||
|
@ -39,7 +39,7 @@
|
|||
(add-hook 'org-mode-hook fun))
|
||||
|
||||
(when (require 'org-contacts nil t)
|
||||
(let ((contacts "~/personal/contacts/contacts.org.gpg"))
|
||||
(let ((contacts (expand-file-name "contacts/contacts.org.gpg" (getenv "PERSONAL"))))
|
||||
(when (file-exists-p contacts)
|
||||
;; When used to auto-complete e-mail addresses, the file is automatically
|
||||
;; loaded. The buffer usually need not be restored by a desktop session.
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
comint-prompt-read-only t
|
||||
comint-input-ignoredups t
|
||||
woman-fill-column fill-column
|
||||
abbrev-file-name (expand-file-name "abbrev_defs" "~/personal")
|
||||
abbrev-file-name (expand-file-name "abbrev_defs" (getenv "PERSONAL"))
|
||||
frame-title-format (concat "%b" (unless (daemonp) " [serverless]"))
|
||||
delete-by-moving-to-trash t
|
||||
uniquify-buffer-name-style 'forward
|
||||
|
|
|
@ -39,9 +39,9 @@ unmount() {
|
|||
while IFS= read -r i; do
|
||||
## Generate index on exit.
|
||||
folder=$(basename $(dirname "$i"))
|
||||
mkdir -p ~/personal/index/"$folder"
|
||||
mkdir -p "$PERSONAL"/index/"$folder"
|
||||
dataindex "$i" | gpg --encrypt --recipient mail@ambrevar.xyz \
|
||||
--output - > ~/personal/index/"$folder"/"$(basename "$i")".index.gpg
|
||||
--output - > "$PERSONAL"/index/"$folder"/"$(basename "$i")".index.gpg
|
||||
unset folder
|
||||
fusermount -u "$i"
|
||||
rmdir "$i"
|
||||
|
|
|
@ -34,7 +34,7 @@ echo "==> Files to be removed (beside trash):"
|
|||
echo "$@" | sed 's/ /\n/g'
|
||||
echo
|
||||
echo "==> Critical data:"
|
||||
for i in ~/.cache/mail ~/.password-store ~/personal ~/.ssh/*.pub; do
|
||||
for i in ~/.cache/mail ~/.password-store "$PERSONAL" ~/.ssh/*.pub; do
|
||||
[ -e "$i" ] && echo ":: WARNING: Found '$i'."
|
||||
done
|
||||
if [ -n "$(gpg --list-secret-keys)" ]; then
|
||||
|
|
|
@ -14,7 +14,7 @@ EXTRA_SUBSTITUTE_URLS=
|
|||
## Hardcoded in .mbsyncrc:
|
||||
MAIL_CACHE="$HOME/.cache/mail"
|
||||
|
||||
[ -z "$SOURCEDIR" ] && SOURCEDIR="$HOME/personal"
|
||||
[ -z "$SOURCEDIR" ] && SOURCEDIR="$PERSONAL"
|
||||
[ -z "$XDG_CONFIG_HOME" ] && XDG_CONFIG_HOME="$HOME/.config"
|
||||
[ -z "$XDG_DATA_HOME" ] && XDG_DATA_HOME="$HOME/.local/share"
|
||||
[ -z "$XDG_BIN_HOME" ] && XDG_BIN_HOME="$XDG_DATA_HOME/../bin"
|
||||
|
|
|
@ -5,7 +5,7 @@ usage() {
|
|||
Usage: ${0##*/}
|
||||
|
||||
Sync home folder.
|
||||
Data is indexed to ~/personal/index.
|
||||
Data is indexed to \$PERSONAL/index.
|
||||
|
||||
The '~/.gnupg' folder can be backup up to a LUKS encrypted device.
|
||||
|
||||
|
@ -42,7 +42,7 @@ done
|
|||
|
||||
shift $(($OPTIND - 1))
|
||||
|
||||
PERSONAL_FOLDER="$HOME/personal"
|
||||
[ -z "$PERSONAL" ] && echo >&2 'Set $PERSONAL to project directory.' && exit 1
|
||||
[ -z "$XDG_CONFIG_HOME" ] && XDG_CONFIG_HOME="$HOME/.config"
|
||||
[ -z "$XDG_DATA_HOME" ] && XDG_DATA_HOME="$HOME/.local/share"
|
||||
|
||||
|
@ -62,7 +62,7 @@ message() {
|
|||
if [ -n "$OPT_DATAROOT" ]; then
|
||||
section Data index
|
||||
for i in "$OPT_DATAROOT"/*; do
|
||||
mkdir -p ~/personal/index/
|
||||
mkdir -p "$PERSONAL"/index/
|
||||
case "$i" in
|
||||
*/locate.db|*/lost+found|*/Sync*)
|
||||
continue ;;
|
||||
|
@ -72,21 +72,21 @@ if [ -n "$OPT_DATAROOT" ]; then
|
|||
*/games|*/videos)
|
||||
for k in "$j"/*; do
|
||||
folder=$(basename $(dirname "$k"))
|
||||
mkdir -p ~/personal/index/"$folder"
|
||||
dataindex "$k" > ~/personal/index/"$folder"/"$(basename "$k")".index
|
||||
mkdir -p /index/"$folder"
|
||||
dataindex "$k" > "$PERSONAL"/index/"$folder"/"$(basename "$k")".index
|
||||
unset folder
|
||||
done ;;
|
||||
*)
|
||||
dataindex "$j" > ~/personal/index/"$(basename "$j")".index ;;
|
||||
dataindex "$j" > "$PERSONAL"/index/"$(basename "$j")".index ;;
|
||||
esac
|
||||
done
|
||||
continue ;;
|
||||
*/private)
|
||||
for j in "$i"/*; do
|
||||
mkdir -p ~/personal/index/private
|
||||
mkdir -p "$PERSONAL"/index/private
|
||||
[ -e "$j"/.encfs*.xml ] && continue
|
||||
dataindex "$j" | gpg --encrypt --recipient mail@ambrevar.xyz \
|
||||
--output - > ~/personal/index/private/"$(basename "$j")".index.gpg
|
||||
--output - > "$PERSONAL"/index/private/"$(basename "$j")".index.gpg
|
||||
done
|
||||
continue ;;
|
||||
esac
|
||||
|
@ -110,12 +110,12 @@ fi
|
|||
|
||||
if [ -e ~/.cache/mail/.notmuch ]; then
|
||||
section "Notmuch tags"
|
||||
notmuch restore --accumulate --input=$HOME/personal/mail/notmuch.dump
|
||||
notmuch restore --accumulate --input=$HOME/projects/personal/mail/notmuch.dump
|
||||
emacs --quick --batch --load=$HOME/.emacs.d/lisp/init-notmuch-sync.el \
|
||||
-f notmuch-dump-important-tags
|
||||
fi
|
||||
|
||||
for i in ~/personal/games/stowed-saves/*; do
|
||||
for i in "$PERSONAL"/games/stowed-saves/*; do
|
||||
section "Stowing '$i'"
|
||||
stow -t ~ -d "$(dirname "$i")" "$(basename "$i")"
|
||||
done
|
||||
|
@ -135,7 +135,7 @@ project_status() {
|
|||
echo "$body"
|
||||
}
|
||||
|
||||
for i in ~/dotfiles ~/.password-store ~/personal ~/projects/* ~/.local/share/emacs/site-lisp/* "$@"; do
|
||||
for i in ~/.password-store ~/common-lisp/* ~/projects/* ~/.local/share/emacs/site-lisp/* "$@"; do
|
||||
[ ! -d "$i/.git" ] && continue
|
||||
CHANGED=true
|
||||
push=$(git -C "$i" rev-parse --abbrev-ref --symbolic-full-name @{push} 2>&1)
|
||||
|
|
|
@ -5,9 +5,9 @@
|
|||
# --expose="$HOME/.config/nyxt/" \
|
||||
# --expose="$HOME/common-lisp/" \
|
||||
# --expose="$HOME/.emacs.d/" \
|
||||
# --expose="$HOME/personal/bookmarks/engines.el" \
|
||||
# --expose="$PERSONAL/bookmarks/engines.el" \
|
||||
# --share="$HOME/.local/share/nyxt/"="$HOME/.local/share/nyxt/" \
|
||||
# --share="$HOME/personal/bookmarks/bookmarks.lisp.gpg"="$HOME/personal/bookmarks/bookmarks.lisp.gpg" \
|
||||
# --share="$PERSONAL/bookmarks/bookmarks.lisp.gpg"="$PERSONAL/bookmarks/bookmarks.lisp.gpg" \
|
||||
# --ad-hoc nss-certs nyxt -- nyxt "$@"
|
||||
|
||||
~/common-lisp/nyxt/nyxt "$@"
|
||||
|
|
7
.profile
7
.profile
|
@ -18,6 +18,9 @@ prependpath () {
|
|||
eval export $PATHVAR="$1:\$$PATHVAR"
|
||||
}
|
||||
|
||||
## Custom paths
|
||||
export PERSONAL="$HOME/projects/personal"
|
||||
|
||||
## Cask
|
||||
appendpath "$HOME/.cask/bin"
|
||||
|
||||
|
@ -45,10 +48,10 @@ if command -v progress >/dev/null 2>&1; then
|
|||
fi
|
||||
|
||||
## Use this to override system executables.
|
||||
prependpath "${HOME}/personal/hackpool"
|
||||
prependpath "$PERSONAL/hackpool"
|
||||
|
||||
## Last PATH entries.
|
||||
appendpath "${HOME}/.local/bin"
|
||||
appendpath "$HOME/.local/bin"
|
||||
|
||||
## Remove less history.
|
||||
LESSHISTFILE='-'
|
||||
|
|
Loading…
Reference in New Issue