Update readme and add some better customisation variables

This commit is contained in:
BirDt_ 2025-08-21 17:03:00 +08:00
parent 8592cb0134
commit 12492937d3
5 changed files with 106 additions and 7 deletions

View file

@ -50,14 +50,27 @@
:config
(add-hook 'dired-mode-hook 'all-the-icons-dired-mode))
(defcustom theurgy-enable-pdf-tools-windows nil
"Whether `pdf-tools' should be enabled on Windows sytems."
:type 'boolean
:group 'theurgy
:group 'theurgy-compat)
(defcustom theurgy-enable-ready-player-windows nil
"Whether `ready-player' should be enabled on Windows sytems."
:type 'boolean
:group 'theurgy
:group 'theurgy-compat)
;; Multimedia and PDF viewing
(when (not (equal system-type 'windows-nt))
(when (or (not (equal system-type 'windows-nt)) theurgy-enable-ready-player-windows)
(use-package ready-player
:ensure t
:config
(setq ready-player-autoplay nil)
(ready-player-mode 1))
(ready-player-mode 1)))
(when (or (not (equal system-type 'windows-nt)) theurgy-enable-pdf-tools-windows)
(use-package pdf-tools
:config (pdf-loader-install)))

View file

@ -60,6 +60,14 @@
(save-selected-window
(neotree-dir (string-remove-prefix "project: " tab-group-name))))))
(defun theurgy-get-tab-project-dir ()
"Get the directory of the project in the current tab.
This returns nil if no project is found."
(let ((tab-group-name (tab-bar-tab-group-default (tab-bar--current-tab))))
(if (and tab-group-name (string-match-p "^project:" tab-group-name))
(string-remove-prefix "project: " tab-group-name)
nil)))
(add-hook 'tab-bar-select-tab-hook #'theurgy-swap-to-tab-project)
(defun theurgy-edit-projects-list ()

View file

@ -22,7 +22,13 @@
;;; Code:
(when (not (equal system-type 'windows-nt))
(defcustom theurgy-enable-vterm-windows nil
"Whether `vterm' should be enabled on Windows sytems."
:type 'boolean
:group 'theurgy
:group 'theurgy-compat)
(when (or (not (equal system-type 'windows-nt)) theurgy-enable-vterm-windows)
(use-package vterm
:ensure t))