mirror of
https://codeberg.org/andyscott/dotfiles.git
synced 2024-12-22 18:03:11 -05:00
Compare commits
No commits in common. "7fd5d52b26729108c95fd20dd3cf3bba96f1dc4c" and "b106c6392aa50a65032589af4e6fa31a3133cd7e" have entirely different histories.
7fd5d52b26
...
b106c6392a
13 changed files with 236 additions and 783 deletions
|
@ -19,12 +19,16 @@ export XDG_STATE_HOME="${HOME}/.local/state"
|
||||||
export _JAVA_AWT_WM_NONREPARENTING=1
|
export _JAVA_AWT_WM_NONREPARENTING=1
|
||||||
|
|
||||||
# GPG passphrase prompt
|
# GPG passphrase prompt
|
||||||
GPG_TTY=$(tty)
|
export GPG_TTY=$(tty)
|
||||||
export GPG_TTY
|
|
||||||
|
|
||||||
# Mozilla + Wayland
|
# Mozilla + Wayland
|
||||||
export MOZ_ENABLE_WAYLAND=1
|
export MOZ_ENABLE_WAYLAND=1
|
||||||
|
|
||||||
|
{{ if eq .chezmoi.hostname "helix" -}}
|
||||||
|
# Scale GTK applicatons
|
||||||
|
export GDK_SCALE=2 GDK_DPI_SCALE=0.50
|
||||||
|
{{- end }}
|
||||||
|
|
||||||
## No littering in $HOME!
|
## No littering in $HOME!
|
||||||
|
|
||||||
# bash
|
# bash
|
||||||
|
@ -77,4 +81,4 @@ export XAUTHORITY="${XDG_RUNTIME_DIR}/Xauthority"
|
||||||
[[ -f ~/.bashrc ]] && . ~/.bashrc
|
[[ -f ~/.bashrc ]] && . ~/.bashrc
|
||||||
|
|
||||||
# start river
|
# start river
|
||||||
[[ -z $DISPLAY && $(tty) = "/dev/tty1" ]] && exec dbus-run-session river 2> "${XDG_STATE_HOME}"/river.log >/dev/null
|
[[ -z $DISPLAY && $(tty) = "/dev/tty1" ]] && exec dbus-run-session river
|
|
@ -17,12 +17,8 @@ y = 20
|
||||||
shape = "Block"
|
shape = "Block"
|
||||||
blinking = "On"
|
blinking = "On"
|
||||||
|
|
||||||
{{ if eq .chezmoi.hostname "helix" -}}
|
|
||||||
[font]
|
[font]
|
||||||
size = 16
|
|
||||||
{{- else }}
|
|
||||||
size = 13
|
size = 13
|
||||||
{{- end }}
|
|
||||||
|
|
||||||
[font.bold]
|
[font.bold]
|
||||||
family = "Hack"
|
family = "Hack"
|
|
@ -62,7 +62,7 @@
|
||||||
(unless (file-directory-p xdg_cache_home)
|
(unless (file-directory-p xdg_cache_home)
|
||||||
(make-directory xdg_cache_home))
|
(make-directory xdg_cache_home))
|
||||||
|
|
||||||
;; Move eln-cache to XDG_CACHE_HOME
|
;; Move `eln-cache' to XDG_CACHE_HOME
|
||||||
(when (fboundp 'startup-redirect-eln-cache)
|
(when (fboundp 'startup-redirect-eln-cache)
|
||||||
(if (< emacs-major-version 29)
|
(if (< emacs-major-version 29)
|
||||||
(push (expand-file-name "eln-cache/" xdg_cache_home) native-comp-eln-load-path)
|
(push (expand-file-name "eln-cache/" xdg_cache_home) native-comp-eln-load-path)
|
||||||
|
@ -73,7 +73,7 @@
|
||||||
|
|
||||||
;; Enable async native compilation and suppress warnings
|
;; Enable async native compilation and suppress warnings
|
||||||
(when (featurep 'native-compile)
|
(when (featurep 'native-compile)
|
||||||
(setq native-comp-jit-compilation t
|
(setq native-comp-deferred-compilation t
|
||||||
native-comp-async-report-warnings-errors nil))
|
native-comp-async-report-warnings-errors nil))
|
||||||
|
|
||||||
;; Don't advertise instructions for frame exit
|
;; Don't advertise instructions for frame exit
|
||||||
|
@ -102,10 +102,10 @@
|
||||||
|
|
||||||
;; Fonts
|
;; Fonts
|
||||||
{{- if eq .chezmoi.hostname "helix" }}
|
{{- if eq .chezmoi.hostname "helix" }}
|
||||||
(push '(font . "Hack-14") default-frame-alist)
|
(push '(font . "Hack-24") default-frame-alist)
|
||||||
(set-face-font 'default "Hack-14")
|
(set-face-font 'default "Hack-24")
|
||||||
(set-face-font 'fixed-pitch "Hack-14")
|
(set-face-font 'fixed-pitch "Hack-24")
|
||||||
(set-face-font 'variable-pitch "DejaVu Sans-14")
|
(set-face-font 'variable-pitch "DejaVu Sans-24")
|
||||||
{{- else }}
|
{{- else }}
|
||||||
(push '(font . "Hack-11") default-frame-alist)
|
(push '(font . "Hack-11") default-frame-alist)
|
||||||
(set-face-font 'default "Hack-11")
|
(set-face-font 'default "Hack-11")
|
||||||
|
|
|
@ -90,7 +90,7 @@
|
||||||
(add-hook 'after-init-hook #'elpaca-process-queues)
|
(add-hook 'after-init-hook #'elpaca-process-queues)
|
||||||
(elpaca `(,@elpaca-order))
|
(elpaca `(,@elpaca-order))
|
||||||
|
|
||||||
;; Ensure `Elpaca' doesn't pull built-in packages from source
|
;; Configure `use-package' with `Elpaca'
|
||||||
(defmacro use-feature (name &rest args)
|
(defmacro use-feature (name &rest args)
|
||||||
"Like `use-package' but accounting for asynchronous installation.
|
"Like `use-package' but accounting for asynchronous installation.
|
||||||
NAME and ARGS are in `use-package'. Credit to @progfolio:
|
NAME and ARGS are in `use-package'. Credit to @progfolio:
|
||||||
|
@ -103,10 +103,7 @@
|
||||||
(elpaca elpaca-use-package
|
(elpaca elpaca-use-package
|
||||||
(require 'elpaca-use-package)
|
(require 'elpaca-use-package)
|
||||||
(elpaca-use-package-mode)
|
(elpaca-use-package-mode)
|
||||||
(setopt use-package-always-ensure t
|
(setopt use-package-always-ensure t))
|
||||||
;; REVIEW - apparently `use-package-always-pin' doesn't work with `Elpaca'
|
|
||||||
;; TODO - remove stats when done profiling startup
|
|
||||||
use-package-compute-statistics t))
|
|
||||||
|
|
||||||
(if debug-on-error
|
(if debug-on-error
|
||||||
(setopt use-package-verbose t
|
(setopt use-package-verbose t
|
||||||
|
@ -115,6 +112,9 @@
|
||||||
(setopt use-package-verbose nil
|
(setopt use-package-verbose nil
|
||||||
use-package-expand-minimally t))
|
use-package-expand-minimally t))
|
||||||
|
|
||||||
|
;; TODO - remove this when done profiling startup
|
||||||
|
(setopt use-package-compute-statistics t)
|
||||||
|
|
||||||
;; Wait for `Elpaca' to process current queue
|
;; Wait for `Elpaca' to process current queue
|
||||||
(elpaca-wait)
|
(elpaca-wait)
|
||||||
|
|
||||||
|
@ -122,65 +122,26 @@
|
||||||
|
|
||||||
;; Revert a buffer if the file has changed
|
;; Revert a buffer if the file has changed
|
||||||
(use-feature autorevert
|
(use-feature autorevert
|
||||||
:config
|
:config (global-auto-revert-mode t)
|
||||||
(setopt auto-revert-interval 10)
|
:defer 3
|
||||||
(global-auto-revert-mode)
|
|
||||||
:defer 5
|
|
||||||
:init (setopt auto-revert-interval 0.01))
|
:init (setopt auto-revert-interval 0.01))
|
||||||
|
|
||||||
(use-feature bibtex
|
|
||||||
:after (ebib)
|
|
||||||
:config (setopt bibtex-autokey-additional-names "EtAl"
|
|
||||||
bibtex-autokey-edit-before-use t ; "t" by default
|
|
||||||
bibtex-autokey-expand-strings t
|
|
||||||
bibtex-autokey-name-case-convert-function #'capitalize
|
|
||||||
bibtex-autokey-name-year-separator ""
|
|
||||||
bibtex-autokey-names-stretch 1
|
|
||||||
bibtex-autokey-titlewords 2
|
|
||||||
bibtex-autokey-titlewords-stretch 1
|
|
||||||
bibtex-autokey-titleword-length #'infty
|
|
||||||
bibtex-autokey-titleword-separator ""
|
|
||||||
bibtex-autokey-titleword-case-convert-function #'capitalize
|
|
||||||
bibtex-autokey-year-length 4
|
|
||||||
bibtex-autokey-year-length 4
|
|
||||||
bibtex-autokey-year-title-separator ""))
|
|
||||||
|
|
||||||
(use-feature c-ts-mode
|
|
||||||
:commands (c-ts-mode)
|
|
||||||
:config
|
|
||||||
(setopt c-ts-mode-indent-style 'linux
|
|
||||||
c-ts-mode-indent-offset 8
|
|
||||||
indent-tabs-mode t))
|
|
||||||
|
|
||||||
|
|
||||||
(use-feature c++-ts-mode
|
|
||||||
:commands (c++-ts-mode)
|
|
||||||
:config
|
|
||||||
(setopt c++-ts-mode-indent-style 'gnu
|
|
||||||
c-ts-mode-indent-offset 4))
|
|
||||||
|
|
||||||
;; Customize compilation & related buffers
|
;; Customize compilation & related buffers
|
||||||
(use-feature compile
|
(use-feature compile
|
||||||
|
:bind
|
||||||
|
(:map prog-mode-map
|
||||||
|
("C-c r" . recompile))
|
||||||
:commands (compile recompile)
|
:commands (compile recompile)
|
||||||
:config (setopt compilation-ask-about-save nil
|
:config (setopt compilation-ask-about-save nil
|
||||||
compilation-scroll-output 'first-error)
|
compilation-scroll-output 'first-error))
|
||||||
:hook (compilation-filter . ansi-color-compilation-buffer))
|
|
||||||
|
|
||||||
;; Write external customizations to /dev/null
|
;; Write external customizations to /dev/null
|
||||||
(use-feature cus-edit
|
(use-feature cus-edit
|
||||||
:init (setopt custom-file null-device))
|
:init (setopt custom-file null-device))
|
||||||
|
|
||||||
;; Library for creating/customizing user options
|
|
||||||
(use-feature custom
|
(use-feature custom
|
||||||
:config (setopt custom-safe-themes t))
|
:config (setopt custom-safe-themes t))
|
||||||
|
|
||||||
;; File manager
|
|
||||||
(use-feature dired
|
|
||||||
:commands (dired)
|
|
||||||
:config
|
|
||||||
(setopt dired-kill-when-opening-new-dired-buffer t
|
|
||||||
dired-mouse-drag-files t))
|
|
||||||
|
|
||||||
;; Customize fill column indicator
|
;; Customize fill column indicator
|
||||||
(use-feature display-fill-column-indicator
|
(use-feature display-fill-column-indicator
|
||||||
:hook ((conf-mode
|
:hook ((conf-mode
|
||||||
|
@ -196,34 +157,31 @@
|
||||||
(use-feature eglot
|
(use-feature eglot
|
||||||
:bind
|
:bind
|
||||||
(:map eglot-mode-map
|
(:map eglot-mode-map
|
||||||
("C-c e a" . eglot-code-actions)
|
("C-c c a" . eglot-code-actions)
|
||||||
("C-c e o" . eglot-code-actions-organize-imports)
|
("C-c c o" . eglot-code-actions-organize-imports)
|
||||||
("C-c e r" . eglot-rename)
|
("C-c c r" . eglot-rename)
|
||||||
("C-c e f" . eglot-format))
|
("C-c c f" . eglot-format))
|
||||||
:config
|
:config
|
||||||
(add-to-list 'eglot-server-programs '(astro-mode . ("astro-ls" "--stdio"
|
(push '(astro-mode . ("astro-ls" "--stdio"
|
||||||
:initializationOptions
|
:initializationOptions
|
||||||
(:typescript (:tsdk "/usr/lib/node_modules/typescript/lib")))))
|
(:typescript (:tsdk "/usr/lib/node_modules/typescript/lib")))) eglot-server-programs)
|
||||||
(add-to-list 'eglot-server-programs '((rust-ts-mode rust-mode) . ("rustup" "run" "stable" "rust-analyzer"
|
(push '((rust-ts-mode rust-mode) . ("rustup" "run" "stable" "rust-analyzer"
|
||||||
:initializationOptions
|
:initializationOptions
|
||||||
(:check (:command "clippy")))))
|
(:check (:command "clippy")))) eglot-server-programs)
|
||||||
(setopt eglot-autoshutdown t
|
(setopt eglot-autoshutdown t
|
||||||
eglot-ignored-server-capabilities
|
eglot-ignored-server-capabilities
|
||||||
'(:colorProvider ; "Decorate color references"
|
'(;; :colorProvider ; "Decorate color references"
|
||||||
;; :documentFormattingProvider ; "Format buffer"
|
;; :documentFormattingProvider ; "Format buffer"
|
||||||
;; :documentHighlightProvider ; "Highlight symbols automatically"
|
;; :documentHighlightProvider ; "Highlight symbols automatically"
|
||||||
:documentOnTypeFormattingProvider ; "On-type formatting"
|
:documentOnTypeFormattingProvider ; "On-type formatting"
|
||||||
;; :documentRangeFormattingProvider ; "Format portion of buffer"
|
;; :documentRangeFormattingProvider ; "Format portion of buffer"
|
||||||
:hoverProvider ; "Documentation on hover"
|
;; :hoverProvider ; "Documentation on hover"
|
||||||
:inlayHintProvider ; "Inlay hints"
|
:inlayHintProvider ; "Inlay hints"
|
||||||
))
|
))
|
||||||
:hook ((astro-mode
|
:hook ((astro-mode
|
||||||
bash-ts-mode
|
|
||||||
c-ts-mode
|
c-ts-mode
|
||||||
c++-ts-mode
|
c++-ts-mode
|
||||||
python-ts-mode
|
|
||||||
rust-ts-mode
|
rust-ts-mode
|
||||||
sh-script
|
|
||||||
zig-mode) . eglot-ensure))
|
zig-mode) . eglot-ensure))
|
||||||
|
|
||||||
;; Automatic parenthesis/brackets matching
|
;; Automatic parenthesis/brackets matching
|
||||||
|
@ -236,9 +194,8 @@
|
||||||
(use-feature emacs
|
(use-feature emacs
|
||||||
:bind
|
:bind
|
||||||
(:map global-map
|
(:map global-map
|
||||||
;; Disable `suspend-frame' shortcut (currently overwritten by undo-fu anyway)
|
;; Disable `suspend-frame' shortcut
|
||||||
("C-z" . nil)
|
("C-z" . nil)
|
||||||
("C-x k" . my-kill-buffer)
|
|
||||||
;; Escape behaves like C-g
|
;; Escape behaves like C-g
|
||||||
("<escape>" . keyboard-escape-quit)
|
("<escape>" . keyboard-escape-quit)
|
||||||
;; Resizing buffers
|
;; Resizing buffers
|
||||||
|
@ -247,40 +204,13 @@
|
||||||
("S-C-<down>" . shrink-window)
|
("S-C-<down>" . shrink-window)
|
||||||
("S-C-<up>" . enlarge-window))
|
("S-C-<up>" . enlarge-window))
|
||||||
:config
|
:config
|
||||||
(setopt completion-ignore-case t
|
(setopt cursor-type 'bar
|
||||||
cursor-type 'bar
|
fill-column 80
|
||||||
enable-recursive-minibuffers t
|
|
||||||
fill-column 79
|
|
||||||
history-delete-duplicates t
|
|
||||||
minibuffer-prompt-properties ; Disable prompt in minibuffer
|
|
||||||
'(read-only t cursor-intangible t face minibuffer-prompt)
|
|
||||||
read-buffer-completion-ignore-case t
|
|
||||||
scroll-step 1
|
scroll-step 1
|
||||||
scroll-conservatively 1000
|
scroll-conservatively 1000
|
||||||
scroll-preserve-screen-position t
|
scroll-preserve-screen-position t)
|
||||||
sentence-end-double-space nil
|
|
||||||
tab-always-indent 'complete
|
|
||||||
use-short-answers t)
|
|
||||||
:hook (minibuffer-setup . cursor-intangible-mode)
|
|
||||||
:init
|
:init
|
||||||
(defun my-kill-buffer ()
|
;; Vertico
|
||||||
(interactive)
|
|
||||||
(catch 'quit
|
|
||||||
(save-window-excursion
|
|
||||||
(let (done)
|
|
||||||
(when (and buffer-file-name (buffer-modified-p))
|
|
||||||
(while (not done)
|
|
||||||
(let ((response (read-char-choice
|
|
||||||
(format "Save file %s? (y, n, d, q) " (buffer-file-name))
|
|
||||||
'(?y ?n ?d ?q))))
|
|
||||||
(setq done (cond
|
|
||||||
((eq response ?q) (throw 'quit nil))
|
|
||||||
((eq response ?y) (save-buffer) t)
|
|
||||||
((eq response ?n) (set-buffer-modified-p nil) t)
|
|
||||||
((eq response ?d) (diff-buffer-with-file) nil))))))
|
|
||||||
(kill-buffer (current-buffer))
|
|
||||||
(force-mode-line-update)))))
|
|
||||||
;; For Vertico
|
|
||||||
(defun crm-indicator (args)
|
(defun crm-indicator (args)
|
||||||
(cons (format "[CRM%s] %s"
|
(cons (format "[CRM%s] %s"
|
||||||
(replace-regexp-in-string
|
(replace-regexp-in-string
|
||||||
|
@ -288,7 +218,12 @@
|
||||||
crm-separator)
|
crm-separator)
|
||||||
(car args))
|
(car args))
|
||||||
(cdr args)))
|
(cdr args)))
|
||||||
(advice-add #'completing-read-multiple :filter-args #'crm-indicator))
|
(advice-add #'completing-read-multiple :filter-args #'crm-indicator)
|
||||||
|
|
||||||
|
(setopt enable-recursive-minibuffers t ; Recursive minibuffers
|
||||||
|
minibuffer-prompt-properties ; Disable prompt in minibuffer
|
||||||
|
'(read-only t cursor-intangible t face minibuffer-prompt))
|
||||||
|
(add-hook 'minibuffer-setup-hook #'cursor-intangible-mode))
|
||||||
|
|
||||||
;; Customize file handling & automatic backups
|
;; Customize file handling & automatic backups
|
||||||
(use-feature files
|
(use-feature files
|
||||||
|
@ -297,19 +232,15 @@
|
||||||
(unless (file-directory-p auto_save_directory)
|
(unless (file-directory-p auto_save_directory)
|
||||||
(make-directory auto_save_directory))
|
(make-directory auto_save_directory))
|
||||||
(setopt backup-directory-alist `((".*" . ,auto_save_directory))
|
(setopt backup-directory-alist `((".*" . ,auto_save_directory))
|
||||||
auto-save-list-file-prefix (concat auto_save_directory "saves-")
|
auto-save-list-file-prefix (concat auto_save_directory "saves-"))
|
||||||
auto-save-file-name-transforms `((".*" ,auto_save_directory t))))
|
auto-save-file-name-transforms `((".*" ,auto_save_directory t)))
|
||||||
(setopt backup-by-copying t
|
(setopt backup-by-copying t
|
||||||
confirm-kill-processes nil
|
confirm-kill-processes nil
|
||||||
delete-old-versions t
|
delete-old-versions t
|
||||||
kept-new-versions 5
|
kept-new-versions 5
|
||||||
kept-old-versions 3
|
kept-old-versions 3
|
||||||
require-final-newline t
|
require-final-newline t
|
||||||
version-control t)
|
version-control t))
|
||||||
;; Treesit doesn't play nice in Emacs 29
|
|
||||||
;; REVIEW: Putting this here for now because `major-mode-remap-alist' belongs to `files'
|
|
||||||
(add-to-list 'major-mode-remap-alist '(c++-mode . c++-ts-mode))
|
|
||||||
(add-to-list 'major-mode-remap-alist '(python-mode . python-ts-mode)))
|
|
||||||
|
|
||||||
;; Customize syntax checking
|
;; Customize syntax checking
|
||||||
(use-feature flymake
|
(use-feature flymake
|
||||||
|
@ -324,22 +255,15 @@
|
||||||
(use-feature flyspell
|
(use-feature flyspell
|
||||||
:hook
|
:hook
|
||||||
(((git-commit-mode
|
(((git-commit-mode
|
||||||
org-mode) . flyspell-mode))
|
org-mode
|
||||||
:init (setopt flyspell-use-meta-tab nil))
|
text-mode) . flyspell-mode)
|
||||||
|
(prog-mode . flyspell-prog-mode)))
|
||||||
|
|
||||||
;; Customize frame behavior/cursor blinking
|
;; Customize frame behavior/cursor blinking
|
||||||
(use-feature frame
|
(use-feature frame
|
||||||
:config (setopt blink-cursor-delay 1.0
|
:config (setopt blink-cursor-delay 1.0
|
||||||
blink-cursor-interval 0.75))
|
blink-cursor-interval 0.75))
|
||||||
|
|
||||||
(use-feature help
|
|
||||||
:config (setopt help-enable-variable-value-editing t
|
|
||||||
help-window-select t)
|
|
||||||
:defer 3)
|
|
||||||
|
|
||||||
(use-feature minibuffer
|
|
||||||
:config (setopt read-file-name-completion-ignore-case t))
|
|
||||||
|
|
||||||
;; Ensure UTF-8 terminal encoding
|
;; Ensure UTF-8 terminal encoding
|
||||||
(use-feature mule
|
(use-feature mule
|
||||||
:config (unless (display-graphic-p)
|
:config (unless (display-graphic-p)
|
||||||
|
@ -352,10 +276,6 @@
|
||||||
mouse-wheel-progressive-speed nil
|
mouse-wheel-progressive-speed nil
|
||||||
mouse-wheel-scroll-amount '(2 ((shift) . 1))))
|
mouse-wheel-scroll-amount '(2 ((shift) . 1))))
|
||||||
|
|
||||||
;; Customize comment insertion
|
|
||||||
(use-feature newcomment
|
|
||||||
:config (setopt comment-style 'multi-line))
|
|
||||||
|
|
||||||
;; Visualize matching parenthesis/brackets
|
;; Visualize matching parenthesis/brackets
|
||||||
(use-feature paren
|
(use-feature paren
|
||||||
:hook ((conf-mode
|
:hook ((conf-mode
|
||||||
|
@ -365,31 +285,25 @@
|
||||||
;; Enable smooth mouse wheel scrolling when available
|
;; Enable smooth mouse wheel scrolling when available
|
||||||
(when (fboundp 'pixel-scroll-precision-mode)
|
(when (fboundp 'pixel-scroll-precision-mode)
|
||||||
(use-feature pixel-scroll
|
(use-feature pixel-scroll
|
||||||
:config (pixel-scroll-precision-mode)
|
:config (pixel-scroll-precision-mode)))
|
||||||
:defer 1))
|
|
||||||
|
|
||||||
;; Customize project management
|
|
||||||
(use-feature project
|
(use-feature project
|
||||||
:commands (project-find-dir project-find-file project-switch-project)
|
|
||||||
:config (setopt project-vc-extra-root-markers '("Cargo.toml")))
|
:config (setopt project-vc-extra-root-markers '("Cargo.toml")))
|
||||||
|
|
||||||
;; Customize handling of recent files
|
;; Customize handling of recent files
|
||||||
(use-feature recentf
|
(use-feature recentf
|
||||||
:config
|
:config
|
||||||
(setopt recentf-auto-cleanup 600
|
(setopt recentf-max-menu-items 100
|
||||||
recentf-max-menu-items 100
|
recentf-max-saved-items 1000
|
||||||
recentf-max-saved-items 100
|
|
||||||
recentf-save-file (expand-file-name "recentf" xdg_cache_home))
|
recentf-save-file (expand-file-name "recentf" xdg_cache_home))
|
||||||
(recentf-mode))
|
(recentf-mode))
|
||||||
|
|
||||||
;; Customize saving mini-buffer history
|
;; Customize saving mini-buffer history
|
||||||
(use-feature savehist
|
(use-feature savehist
|
||||||
:config
|
:config
|
||||||
(setopt savehist-additional-variables '(compile-command kill-buffer kill-ring)
|
(setopt savehist-autosave-interval 120
|
||||||
savehist-autosave-interval 120
|
|
||||||
savehist-file (expand-file-name "history" xdg_cache_home))
|
savehist-file (expand-file-name "history" xdg_cache_home))
|
||||||
(savehist-mode)
|
(savehist-mode))
|
||||||
:defer 1)
|
|
||||||
|
|
||||||
;; Customize saving place in files
|
;; Customize saving place in files
|
||||||
(use-feature saveplace
|
(use-feature saveplace
|
||||||
|
@ -411,9 +325,6 @@
|
||||||
(use-package seq
|
(use-package seq
|
||||||
:ensure `(seq :build ,(+elpaca-seq-build-steps)))
|
:ensure `(seq :build ,(+elpaca-seq-build-steps)))
|
||||||
|
|
||||||
(use-feature shell
|
|
||||||
:hook (shell-mode . ansi-color-for-comint-mode-on))
|
|
||||||
|
|
||||||
;; "A grab-bag of basic Emacs commands"
|
;; "A grab-bag of basic Emacs commands"
|
||||||
(use-feature simple
|
(use-feature simple
|
||||||
:config
|
:config
|
||||||
|
@ -424,15 +335,15 @@
|
||||||
prog-mode) . column-number-mode)
|
prog-mode) . column-number-mode)
|
||||||
(text-mode . auto-fill-mode)))
|
(text-mode . auto-fill-mode)))
|
||||||
|
|
||||||
|
;; Customize text buffers
|
||||||
|
(use-feature text-mode
|
||||||
|
:config (setq-local fill-column 120))
|
||||||
|
|
||||||
;; Customize tree-sitter parsing
|
;; Customize tree-sitter parsing
|
||||||
(use-feature treesit
|
(use-feature treesit
|
||||||
:config (setopt treesit-font-lock-level 4)
|
:config
|
||||||
:defer 1)
|
(push '(c++-mode . c++-ts-mode) major-mode-remap-alist)
|
||||||
|
(setopt treesit-font-lock-level 4))
|
||||||
;; Remember to take breaks
|
|
||||||
(use-feature type-break
|
|
||||||
:config (setopt type-break-keystroke-threshold '(nil . nil))
|
|
||||||
:commands (type-break-mode))
|
|
||||||
|
|
||||||
;; Customize whitespace visualization & cleanup
|
;; Customize whitespace visualization & cleanup
|
||||||
(use-feature whitespace
|
(use-feature whitespace
|
||||||
|
@ -452,11 +363,6 @@
|
||||||
|
|
||||||
;;; Packages:
|
;;; Packages:
|
||||||
|
|
||||||
;; `other-window' replacement
|
|
||||||
(use-package ace-window
|
|
||||||
:commands (ace-window)
|
|
||||||
:bind ("C-c w" . ace-window))
|
|
||||||
|
|
||||||
;; Shows current/total matches in mode line
|
;; Shows current/total matches in mode line
|
||||||
(use-package anzu
|
(use-package anzu
|
||||||
:config (global-anzu-mode)
|
:config (global-anzu-mode)
|
||||||
|
@ -466,15 +372,10 @@
|
||||||
(use-package apheleia
|
(use-package apheleia
|
||||||
:defer t)
|
:defer t)
|
||||||
|
|
||||||
(use-package biblio
|
|
||||||
:after (ebib)
|
|
||||||
:config (setopt biblio-bibtex-use-autokey t))
|
|
||||||
|
|
||||||
;; Extensions for `completion-at-point'
|
;; Extensions for `completion-at-point'
|
||||||
(use-package cape
|
(use-package cape
|
||||||
:bind ("M-p" . cape-prefix-map))
|
:bind ("M-p" . cape-prefix-map))
|
||||||
|
|
||||||
;; TODO: pick a theme
|
|
||||||
;; Catppuccin theme
|
;; Catppuccin theme
|
||||||
(use-package catppuccin-theme
|
(use-package catppuccin-theme
|
||||||
:disabled
|
:disabled
|
||||||
|
@ -572,9 +473,9 @@
|
||||||
:after (eglot)
|
:after (eglot)
|
||||||
:bind
|
:bind
|
||||||
(:map eglot-mode-map
|
(:map eglot-mode-map
|
||||||
("C-c e s" . consult-eglot-symbols)))
|
("C-c c s" . consult-eglot-symbols)))
|
||||||
|
|
||||||
;; In-buffer completion with popup menu
|
;; In-buffer completion
|
||||||
(use-package company
|
(use-package company
|
||||||
:disabled
|
:disabled
|
||||||
:bind
|
:bind
|
||||||
|
@ -590,116 +491,44 @@
|
||||||
company-tooltip-align-annotations t)
|
company-tooltip-align-annotations t)
|
||||||
:hook (prog-mode . company-mode))
|
:hook (prog-mode . company-mode))
|
||||||
|
|
||||||
;; In-buffer completion with popup menu
|
;; FIXME - I crash emacs
|
||||||
(use-package corfu
|
(use-package corfu
|
||||||
|
;; :disabled
|
||||||
|
:bind
|
||||||
|
(:map corfu-map
|
||||||
|
("M-SPC" . corfu-insert-separator)
|
||||||
|
("RET" . nil))
|
||||||
:config
|
:config
|
||||||
(advice-add 'eglot-completion-at-point :around #'cape-wrap-buster)
|
(setopt corfu-auto t
|
||||||
(advice-add 'eglot-completion-at-point :around #'cape-wrap-noninterruptible)
|
corfu-cycle t)
|
||||||
(setopt corfu-auto nil
|
|
||||||
corfu-cycle t
|
|
||||||
corfu-preview-current nil)
|
|
||||||
(global-corfu-mode)
|
(global-corfu-mode)
|
||||||
(corfu-history-mode)
|
|
||||||
(corfu-popupinfo-mode)
|
(corfu-popupinfo-mode)
|
||||||
:defer 3
|
:defer 3
|
||||||
:ensure (corfu :files (:defaults "extensions/*")))
|
:ensure (corfu :files (:defaults "extensions/*")))
|
||||||
|
|
||||||
(use-package ebib
|
(use-package doom-themes
|
||||||
;;; Functions:
|
:disabled
|
||||||
;; ebib-list-recent ; list entries added within the given # of days
|
|
||||||
;; ebib-download-url ; attempt to download file, rename, and save to target directory, filename determined by `ebib-name-transform-function'
|
|
||||||
;; ebib-import-file ; import a local file, file is renamed and moved, works for more than pdf, name deterined by `ebib-name-transform-function'
|
|
||||||
;;; ebib-biblio
|
|
||||||
;; ebib-biblio-selection-import ; function to import entry from biblio into ebib
|
|
||||||
;; ebib-biblio-import-doi ; function to import an entry while in ebib UI, can also choose different key
|
|
||||||
|
|
||||||
;;; keymaps
|
|
||||||
;; ebib-index-mode-map
|
|
||||||
;; ebib-entry-mode-map
|
|
||||||
;; ebib-strings-mode-map
|
|
||||||
;; ebib-multiline-mode-map
|
|
||||||
;; ebib-search-map
|
|
||||||
;; ebib-filters-map
|
|
||||||
;; ebib-keywords-map
|
|
||||||
;; ebib-reading-list-map
|
|
||||||
;; ebib-log-mode-map
|
|
||||||
:commands (ebib)
|
|
||||||
:config
|
:config
|
||||||
|
(setopt doom-themes-enable-bold t
|
||||||
|
doom-themes-enable-italic t))
|
||||||
|
|
||||||
;; ebib-autogenerate-keys ; default t
|
(use-package nimbus-theme
|
||||||
(setopt ebib-bibtex-dialect 'biblatex
|
:config (load-theme 'nimbus))
|
||||||
ebib-use-timestamp t ; create timestamp when entry added to db, note that "When importing or exporting entries, existing timestamps are overwritten."
|
|
||||||
ebib-filters-default-file (expand-file-name "ebib-filters" user-emacs-directory) ; file location to save filters
|
|
||||||
ebib-allow-identical-fields t ; merge repeated fields into one, separated by `ebib-keywords-separator'
|
|
||||||
ebib-file-associations '(("pdf" . nil)
|
|
||||||
("ps" . "gs")) ; specify which programs to use for which file types, or remove to open in emacs
|
|
||||||
ebib-import-target-directory "~/Nextcloud/Library/" ; set directory for `ebib-download-url' and `ebib-import-file'
|
|
||||||
;; ebib-default-directory "~/Nextcloud/Library/"; "This mainly determines which directory is the default directory when reading a file name from the user"
|
|
||||||
ebib-preload-bib-files '("~/Nextcloud/Library/bib/library.bib") ; autoload list of .bib files when started
|
|
||||||
;; ebib-bib-search dirs ; specify directory to search for multiple bib files when starting
|
|
||||||
;; ebib-extra-fields ; probably not needed
|
|
||||||
|
|
||||||
;;; UI
|
(use-package ef-themes
|
||||||
;; ebib-index-columns ; change displayed UI fields
|
:disabled
|
||||||
;; ebib-field-transformation-functions ; new/change UI fields
|
:config
|
||||||
;; ebib-field-sort-functions-alist ; customize UI sorting
|
(setopt ef-themes-headings '((0 variable-pitch light 1.9)
|
||||||
;; ebib-edit-fields-functions ; disable/enable completion for different UI fields
|
(1 variable-pitch light 1.8)
|
||||||
;; ebib-multiline-display-function ; customize multiline values in UI
|
(2 variable-pitch regular 1.7)
|
||||||
;; ebib-multiline-display-max-lines ; customize multiline values in UI
|
(3 variable-pitch regular 1.6)
|
||||||
;; ebib-hidden-fields ; control which UI fields are hidden
|
(4 variable-pitch regular 1.5)
|
||||||
;; ebib-save-indent-as-bibtex ; spaces instead of tabs in bib files, uses value of `bibtex-entry-offset' and `bibtex-field-indentation' to compute # of spaces
|
(5 variable-pitch 1.4) ; absence of weight means `bold'
|
||||||
;; ebib-biblatex-ineritances ; customize biblatex inheritance
|
(6 variable-pitch 1.3)
|
||||||
|
(7 variable-pitch 1.2)
|
||||||
;;; Editing
|
(t variable-pitch 1.1))
|
||||||
;; ebib-save-xrefs-first ; must be enabled for cross-referencing to work, unless sort order changed?
|
ef-themes-mixed-fonts t
|
||||||
;; ebib-sort-order ; change sort order of bib file - default is by key - make sure to unset `ebib-save-xrefs-first'
|
ef-themes-variable-pitch-ui t))
|
||||||
;; ebib-multiline-major-mode ; customize major mode for `ebib-multiline-edit-mode'
|
|
||||||
;; ebib-citation-commands ; might need to customize if using BibTex, which I'm not
|
|
||||||
;; ebib-citations-insert-multiple ; enable adding multiple citations at once, likely not needed
|
|
||||||
;; ebib-filters-ignore-case ; case-insensitive search filters are default
|
|
||||||
|
|
||||||
;;; Downloading/Filenames
|
|
||||||
;; ebib-name-transform-function ; modify file name that ebib searches for when associating a file with an entry
|
|
||||||
;; ebib-url-download-transformations ; sets how URLs are converted when attempting to download
|
|
||||||
|
|
||||||
;;; Notes
|
|
||||||
;; ebib-notes-storage 'multiple-notes-per-file ; probabably set to `multiple-notes-per-file' for org?
|
|
||||||
;; ebib-notes-locations ; files/directories containing notes
|
|
||||||
;; ebib-notes-default-file ; not used if creating note via org capture, but can still be set
|
|
||||||
|
|
||||||
;;; Org-capture
|
|
||||||
;; ebib-notes-use-org-capture ; set to desired keybind for ebib to skip org capture selection and use the one specified
|
|
||||||
;; ebib-org-capture ; function to call org capture from ebib
|
|
||||||
|
|
||||||
;;; Reading list
|
|
||||||
;; ebib-reading-list-file ; location of reading list
|
|
||||||
;; ebib-reading-list-todo-marker ; change default todo state for reading list items
|
|
||||||
;; ebib-reading-list-template ; change format of reading list items, available options in `ebib-reading-list-template-specifiers'
|
|
||||||
;; ebib-reading-list-add-item-function ; change where new items should be added
|
|
||||||
;; ebib-reading-list-remove-item ; by default only set to `ebib-reading-list-mark-item-as-done' - doesn't actually remove anything
|
|
||||||
|
|
||||||
;;; Keywords
|
|
||||||
;; ebib-keywords ; specify named keywords always available for completion
|
|
||||||
|
|
||||||
;;; Display options
|
|
||||||
;; ebib-windows ; customization group to change display
|
|
||||||
|
|
||||||
;;; Copying from ebib
|
|
||||||
;; ebib-reference-templates and ebib-citation-template ; change how entries are copied into kill ring
|
|
||||||
|
|
||||||
;;; org-ebib
|
|
||||||
;; org-ebib-link-type 'multiple-notes-per-file ; specify type of link produced by `org-store-link' on bib entries
|
|
||||||
)
|
|
||||||
)
|
|
||||||
|
|
||||||
(use-package ebib-biblio
|
|
||||||
:after (ebib biblio)
|
|
||||||
:bind
|
|
||||||
(:map ebib-index-mode-map
|
|
||||||
("B" . ebib-biblio-import-doi))
|
|
||||||
(:map biblio-selection-mode-map
|
|
||||||
("e" . ebib-biblio-selection-import))
|
|
||||||
:ensure nil)
|
|
||||||
|
|
||||||
;; Use `emacs-lsp-booster' with `Eglot'
|
;; Use `emacs-lsp-booster' with `Eglot'
|
||||||
(use-package eglot-booster
|
(use-package eglot-booster
|
||||||
|
@ -715,13 +544,12 @@
|
||||||
("C-h B" . embark-bindings))
|
("C-h B" . embark-bindings))
|
||||||
:config
|
:config
|
||||||
;; Hide the Embark live/completions buffer mode line
|
;; Hide the Embark live/completions buffer mode line
|
||||||
(add-to-list 'display-buffer-alist '("\\`\\*Embark Collect \\(Live\\|Completions\\)\\*"
|
(push '("\\`\\*Embark Collect \\(Live\\|Completions\\)\\*"
|
||||||
nil
|
nil
|
||||||
(window-parameters (mode-line-format . none))))
|
(window-parameters (mode-line-format . none))) display-buffer-alist)
|
||||||
:defer 3
|
:defer 3
|
||||||
:init (setopt prefix-help-command #'embark-prefix-help-command))
|
:init (setopt prefix-help-command #'embark-prefix-help-command))
|
||||||
|
|
||||||
;; Integration between `embark' and `consult'
|
|
||||||
(use-package embark-consult
|
(use-package embark-consult
|
||||||
:hook (embark-collect-mode . consult-preview-at-point-mode))
|
:hook (embark-collect-mode . consult-preview-at-point-mode))
|
||||||
|
|
||||||
|
@ -737,13 +565,13 @@
|
||||||
("Find File" find-file "f")
|
("Find File" find-file "f")
|
||||||
("Recent Files" consult-recent-file "r")
|
("Recent Files" consult-recent-file "r")
|
||||||
("Projects" project-switch-project "p")
|
("Projects" project-switch-project "p")
|
||||||
("Treemacs" treemacs "t"))))
|
("Open Project Buffer" consult-project-buffer "o"))))
|
||||||
" "
|
" "
|
||||||
,(enlight-menu
|
,(enlight-menu
|
||||||
'(("Org"
|
'(("Org"
|
||||||
("My Agenda" (org-agenda nil "y") "y")
|
("Agenda" (org-agenda nil "a") "a")
|
||||||
("Work Agenda" (org-agenda nil "w") "w")
|
|
||||||
("Time blocking" org-timeblock "b")
|
("Time blocking" org-timeblock "b")
|
||||||
|
("Super agenda" (org-agenda nil "u") "u")
|
||||||
("Match Tags" (org-agenda nil "m") "m"))))
|
("Match Tags" (org-agenda nil "m") "m"))))
|
||||||
" "
|
" "
|
||||||
,(enlight-menu
|
,(enlight-menu
|
||||||
|
@ -780,41 +608,31 @@
|
||||||
(use-package hl-todo
|
(use-package hl-todo
|
||||||
:bind
|
:bind
|
||||||
(:map hl-todo-mode-map
|
(:map hl-todo-mode-map
|
||||||
("C-c C-t p" . hl-todo-previous)
|
("C-c t p" . hl-todo-previous)
|
||||||
("C-c C-t n" . hl-todo-next)
|
("C-c t n" . hl-todo-next)
|
||||||
("C-c C-t o" . hl-todo-occur)
|
("C-c t o" . hl-todo-occur)
|
||||||
("C-c C-t i" . hl-todo-insert))
|
("C-c t i" . hl-todo-insert))
|
||||||
:config
|
:config
|
||||||
(setopt hl-todo-highlight-punctuation ":!?"
|
(setopt hl-todo-highlight-punctuation ":!?"
|
||||||
hl-todo-keyword-faces '(("DEBUG" warning bold)
|
hl-todo-keyword-faces '(("DEBUG" warning bold)
|
||||||
("HACK" warning bold)
|
("HACK" warning bold)
|
||||||
("FIXME" error bold)
|
("FIXME" error bold)
|
||||||
("NOTE" homoglyph italic)
|
("NOTE" highlight italic)
|
||||||
("REVIEW" homoglyph italic)
|
("REVIEW" highlight italic)
|
||||||
("TODO" homoglyph bold)))
|
("TODO" highlight bold)))
|
||||||
:ensure (hl-todo :depth nil)
|
:ensure (hl-todo :depth nil)
|
||||||
:hook (prog-mode . hl-todo-mode))
|
:hook (prog-mode . hl-todo-mode))
|
||||||
|
|
||||||
;; Search `hl-todo' buffers with `consult'
|
|
||||||
(use-package consult-todo
|
|
||||||
:after (hl-todo)
|
|
||||||
:bind
|
|
||||||
(:map hl-todo-mode-map
|
|
||||||
("C-c C-t c" . consult-todo)
|
|
||||||
("C-c C-t C-c" . consult-todo-all)))
|
|
||||||
|
|
||||||
;; Icons for `corfu'
|
;; Icons for `corfu'
|
||||||
(use-package kind-icon
|
(use-package kind-icon
|
||||||
:disabled
|
:disabled
|
||||||
:after (corfu)
|
:after (corfu)
|
||||||
:config
|
:config
|
||||||
;; Using nerd icons below
|
(push #'kind-icon-margin-formatter corfu-margin-formatters)
|
||||||
;; (add-to-list 'corfu-margin-formatters #'kind-icon-margin-formatter)
|
|
||||||
(setopt kind-icon-default-face 'corfu-default))
|
(setopt kind-icon-default-face 'corfu-default))
|
||||||
|
|
||||||
;; Git
|
;; Git
|
||||||
;; Required by `magit' for menus
|
(use-package transient ; Must declare before magit
|
||||||
(use-package transient
|
|
||||||
:defer t)
|
:defer t)
|
||||||
|
|
||||||
(use-package magit
|
(use-package magit
|
||||||
|
@ -823,7 +641,6 @@
|
||||||
(setopt magit-display-buffer-function #'magit-display-buffer-same-window-except-diff-v1
|
(setopt magit-display-buffer-function #'magit-display-buffer-same-window-except-diff-v1
|
||||||
transient-history-file (expand-file-name "transient-history" xdg_cache_home)))
|
transient-history-file (expand-file-name "transient-history" xdg_cache_home)))
|
||||||
|
|
||||||
;; Show `hl-todo' keywords in `magit' status buffers
|
|
||||||
(use-package magit-todos
|
(use-package magit-todos
|
||||||
:hook (magit-mode . magit-todos-mode))
|
:hook (magit-mode . magit-todos-mode))
|
||||||
|
|
||||||
|
@ -832,12 +649,10 @@
|
||||||
:config (marginalia-mode)
|
:config (marginalia-mode)
|
||||||
:defer 1)
|
:defer 1)
|
||||||
|
|
||||||
;; File format/markup support
|
;;; File format/markup support
|
||||||
(use-package markdown-mode
|
(use-package markdown-mode
|
||||||
:bind
|
:commands (markdown-mode)
|
||||||
(:map markdown-mode-map
|
:config (setq-local fill-column 120))
|
||||||
("C-M-i" . fill-paragraph))
|
|
||||||
:commands (markdown-mode))
|
|
||||||
|
|
||||||
;; Better C++ font locking
|
;; Better C++ font locking
|
||||||
(use-package modern-cpp-font-lock
|
(use-package modern-cpp-font-lock
|
||||||
|
@ -853,12 +668,11 @@
|
||||||
(moody-replace-vc-mode)
|
(moody-replace-vc-mode)
|
||||||
:defer 1)
|
:defer 1)
|
||||||
|
|
||||||
;; Menu for minor modes in `minor-mode-list'
|
|
||||||
(use-package minions
|
(use-package minions
|
||||||
:after (moody)
|
:after (moody)
|
||||||
:config (minions-mode))
|
:config (minions-mode))
|
||||||
|
|
||||||
;; Nerd icons for various modes & packages
|
;; Various nerd icon packages
|
||||||
(use-package nerd-icons
|
(use-package nerd-icons
|
||||||
:defer 1)
|
:defer 1)
|
||||||
|
|
||||||
|
@ -869,8 +683,7 @@
|
||||||
|
|
||||||
(use-package nerd-icons-corfu
|
(use-package nerd-icons-corfu
|
||||||
:after (nerd-icons corfu)
|
:after (nerd-icons corfu)
|
||||||
:config
|
:config (push #'nerd-icons-corfu-formatter corfu-margin-formatters))
|
||||||
(add-to-list 'corfu-margin-formatters #'nerd-icons-corfu-formatter))
|
|
||||||
|
|
||||||
(use-package nerd-icons-dired
|
(use-package nerd-icons-dired
|
||||||
:hook (dired-mode . nerd-icons-dired-mode))
|
:hook (dired-mode . nerd-icons-dired-mode))
|
||||||
|
@ -878,15 +691,6 @@
|
||||||
(use-package nerd-icons-ibuffer
|
(use-package nerd-icons-ibuffer
|
||||||
:hook (ibuffer-mode . nerd-icons-ibuffer-mode))
|
:hook (ibuffer-mode . nerd-icons-ibuffer-mode))
|
||||||
|
|
||||||
;; TODO: pick a theme
|
|
||||||
(use-package nimbus-theme
|
|
||||||
:config (load-theme 'nimbus))
|
|
||||||
|
|
||||||
;; EPUB
|
|
||||||
(use-package nov
|
|
||||||
:config (setopt nov-text-width 100)
|
|
||||||
:mode ("\\.epub\\'" . nov-mode))
|
|
||||||
|
|
||||||
;; Completion style
|
;; Completion style
|
||||||
(use-package orderless
|
(use-package orderless
|
||||||
:config
|
:config
|
||||||
|
@ -897,24 +701,14 @@
|
||||||
orderless-initialism))
|
orderless-initialism))
|
||||||
:defer 1)
|
:defer 1)
|
||||||
|
|
||||||
;; Better PDF viewing and navigation
|
;; Project Management
|
||||||
(use-package pdf-tools
|
|
||||||
:config
|
|
||||||
(setopt pdf-info-epdfinfo-program (expand-file-name "pdf-tools/server/epdfinfo" elpaca-builds-directory)
|
|
||||||
pdf-view-resize-factor 1.1
|
|
||||||
pdf-view-display-size 'fit-page)
|
|
||||||
:ensure (pdf-tools :pre-build ("./server/autobuild") :files (:defaults ("lisp/*" "server/epdfinfo")))
|
|
||||||
:hook (pdf-view-mod . pdf-view-midnight-minor-mode)
|
|
||||||
:mode ("\\.pdf\\'" . pdf-view-mode))
|
|
||||||
|
|
||||||
;; Project Management - disabled, see `project' built-in package
|
|
||||||
(use-package projectile
|
(use-package projectile
|
||||||
:disabled
|
:disabled
|
||||||
:bind ("C-c p" . projectile-command-map)
|
:bind ("C-c p" . projectile-command-map)
|
||||||
:config
|
:config
|
||||||
(setopt projectile-known-projects-file (expand-file-name "projectile-bookmarks" xdg_cache_home)
|
(setopt projectile-known-projects-file (expand-file-name "projectile-bookmarks" xdg_cache_home)
|
||||||
projectile-project-search-path '(("~/Nextcloud/Projects/src/" . 2)))
|
projectile-project-search-path '(("~/Nextcloud/Projects/src/" . 2)))
|
||||||
(add-to-list 'projectile-globally-ignored-directories "*node_modules")
|
(push "*node_modules" projectile-globally-ignored-directories)
|
||||||
(projectile-mode))
|
(projectile-mode))
|
||||||
|
|
||||||
;; Visualize color names
|
;; Visualize color names
|
||||||
|
@ -935,39 +729,6 @@
|
||||||
:init (setopt rust-mode-treesitter-derive t)
|
:init (setopt rust-mode-treesitter-derive t)
|
||||||
:commands (rust-mode))
|
:commands (rust-mode))
|
||||||
|
|
||||||
(use-package treemacs
|
|
||||||
:defer t
|
|
||||||
:commands (treemacs)
|
|
||||||
:config
|
|
||||||
(setopt treemacs-eldoc-display 'simple
|
|
||||||
treemacs-hide-dot-git-directory nil
|
|
||||||
treemacs-is-never-other-window t
|
|
||||||
treemacs-persist-file (expand-file-name "treemacs-persist" xdg_cache_home)
|
|
||||||
treemacs-text-scale 2
|
|
||||||
treemacs-width-is-initially-locked t)
|
|
||||||
(add-to-list 'treemacs-litter-directories "./zig-cache")
|
|
||||||
(treemacs-resize-icons 22)
|
|
||||||
(treemacs-follow-mode t)
|
|
||||||
(treemacs-filewatch-mode t)
|
|
||||||
(treemacs-fringe-indicator-mode 'always)
|
|
||||||
(treemacs-git-commit-diff-mode t)
|
|
||||||
(treemacs-git-mode 'deferred)
|
|
||||||
;; (treemacs-hide-gitignored-files-mode nil)
|
|
||||||
(treemacs-indent-guide-mode)
|
|
||||||
:init
|
|
||||||
(bind-keys :prefix-map as/treemacs-prefix-map
|
|
||||||
:prefix "C-c t"
|
|
||||||
("0" . treemacs-select-window)
|
|
||||||
("1" . treemacs-delete-other-windows)
|
|
||||||
("t" . treemacs)
|
|
||||||
("d" . treemacs-select-directory)
|
|
||||||
("B" . treemacs-bookmark)
|
|
||||||
("C-f" . treemacs-find-file)
|
|
||||||
("M-t" . treemacs-find-tag)))
|
|
||||||
|
|
||||||
(use-package treemacs-magit
|
|
||||||
:after (treemacs magit))
|
|
||||||
|
|
||||||
;; Automatically download tree-sitter grammars
|
;; Automatically download tree-sitter grammars
|
||||||
(use-package treesit-auto
|
(use-package treesit-auto
|
||||||
:defer 1
|
:defer 1
|
||||||
|
@ -989,18 +750,17 @@
|
||||||
:url "https://github.com/tree-sitter/tree-sitter-cpp"
|
:url "https://github.com/tree-sitter/tree-sitter-cpp"
|
||||||
:revision "v0.21.0"
|
:revision "v0.21.0"
|
||||||
:ext "\\.cpp\\'"))
|
:ext "\\.cpp\\'"))
|
||||||
(add-to-list 'treesit-auto-recipe-list as/c-tsauto-config)
|
(push as/c-tsauto-config treesit-auto-recipe-list)
|
||||||
(add-to-list 'treesit-auto-recipe-list as/cpp-tsauto-config)
|
(push as/cpp-tsauto-config treesit-auto-recipe-list)
|
||||||
;; (push as/c-tsauto-config treesit-auto-recipe-list)
|
;;(add-to-list 'treesit-auto-recipe-list as/cpp-tsauto-config)
|
||||||
;; (push as/cpp-tsauto-config treesit-auto-recipe-list)
|
|
||||||
(treesit-auto-add-to-auto-mode-alist 'all)
|
(treesit-auto-add-to-auto-mode-alist 'all)
|
||||||
(global-treesit-auto-mode))
|
(global-treesit-auto-mode))
|
||||||
|
|
||||||
;; Better undo/redo
|
;; Better undo/redo
|
||||||
(use-package undo-fu
|
(use-package undo-fu
|
||||||
:bind (("C-z" . undo-fu-only-undo)
|
:bind (("C-z" . undo-fu-only-undo)
|
||||||
("C-S-z" . undo-fu-only-redo))
|
("C-M-z" . undo-fu-only-redo))
|
||||||
:defer 3)
|
:defer 1)
|
||||||
|
|
||||||
(use-package undo-fu-session
|
(use-package undo-fu-session
|
||||||
:after (undo-fu)
|
:after (undo-fu)
|
||||||
|
@ -1015,7 +775,10 @@
|
||||||
(setopt vertico-cycle t
|
(setopt vertico-cycle t
|
||||||
vertico-count 10
|
vertico-count 10
|
||||||
vertico-resize t
|
vertico-resize t
|
||||||
vertico-scroll-margin 1)
|
vertico-scroll-margin 1
|
||||||
|
completion-ignore-case t
|
||||||
|
read-buffer-completion-ignore-case t
|
||||||
|
read-file-name-completion-ignore-case t)
|
||||||
:init (vertico-mode))
|
:init (vertico-mode))
|
||||||
|
|
||||||
;; Web and SSG
|
;; Web and SSG
|
||||||
|
@ -1045,18 +808,17 @@
|
||||||
;; Expand abbreviations to templates
|
;; Expand abbreviations to templates
|
||||||
(use-package yasnippet
|
(use-package yasnippet
|
||||||
:bind
|
:bind
|
||||||
(;; :map yas-minor-mode-map ; need to enable mode with something other than `:commands'
|
(:map yas-minor-mode-map
|
||||||
("C-c y i" . yas-insert-snippet)
|
("C-c y i" . yas-insert-snippet)
|
||||||
("C-c y v" . yas-visit-snippet-file))
|
("C-c y v" . yas-visit-snippet-file))
|
||||||
:config
|
:config (yas-reload-all)
|
||||||
(yas-reload-all) ; needed if not using `yas-global-mode'
|
:hook (prog-mode . yas-minor-mode))
|
||||||
(yas-minor-mode))
|
|
||||||
|
|
||||||
(use-package yasnippet-snippets
|
(use-package yasnippet-snippets
|
||||||
:after (yasnippet))
|
:after (yasnippet))
|
||||||
|
|
||||||
(use-package consult-yasnippet
|
(use-package consult-yasnippet
|
||||||
:after (consult yasnippet)
|
:after (yasnippet)
|
||||||
:bind
|
:bind
|
||||||
(:map yas-minor-mode-map
|
(:map yas-minor-mode-map
|
||||||
("C-c y c" . consult-yasnippet)))
|
("C-c y c" . consult-yasnippet)))
|
||||||
|
@ -1072,14 +834,12 @@
|
||||||
:commands (zig-mode)
|
:commands (zig-mode)
|
||||||
:config
|
:config
|
||||||
(defun zig-compile ()
|
(defun zig-compile ()
|
||||||
"Save buffer and compile using `zig build`. Overrides `zig-compile' in 'zig-mode.el'."
|
|
||||||
(interactive)
|
(interactive)
|
||||||
(save-buffer)
|
(save-buffer)
|
||||||
(zig--run-cmd "build"))
|
(zig--run-cmd "build"))
|
||||||
(setopt fill-column 100
|
(setq-local fill-column 100)
|
||||||
zig-format-on-save nil))
|
(setopt zig-format-on-save nil))
|
||||||
|
|
||||||
(add-to-list 'load-path "~/.config/emacs/lisp/")
|
(push "~/.config/emacs/lisp/" load-path)
|
||||||
(require 'init-org)
|
(require 'init-org)
|
||||||
|
|
||||||
;;; init.el ends here
|
;;; init.el ends here
|
||||||
|
|
|
@ -29,49 +29,6 @@
|
||||||
|
|
||||||
;;; Code:
|
;;; Code:
|
||||||
|
|
||||||
(use-package citar
|
|
||||||
:after (oc)
|
|
||||||
:config
|
|
||||||
(setopt citar-bibliography org-cite-global-bibliography
|
|
||||||
citar-library-paths '("~/Nextcloud/Library/"))
|
|
||||||
;; (when (elpaca-installed-p 'citar-embark)
|
|
||||||
;; (setopt citar-at-point-function 'embark-act))
|
|
||||||
:hook (org-mode . citar-capf-setup))
|
|
||||||
|
|
||||||
(use-package citar-embark
|
|
||||||
:after (citar embark)
|
|
||||||
:config (citar-embark-mode))
|
|
||||||
|
|
||||||
(use-package citar-org-roam
|
|
||||||
:after (citar org-roam)
|
|
||||||
:config
|
|
||||||
(setopt citar-org-roam-capture-template-key "r"
|
|
||||||
citar-org-roam-note-title-template "${title} - ${author}"
|
|
||||||
citar-org-roam-subdir "references")
|
|
||||||
(citar-org-roam-mode))
|
|
||||||
|
|
||||||
(use-package citeproc
|
|
||||||
:after (oc))
|
|
||||||
|
|
||||||
(use-feature oc
|
|
||||||
:after (org)
|
|
||||||
:config
|
|
||||||
(setopt org-cite-export-processors '((latex biblatex)
|
|
||||||
(t csl))
|
|
||||||
org-cite-global-bibliography '("~/Nextcloud/Library/bib/library.bib"))
|
|
||||||
(when (elpaca-installed-p 'citar)
|
|
||||||
(setopt org-cite-activate-processor 'citar
|
|
||||||
org-cite-follow-processor 'citar
|
|
||||||
org-cite-insert-processor 'citar)))
|
|
||||||
|
|
||||||
(use-feature oc-csl
|
|
||||||
:after (citeproc oc)
|
|
||||||
:config
|
|
||||||
(let ((zotero_styles (expand-file-name
|
|
||||||
"Zotero/styles/" (or (getenv "XDG_DATA_HOME") "~/.local/share/"))))
|
|
||||||
(if (file-directory-p zotero_styles)
|
|
||||||
(setopt org-cite-csl-styles-dir zotero_styles))))
|
|
||||||
|
|
||||||
(use-package org
|
(use-package org
|
||||||
:bind
|
:bind
|
||||||
(:map global-map
|
(:map global-map
|
||||||
|
@ -81,85 +38,83 @@
|
||||||
:config
|
:config
|
||||||
;; General options TODO: Comment various options more descriptively
|
;; General options TODO: Comment various options more descriptively
|
||||||
(setopt org-agenda-block-separator nil
|
(setopt org-agenda-block-separator nil
|
||||||
;; org-agenda-files (list org-directory)
|
|
||||||
org-agenda-files (directory-files-recursively org-directory "org$")
|
org-agenda-files (directory-files-recursively org-directory "org$")
|
||||||
org-agenda-skip-deadline-if-done nil
|
org-agenda-skip-deadline-if-done t
|
||||||
org-agenda-skip-scheduled-if-deadline-is-shown t
|
org-agenda-skip-scheduled-if-deadline-is-shown t
|
||||||
org-agenda-skip-scheduled-if-done nil
|
org-agenda-skip-scheduled-if-done t
|
||||||
org-agenda-start-on-weekday nil
|
org-agenda-start-on-weekday nil
|
||||||
org-agenda-tags-column 0
|
org-agenda-tags-column 0
|
||||||
org-archive-location (expand-file-name "archive/%s_archive.org::" org-directory)
|
org-archive-location (concat org-directory "/archive/archive.org::* From %s")
|
||||||
org-blank-before-new-entry '((heading . auto)
|
org-blank-before-new-entry '((heading . auto)
|
||||||
(plain-list-item . auto))
|
(plain-list-item . auto))
|
||||||
org-deadline-warning-days 5
|
|
||||||
org-enforce-todo-dependencies t
|
org-enforce-todo-dependencies t
|
||||||
org-fold-catch-invisible-edits 'show-and-error
|
org-fold-catch-invisible-edits 'show-and-error
|
||||||
org-fontify-done-headline t
|
org-fontify-done-headline nil
|
||||||
org-fontify-quote-and-verse-blocks t
|
org-fontify-quote-and-verse-blocks t
|
||||||
org-fontify-todo-headline t
|
org-fontify-todo-headline t
|
||||||
org-goto-interface 'outline-path-completion
|
org-goto-interface 'outline-path-completion
|
||||||
org-hide-emphasis-markers t
|
org-hide-emphasis-markers t
|
||||||
org-insert-heading-respect-content t
|
org-insert-heading-respect-content t
|
||||||
org-log-done 'time
|
org-log-done 'time
|
||||||
org-log-into-drawer t
|
|
||||||
org-log-redeadline 'time
|
|
||||||
org-log-refile 'note
|
|
||||||
org-log-reschedule 'time
|
|
||||||
org-outline-path-complete-in-steps nil
|
org-outline-path-complete-in-steps nil
|
||||||
org-pretty-entities t
|
org-pretty-entities t
|
||||||
org-refile-allow-creating-parent-nodes 'confirm
|
org-refile-allow-creating-parent-nodes 'confirm
|
||||||
org-refile-targets '((nil :maxlevel . 3)
|
org-refile-targets '((nil :maxlevel . 3)
|
||||||
(org-agenda-files :maxlevel . 2))
|
(org-agenda-files :maxlevel . 2))
|
||||||
org-refile-use-outline-path 'file
|
org-refile-use-outline-path nil
|
||||||
org-return-follows-link t
|
org-return-follows-link t
|
||||||
org-reverse-note-order t ; Add/refile notes at the beginning of an entry
|
org-reverse-note-order t ; Add/refile notes at the beginning of an entry
|
||||||
org-special-ctrl-a/e t
|
|
||||||
org-src-preserve-indentation t
|
org-src-preserve-indentation t
|
||||||
org-startup-folded 'fold
|
org-startup-folded 'fold
|
||||||
org-tags-column 0
|
org-tags-column 0
|
||||||
org-todo-keywords '((sequence "TODO(t)"
|
org-todo-keywords '((sequence "BLOCKED(b@/!)" "IN-PROGRESS(i@/!)"
|
||||||
"NEXT(n)"
|
"TODO(t)" "WAITING(w@/!)" "|" "DONE(d!)"
|
||||||
"PROG(p)"
|
"WONT-DO(n@/!)"))
|
||||||
"|"
|
;; org-todo-keyword-faces '(("TODO" . (icon-button))
|
||||||
"DONE(d!)"
|
;; ("IN-PROGRESS" . (tool-bar))
|
||||||
"WONT(w@/!)")
|
;; ("BLOCKED" . (match))
|
||||||
(sequence "IDEA(i)" "|"))
|
;; ("WONT-DO" . (org-done)))
|
||||||
org-todo-keyword-faces '(("TODO" . (dired-mark))
|
|
||||||
("PROG" . (success))
|
|
||||||
("NEXT" . (dired-special))
|
|
||||||
("WONT" . (org-done)))
|
|
||||||
org-todo-repeat-to-state "TODO")
|
org-todo-repeat-to-state "TODO")
|
||||||
|
|
||||||
(setq org-capture-templates
|
(setq org-capture-templates
|
||||||
`(
|
`(
|
||||||
("i" "Inbox" entry (file "roam/inbox.org")
|
("m" "Personal")
|
||||||
"* %?"
|
("mj" "Log Entry"
|
||||||
:empty-lines 1
|
entry (file+datetree ,(concat org-directory "/personal_log.org"))
|
||||||
)
|
|
||||||
|
|
||||||
("j" "Log Entry"
|
|
||||||
entry (file+datetree "log.org")
|
|
||||||
"** %?"
|
"** %?"
|
||||||
:empty-lines 1)
|
:empty-lines 1)
|
||||||
|
|
||||||
("n" "Note"
|
("mn" "Note"
|
||||||
entry (file+headline "inbox.org" "Notes")
|
entry (file+headline ,(concat org-directory "/notes.org") "Note to self...")
|
||||||
"** %?
|
"** %?"
|
||||||
:PROPERTIES:
|
|
||||||
:CREATED: %U
|
|
||||||
:END:"
|
|
||||||
:empty-lines 1)
|
:empty-lines 1)
|
||||||
|
|
||||||
("t" "Todo" entry (file+headline "inbox.org" "Tasks")
|
("mt" "Todo"
|
||||||
"** TODO [#B] %?
|
entry (file+headline ,(concat org-directory "/inbox.org") "You can do it!")
|
||||||
:PROPERTIES:
|
"** TODO [#B] %?\n:CREATED: %U\n "
|
||||||
:CREATED: %U
|
|
||||||
:END:
|
|
||||||
%i\n%a
|
|
||||||
Notes: "
|
|
||||||
:empty-lines 1)
|
:empty-lines 1)
|
||||||
)
|
|
||||||
)
|
("p" "Projects")
|
||||||
|
("pn" "Note"
|
||||||
|
entry (file+headline ,(concat org-directory "/notes.org") "Project Notes")
|
||||||
|
"** %?"
|
||||||
|
:empty-lines 1)
|
||||||
|
|
||||||
|
("pt" "Todo"
|
||||||
|
entry (file+headline ,(concat org-directory "/inbox.org") "Project Tasks")
|
||||||
|
"** TODO [#B] %?\n:CREATED: %U\n%i\n%a\nNotes: "
|
||||||
|
:empty-lines 1)
|
||||||
|
|
||||||
|
("w" "Work")
|
||||||
|
("wn" "Note"
|
||||||
|
entry (file+headline ,(concat org-directory "/notes.org") "Work Notes")
|
||||||
|
"** %?"
|
||||||
|
:empty-lines 1)
|
||||||
|
|
||||||
|
("wt" "Todo"
|
||||||
|
entry (file+headline ,(concat org-directory "/inbox.org") "Work Tasks")
|
||||||
|
"** TODO [#B] %?\n:CREATED: %U\n%i\n%a\nNotes: "
|
||||||
|
:empty-lines 1)))
|
||||||
|
|
||||||
;; Headline appearance
|
;; Headline appearance
|
||||||
(custom-set-faces
|
(custom-set-faces
|
||||||
|
@ -178,328 +133,92 @@ Notes: "
|
||||||
("f" . org-shiftmetaright)
|
("f" . org-shiftmetaright)
|
||||||
("b" . org-shiftmetaleft)
|
("b" . org-shiftmetaleft)
|
||||||
("v" . org-tags-view)
|
("v" . org-tags-view)
|
||||||
("y" . org-todo-yesterday)
|
|
||||||
("l" . org-toggle-link-display)
|
|
||||||
("C-n" . org-priority-down)
|
("C-n" . org-priority-down)
|
||||||
("C-p" . org-priority-up)))
|
("C-p" . org-priority-up)))
|
||||||
|
|
||||||
(use-feature org-agenda
|
|
||||||
:after (org)
|
|
||||||
:bind
|
|
||||||
(:map org-agenda-mode-map
|
|
||||||
("C-c C-r" . as/org-agenda-reconcile-inbox-item))
|
|
||||||
:config (setopt org-agenda-start-with-log-mode '(clock closed state))
|
|
||||||
:init
|
|
||||||
(defun as/org-agenda-reconcile-inbox-item ()
|
|
||||||
"Process and refile an org-agenda item"
|
|
||||||
(interactive)
|
|
||||||
(org-with-wide-buffer
|
|
||||||
(org-agenda-set-tags)
|
|
||||||
(org-agenda-priority)
|
|
||||||
(if (y-or-n-p "Schedule item?")
|
|
||||||
(org-agenda-schedule nil nil))
|
|
||||||
(org-agenda-refile nil nil t))))
|
|
||||||
|
|
||||||
(use-package org-appear
|
(use-package org-appear
|
||||||
:config
|
:config
|
||||||
(setopt org-appear-autoentities t
|
(setopt org-appear-autoentities t
|
||||||
org-appear-autolinks nil
|
org-appear-autolinks t
|
||||||
org-appear-autosubmarkers t
|
org-appear-autosubmarkers t
|
||||||
org-appear-trigger 'on-change)
|
org-appear-trigger 'on-change)
|
||||||
:hook (org-mode . org-appear-mode))
|
:hook (org-mode . org-appear-mode))
|
||||||
|
|
||||||
(use-feature org-clock
|
|
||||||
:after (org)
|
|
||||||
:config
|
|
||||||
(setopt org-clock-in-resume t
|
|
||||||
org-clock-in-switch-to-state "PROG"
|
|
||||||
org-clock-persist t
|
|
||||||
org-clock-rounding-minutes 5))
|
|
||||||
|
|
||||||
(use-package org-edna
|
|
||||||
:config (setopt org-edna-finder-use-cache t)
|
|
||||||
:hook (org-mode . org-edna-mode))
|
|
||||||
|
|
||||||
(use-feature org-habit
|
|
||||||
:after (org)
|
|
||||||
;; REVIEW: do I need to add to modules if it loads after org anyway?
|
|
||||||
:init (add-to-list 'org-modules 'org-habit t))
|
|
||||||
|
|
||||||
(use-feature org-id
|
|
||||||
:after (org)
|
|
||||||
:config
|
|
||||||
(setopt org-id-link-to-org-use-id t
|
|
||||||
org-id-locations-file (locate-user-emacs-file "org-id-locations")
|
|
||||||
org-id-method 'ts
|
|
||||||
org-id-ts-format "%Y%m%dT%H%M%S.%2N%z")
|
|
||||||
;; REVIEW: do I need to add to modules if it loads after org anyway?
|
|
||||||
:init (add-to-list 'org-modules 'org-id t))
|
|
||||||
|
|
||||||
(use-package org-modern
|
(use-package org-modern
|
||||||
:disabled t
|
:disabled
|
||||||
:config
|
:config
|
||||||
(setopt org-modern-block-name nil
|
(setopt org-modern-symbol "Hack")
|
||||||
org-modern-priority nil
|
|
||||||
org-modern-symbol "DejaVu Sans"
|
|
||||||
org-modern-todo nil
|
|
||||||
org-modern-tag nil
|
|
||||||
org-modern-timestamp nil)
|
|
||||||
:hook
|
:hook
|
||||||
(org-mode . org-modern-mode)
|
(org-mode . org-modern-mode)
|
||||||
(org-agenda-finalize . org-modern-agenda))
|
(org-agenda-finalize . org-modern-agenda))
|
||||||
|
|
||||||
(use-package org-noter
|
|
||||||
:after (org)
|
|
||||||
:config
|
|
||||||
(setopt org-noter-notes-search-path (list (concat org-directory "/roam")))
|
|
||||||
(org-noter-enable-org-roam-integration))
|
|
||||||
|
|
||||||
(use-package org-pomodoro
|
|
||||||
:after (org-clock)
|
|
||||||
:commands (org-pomodoro)
|
|
||||||
:config
|
|
||||||
;; (defun as/org-pomodoro-started-todo-update ()
|
|
||||||
;; "Update todo state when starting a pomodoro"
|
|
||||||
;; (when (or (string= org-state "NEXT")
|
|
||||||
;; (string= org-state "TODO"))
|
|
||||||
;; (org-todo "PROG")))
|
|
||||||
;; (defun as/org-todo-state-maybe-update-pomodoro ()
|
|
||||||
;; "Update or start a pomodoro when changing todo state
|
|
||||||
|
|
||||||
;; REVIEW: This could be updated to always trigger a pomodoro change, like when
|
|
||||||
;; changing state to PROG. This has the added benefit of making the above function
|
|
||||||
;; redundent, as I could just use `org-todo' as a single start and end point for
|
|
||||||
;; all pomodoros"
|
|
||||||
;; (when (and (or (string= org-state "TODO")
|
|
||||||
;; (string= org-state "DONE"))
|
|
||||||
;; (org-pomodoro-active-p))
|
|
||||||
;; (org-pomodoro-kill)))
|
|
||||||
;; (add-to-list 'org-after-todo-state-change-hook #'as/org-todo-state-change-maybe-kill-pomodoro)
|
|
||||||
;; (add-to-list 'org-pomodoro-started-hook #'as/org-pomodoro-started-todo-update)
|
|
||||||
(setopt alert-user-configuration ; Send mesages to libnotify
|
|
||||||
'((((:category . "org-pomodoro")) libnotify nil))
|
|
||||||
org-pomodoro-audio-player (executable-find "pw-cat")
|
|
||||||
org-pomodoro-keep-killed-pomodoro-time t
|
|
||||||
org-pomodoro-length 50
|
|
||||||
org-pomodoro-short-break-length 10
|
|
||||||
org-pomodoro-manual-break t)
|
|
||||||
:init
|
|
||||||
;; (defun as/org-pomodoro-todo-state-trigger ()
|
|
||||||
;; "Starts or stops a pomodoro when todo state changes"
|
|
||||||
;; (cond
|
|
||||||
;; ((when (string= org-state "PROG")
|
|
||||||
;; (if (org-pomodoro-active-p)
|
|
||||||
;; ((org-pomodoro-kill)
|
|
||||||
;; (org-pomodoro nil))
|
|
||||||
;; (org-pomodoro nil)))
|
|
||||||
;; ((when (and (or (string= org-state "DONE") (string= org-state "TODO"))
|
|
||||||
;; (org-pomodoro-active-p))
|
|
||||||
;; (org-pomodoro-kill))))))
|
|
||||||
;; (with-eval-after-load 'org-clock
|
|
||||||
;; (add-to-list 'org-after-todo-state-change-hook #'as/org-pomodoro-todo-state-trigger))
|
|
||||||
)
|
|
||||||
|
|
||||||
(use-package org-roam
|
|
||||||
:after (org)
|
|
||||||
:bind
|
|
||||||
(:map as/org-prefix-map
|
|
||||||
("r i" . org-roam-node-insert)
|
|
||||||
("r f" . org-roam-node-find)
|
|
||||||
("r c" . org-roam-capture)
|
|
||||||
;; REVIEW: Not sure if I really need these?
|
|
||||||
;; ("r b" . org-roam-buffer-toggle)
|
|
||||||
;; ("r d" . org-roam-buffer-display-dedicated)
|
|
||||||
;; ("r a a" . org-roam-alias-add)
|
|
||||||
;; ("r a r" . org-roam-alias-remove)
|
|
||||||
;; ("r r a" . org-roam-ref-add)
|
|
||||||
;; ("r r r" . org-roam-ref-remove)
|
|
||||||
)
|
|
||||||
:config
|
|
||||||
(setopt org-roam-database-connector 'sqlite-builtin)
|
|
||||||
(setq org-roam-db-gc-threshold most-positive-fixnum) ; doesn't like the new `setopt'
|
|
||||||
(add-to-list 'display-buffer-alist
|
|
||||||
'("\\*org-roam\\*"
|
|
||||||
(display-buffer-in-direction)
|
|
||||||
(direction . right)
|
|
||||||
(window-width . 0.33)
|
|
||||||
(window-height . fit-window-to-buffer)))
|
|
||||||
(add-to-list 'org-roam-capture-templates
|
|
||||||
'("r" "reference" plain
|
|
||||||
"%?"
|
|
||||||
:target
|
|
||||||
(file+head "references/${citar-citekey}.org"
|
|
||||||
"#+title: Notes on: ${note-title}\n")
|
|
||||||
:empty-lines 1
|
|
||||||
:unnarrowed t
|
|
||||||
))
|
|
||||||
(add-to-list 'org-roam-capture-templates
|
|
||||||
`("p" "project" plain (file ,(concat org-roam-directory
|
|
||||||
"/templates/projects.org"))
|
|
||||||
:target
|
|
||||||
(file+head "projects/%<%Y%m%d%H%M%S>-${slug}.org"
|
|
||||||
"#+title: ${title}\n#+filetags: projects")
|
|
||||||
:empty-lines 1
|
|
||||||
:unnarrowed t))
|
|
||||||
(org-roam-db-autosync-mode)
|
|
||||||
:ensure (org-roam :files (:defaults "extensions/*"))
|
|
||||||
:init
|
|
||||||
(setopt org-roam-directory (file-name-as-directory (expand-file-name "roam" org-directory))))
|
|
||||||
|
|
||||||
(use-package org-super-agenda
|
(use-package org-super-agenda
|
||||||
:hook (org-agenda-mode . org-super-agenda-mode)
|
:hook (org-agenda-mode . org-super-agenda-mode)
|
||||||
:init
|
:init
|
||||||
(setq org-agenda-custom-commands
|
(setq org-agenda-custom-commands
|
||||||
'(("w" "Work agenda"
|
'(("u" "Super agenda"
|
||||||
|
|
||||||
((agenda "" ((org-agenda-prefix-format " %?-12t %s")
|
((agenda "" ((org-agenda-prefix-format " %?-12t %s")
|
||||||
|
;; (org-agenda-prefix-format " %-20:c%?-12t %s")
|
||||||
(org-agenda-remove-tags t)
|
(org-agenda-remove-tags t)
|
||||||
(org-agenda-skip-function '(org-agenda-skip-entry-if
|
(org-agenda-skip-function '(org-agenda-skip-entry-if
|
||||||
'todo '("WONT")))
|
'todo '("DONE" "WONT-DO")))
|
||||||
(org-agenda-span 'day)
|
(org-agenda-span 5)))
|
||||||
(org-habit-show-habits nil)))
|
|
||||||
|
|
||||||
(alltodo "" ((org-agenda-overriding-header "")
|
(alltodo "" ((org-agenda-overriding-header "")
|
||||||
(org-agenda-prefix-format " %?-12t %s")
|
(org-agenda-prefix-format " %?-12t %s")
|
||||||
(org-agenda-remove-tags t)
|
(org-agenda-remove-tags t)
|
||||||
(org-super-agenda-groups
|
(org-super-agenda-groups
|
||||||
'((:discard
|
'((:name "Important"
|
||||||
(:deadline future
|
|
||||||
:scheduled future
|
|
||||||
:category ("house" "me" "notes")))
|
|
||||||
|
|
||||||
(:name "Done"
|
|
||||||
:log state
|
|
||||||
:todo "DONE"
|
|
||||||
:order 90)
|
|
||||||
|
|
||||||
(:name "Overdue"
|
|
||||||
:deadline past
|
|
||||||
:scheduled past
|
|
||||||
:order 1)
|
|
||||||
|
|
||||||
(:name "Inbox"
|
|
||||||
:category ("inbox" "phone_inbox")
|
|
||||||
:order 9)
|
|
||||||
|
|
||||||
(:name "Important"
|
|
||||||
:priority "A"
|
:priority "A"
|
||||||
:order 0)
|
:order 0)
|
||||||
|
|
||||||
(:name "In-Progress"
|
(:name "In-Progress"
|
||||||
:todo "PROG"
|
:todo "IN-PROGRESS"
|
||||||
:order 2)
|
:order 2)
|
||||||
|
|
||||||
(:name "Next"
|
(:name "Blocked"
|
||||||
:todo "NEXT"
|
:todo "BLOCKED"
|
||||||
:order 3)
|
:order 3)
|
||||||
|
|
||||||
(:name "Today"
|
|
||||||
:deadline today
|
|
||||||
:scheduled today
|
|
||||||
:time-grid t
|
|
||||||
:order 4)
|
|
||||||
|
|
||||||
(:name "Research"
|
|
||||||
:tag "research"
|
|
||||||
:order 7)
|
|
||||||
|
|
||||||
(:name "Project Backlog"
|
|
||||||
:and (:todo "TODO" :tag "projects")
|
|
||||||
:order 5)
|
|
||||||
|
|
||||||
(:name "General Backlog"
|
|
||||||
:and (:todo "TODO" :priority "B")
|
|
||||||
:order 8)
|
|
||||||
|
|
||||||
(:name "Less Important"
|
|
||||||
:priority<= "C"
|
|
||||||
:order 80)
|
|
||||||
))))))
|
|
||||||
("y" "My agenda"
|
|
||||||
|
|
||||||
((agenda "" ((org-agenda-prefix-format " %?-12t %s")
|
|
||||||
(org-agenda-remove-tags t)
|
|
||||||
(org-agenda-skip-function '(org-agenda-skip-entry-if
|
|
||||||
'todo '("WONT") 'regexp '("job")))
|
|
||||||
(org-agenda-span 3)))
|
|
||||||
|
|
||||||
(alltodo "" ((org-agenda-overriding-header "")
|
|
||||||
(org-agenda-prefix-format " %?-12t %s")
|
|
||||||
(org-agenda-remove-tags t)
|
|
||||||
(org-super-agenda-groups
|
|
||||||
'((:discard
|
|
||||||
(:not
|
|
||||||
(:category ("house" "me" "notes"))))
|
|
||||||
|
|
||||||
;; (:discard
|
|
||||||
;; (:deadline future :scheduled future))
|
|
||||||
|
|
||||||
(:name "Overdue"
|
(:name "Overdue"
|
||||||
:deadline past
|
:deadline past
|
||||||
:scheduled past
|
:scheduled past
|
||||||
:order 1)
|
:order 1)
|
||||||
|
|
||||||
|
;; TODO: Figure out how to organize chores/personal
|
||||||
|
(:name "Chores"
|
||||||
|
:tag "chores"
|
||||||
|
:order 19)
|
||||||
|
|
||||||
|
(:name "Personal"
|
||||||
|
:habit t
|
||||||
|
:order 17)
|
||||||
|
|
||||||
|
(:name "Research"
|
||||||
|
:tag "research"
|
||||||
|
:order 7)
|
||||||
|
|
||||||
(:name "Upcoming"
|
(:name "Upcoming"
|
||||||
:deadline future
|
:deadline future
|
||||||
:scheduled future
|
:scheduled future
|
||||||
:order 99)
|
:order 18)
|
||||||
|
|
||||||
(:name "Inbox"
|
(:name "Project Backlog"
|
||||||
:category ("inbox" "phone_inbox")
|
:and (:todo "TODO" :tag "project")
|
||||||
:order 8)
|
|
||||||
|
|
||||||
(:name "Done"
|
|
||||||
:todo "DONE"
|
|
||||||
:order 99)
|
|
||||||
|
|
||||||
(:name "Important"
|
|
||||||
:priority "A"
|
|
||||||
:order 0)
|
|
||||||
|
|
||||||
(:name "In-Progress"
|
|
||||||
:todo "PROG"
|
|
||||||
:order 2)
|
|
||||||
|
|
||||||
(:name "Next"
|
|
||||||
:todo "NEXT"
|
|
||||||
:order 3)
|
|
||||||
|
|
||||||
(:name "Household"
|
|
||||||
:tag "chores"
|
|
||||||
:order 6)
|
|
||||||
|
|
||||||
(:name "Routine"
|
|
||||||
:and (:habit t :not (:tag "chores"))
|
|
||||||
:order 5)
|
:order 5)
|
||||||
|
|
||||||
(:name "Today"
|
|
||||||
:deadline today
|
|
||||||
:scheduled today
|
|
||||||
:time-grid t
|
|
||||||
:order 4)
|
|
||||||
|
|
||||||
;; (:name "Personal projects"
|
|
||||||
;; :categery "me"
|
|
||||||
;; :order 9)
|
|
||||||
|
|
||||||
(:name "Research"
|
|
||||||
:tag "research"
|
|
||||||
:order 7)
|
|
||||||
|
|
||||||
(:name "General Backlog"
|
(:name "General Backlog"
|
||||||
:and (:todo "TODO" :priority "B")
|
:and (:todo "TODO" :priority "B")
|
||||||
:order 50)
|
:order 6)
|
||||||
|
|
||||||
(:name "Less Important"
|
(:name "Less Important"
|
||||||
:priority<= "C"
|
:priority<= "C"
|
||||||
:order 85)
|
:order 20))))))))))
|
||||||
)))))))))
|
|
||||||
|
|
||||||
(use-package org-superstar
|
(use-package org-superstar
|
||||||
;; :disabled t
|
|
||||||
:config
|
:config
|
||||||
(setopt org-indent-mode-turns-on-hiding-stars nil
|
(setopt org-indent-mode-turns-on-hiding-stars nil
|
||||||
org-superstar-headline-bullets-list '("◉" "🞛" "○" "▷")
|
|
||||||
org-superstar-leading-bullet ?\s
|
org-superstar-leading-bullet ?\s
|
||||||
org-superstar-special-todo-items t)
|
org-superstar-special-todo-items t)
|
||||||
:hook (org-mode . org-superstar-mode))
|
:hook (org-mode . org-superstar-mode))
|
||||||
|
|
|
@ -2,14 +2,14 @@
|
||||||
layer = top
|
layer = top
|
||||||
exit-on-keyboard-focus-loss = yes
|
exit-on-keyboard-focus-loss = yes
|
||||||
|
|
||||||
font=Hack:size=18
|
font=Hack
|
||||||
dpi-aware=auto
|
dpi-aware=auto
|
||||||
icon-theme=Colloid-Grey-Dark
|
icon-theme=Qogir-dark
|
||||||
icons-enabled=yes
|
icons-enabled=yes
|
||||||
letter-spacing=0
|
letter-spacing=0
|
||||||
prompt='> '
|
prompt='> '
|
||||||
|
|
||||||
lines=10
|
lines=15
|
||||||
# line-height=
|
# line-height=
|
||||||
width=40
|
width=40
|
||||||
tabs=4
|
tabs=4
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
# GTK2 Settings
|
# GTK2 Settings
|
||||||
gtk-theme-name="Colloid-Dark-Compact-Catppuccin"
|
gtk-theme-name="Colloid-Dark-Compact-Catppuccin"
|
||||||
gtk-icon-theme-name="Colloid-Grey-Dark"
|
gtk-icon-theme-name="Colloid-Grey-Dark"
|
||||||
gtk-font-name="DejaVu Sans 12"
|
gtk-font-name="DejaVu Sans 10"
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
[Settings]
|
[Settings]
|
||||||
gtk-theme-name = Colloid-Dark-Compact-Catppuccin
|
gtk-theme-name = Colloid-Dark-Compact-Catppuccin
|
||||||
gtk-icon-theme-name = Colloid-Grey-Dark
|
gtk-icon-theme-name = Colloid-Grey-Dark
|
||||||
gtk-font-name = "DejaVu Sans 12"
|
gtk-font-name = DejaVu Sans 10
|
||||||
|
|
|
@ -2,4 +2,4 @@
|
||||||
gtk-application-preferdark-theme = true
|
gtk-application-preferdark-theme = true
|
||||||
gtk-theme-name = Colloid-Dark-Compact-Catppuccin
|
gtk-theme-name = Colloid-Dark-Compact-Catppuccin
|
||||||
gtk-icon-theme-name = Colloid-Grey-Dark
|
gtk-icon-theme-name = Colloid-Grey-Dark
|
||||||
gtk-font-name = "DejaVu Sans 12"
|
gtk-font-name = "DejaVu Sans 10"
|
||||||
|
|
|
@ -43,8 +43,8 @@ transparent_black: &transparent_black 45475aaa
|
||||||
# transparent_black: &transparent_black 4a555baa
|
# transparent_black: &transparent_black 4a555baa
|
||||||
# Fonts
|
# Fonts
|
||||||
{{- if eq .chezmoi.hostname "helix" }}
|
{{- if eq .chezmoi.hostname "helix" }}
|
||||||
hack: &hack Hack:pixelsize=32
|
hack: &hack Hack:pixelsize=28
|
||||||
awesome: &awesome Font Awesome 6 Free:style=solid:pixelsize=32
|
awesome: &awesome Font Awesome 6 Free:style=solid:pixelsize=28
|
||||||
{{- else}}
|
{{- else}}
|
||||||
hack: &hack Hack:pixelsize=13
|
hack: &hack Hack:pixelsize=13
|
||||||
awesome: &awesome Font Awesome 6 Free:style=solid:pixelsize=12
|
awesome: &awesome Font Awesome 6 Free:style=solid:pixelsize=12
|
||||||
|
@ -55,7 +55,7 @@ separator:
|
||||||
|
|
||||||
bar:
|
bar:
|
||||||
{{- if eq .chezmoi.hostname "helix" }}
|
{{- if eq .chezmoi.hostname "helix" }}
|
||||||
height: 68
|
height: 64
|
||||||
location: top
|
location: top
|
||||||
{{- else if eq .chezmoi.hostname "hydrus" }}
|
{{- else if eq .chezmoi.hostname "hydrus" }}
|
||||||
monitor: DP-1
|
monitor: DP-1
|
||||||
|
|
|
@ -1,41 +1,26 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
river=$(pgrep -x river)
|
river=$(ps -C river | awk '/river/')
|
||||||
|
|
||||||
if [ -z "$river" ]; then
|
if [ -z "$river" ]; then
|
||||||
echo "error: $0: River is not running"
|
echo "error: $0: River is not running"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
elif [ $# -ne 1 ]; then
|
||||||
|
|
||||||
if [ $# -ne 1 ]; then
|
|
||||||
echo "Usage: river-exit [command]"
|
echo "Usage: river-exit [command]"
|
||||||
echo "Commands: logout, poweroff, or reboot"
|
echo "Commands: logout, poweroff, or reboot"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "$1" = "logout" ] || [ "$1" = "poweroff" ] || [ "$1" = "reboot" ];then
|
if [ "$1" = "logout" ]; then
|
||||||
riverctl spawn 'reset'
|
riverctl spawn 'reset'
|
||||||
|
|
||||||
if [ "$1" = logout ];then
|
|
||||||
riverctl exit
|
riverctl exit
|
||||||
elif [ "$1" = poweroff ] || [ "$1" = reboot ];then
|
elif [ "$1" = "poweroff" ]; then
|
||||||
loginctl "$1"
|
riverctl spawn 'reset'
|
||||||
fi
|
loginctl poweroff
|
||||||
|
elif [ "$1" = "reboot" ]; then
|
||||||
|
riverctl spawn 'reset'
|
||||||
|
loginctl reboot
|
||||||
else
|
else
|
||||||
echo "error: $0: unexpected argument"
|
echo "error: $0: unexpected argument"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# if [ "$1" = "logout" ]; then
|
|
||||||
# riverctl spawn 'reset'
|
|
||||||
# riverctl exit
|
|
||||||
# elif [ "$1" = "poweroff" ]; then
|
|
||||||
# riverctl spawn 'reset'
|
|
||||||
# loginctl poweroff
|
|
||||||
# elif [ "$1" = "reboot" ]; then
|
|
||||||
# riverctl spawn 'reset'
|
|
||||||
# loginctl reboot
|
|
||||||
# else
|
|
||||||
# echo "error: $0: unexpected argument"
|
|
||||||
# exit 1
|
|
||||||
# fi
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
if [ "$(connmanctl state | awk '/State/ {print $NF}')" = 'online' ]; then
|
if [ $(connmanctl state | awk '/State/ {print $NF}') == 'online' ]; then
|
||||||
connmanctl disable wifi
|
connmanctl disable wifi
|
||||||
else
|
else
|
||||||
connmanctl enable wifi
|
connmanctl enable wifi
|
||||||
|
|
|
@ -11,12 +11,8 @@ alias zigup='zigup --install-dir "${HOME}/.local/share/zigup" --path-link "${HOM
|
||||||
|
|
||||||
updates=$(checkupdates)
|
updates=$(checkupdates)
|
||||||
aur_updates=$(paru -Qua)
|
aur_updates=$(paru -Qua)
|
||||||
rust_has_update=$(rustup check | grep -c 'Update')
|
|
||||||
|
|
||||||
if [ "$updates" = "" ] \
|
if [ "$updates" = "" ] && [ "$aur_updates" = "" ]; then
|
||||||
&& [ "$aur_updates" = "" ] \
|
|
||||||
&& [ "$rust_has_update" -eq 0 ];
|
|
||||||
then
|
|
||||||
echo "System is already up to date."
|
echo "System is already up to date."
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
@ -24,13 +20,6 @@ fi
|
||||||
river_has_update=$(echo "$aur_updates" | grep -c 'river-git')
|
river_has_update=$(echo "$aur_updates" | grep -c 'river-git')
|
||||||
zls_has_update=$(echo "$aur_updates" | grep -c 'zls-git')
|
zls_has_update=$(echo "$aur_updates" | grep -c 'zls-git')
|
||||||
|
|
||||||
|
|
||||||
if [ "$rust_has_update" -ne 0 ]; then
|
|
||||||
rustup update
|
|
||||||
else
|
|
||||||
echo "$rust_has_update"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$river_has_update" -ne 0 ] && [ "$zls_has_update" -ne 0 ]; then
|
if [ "$river_has_update" -ne 0 ] && [ "$zls_has_update" -ne 0 ]; then
|
||||||
zigup 0.13.0
|
zigup 0.13.0
|
||||||
paru -Syu river-git --ignore zls-git
|
paru -Syu river-git --ignore zls-git
|
||||||
|
|
Loading…
Reference in a new issue