From 30fa212e43798ac28d6644df4877ea7741ad3a04 Mon Sep 17 00:00:00 2001 From: xeruf <27jf@pm.me> Date: Tue, 10 May 2022 15:23:01 +0200 Subject: [PATCH] config/shell: make u more versatile --- .config/doom/config.el | 4 ++-- .config/shell/functions | 12 ++++++++---- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/.config/doom/config.el b/.config/doom/config.el index f8285b3..e4b9d17 100644 --- a/.config/doom/config.el +++ b/.config/doom/config.el @@ -430,8 +430,8 @@ Version 2019-11-04 2021-02-16" (require 'org-roam-protocol) (setq org-roam-db-update-on-save nil - org-roam-extract-new-file-path "${slug}.org") - ;+org-roam-open-buffer-on-find-file nil) + org-roam-extract-new-file-path "${slug}.org" + +org-roam-auto-backlinks-buffer t) (add-hook 'org-capture-after-finalize-hook (lambda () (if (org-roam-file-p) (org-roam-db-sync)))) (setq my/org-roam-capture-props (concat ":properties:\n:id: ${slug}\n:created: %<" time-stamp-format ">\n:modified: <>\n:end:\n")) diff --git a/.config/shell/functions b/.config/shell/functions index c1cca3e..72221bd 100644 --- a/.config/shell/functions +++ b/.config/shell/functions @@ -8,7 +8,7 @@ then alias -g X1="| xargs -d '\n' -n 1" alias -g XC="| xclip -selection clipboard" alias -g L="--color=always | ${PAGER:-less}" - alias -g T=" | tree --color --fromfile . | less -F" + alias -g T=" | tree -C --fromfile . | less -F" # Edit zsh completion edcomp() { @@ -213,9 +213,13 @@ u() { which pacman-mirrors >/dev/null && sudo pacman-mirrors --geoip && sudo pacman -Syy - topgrade && - topgrade --only emacs --yes - # TODO autodetect failure in emacs and rebuild completely + if which topgrade >/dev/null + then + topgrade && + topgrade --only emacs --yes + # TODO autodetect failure in emacs and rebuild completely + else yadm l && sudo apt update && sudo apt upgrade + fi } # Networking