diff options
Diffstat (limited to 'bard-emacs-modules')
| -rw-r--r-- | bard-emacs-modules/bard-emacs-completion.el | 60 | ||||
| -rw-r--r-- | bard-emacs-modules/bard-emacs-essentials.el | 21 | ||||
| -rw-r--r-- | bard-emacs-modules/bard-emacs-org.el | 5 | ||||
| -rw-r--r-- | bard-emacs-modules/bard-emacs-theme.el | 78 | ||||
| -rw-r--r-- | bard-emacs-modules/bard-emacs-ui.el | 35 | ||||
| -rw-r--r-- | bard-emacs-modules/bard-emacs-web.el | 6 | ||||
| -rw-r--r-- | bard-emacs-modules/bard-emacs-window.el | 15 | ||||
| -rw-r--r-- | bard-emacs-modules/bard-emacs-writing.el | 9 |
8 files changed, 64 insertions, 165 deletions
diff --git a/bard-emacs-modules/bard-emacs-completion.el b/bard-emacs-modules/bard-emacs-completion.el index 32f6637..c9f430c 100644 --- a/bard-emacs-modules/bard-emacs-completion.el +++ b/bard-emacs-modules/bard-emacs-completion.el @@ -33,7 +33,53 @@ (use-package vertico :ensure t :config - (vertico-mode 1)) + (vertico-mode 1) + (setq vertico-scroll-margin 0) + (setq vertico-cycle t) + + (with-eval-after-load 'rfn-eshadow + ;; This works with `file-name-shadow-mode' enabled. When you are in + ;; a sub-directory and use, say, `find-file' to go to your home '~/' + ;; or root '/' directory, Vertico will clear the old path to keep + ;; only your current input. + (add-hook 'rfn-eshadow-update-overlay-hook #'vertico-directory-tidy)) + ) + +(use-package rfn-eshadow + :ensure nil + :hook (minibuffer-setup . cursor-intangible-mode) + :config + (setq resize-mini-windows t) + (setq read-answer-short t) ; also check `use-short-answers' for Emacs28 + (setq echo-keystrokes 0.25) + + ;; Do not allow the cursor to move inside the minibuffer prompt. I + ;; got this from the documentation of Daniel Mendler's Vertico + ;; package: <https://github.com/minad/vertico>. + (setq minibuffer-prompt-properties + '(read-only t cursor-intangible t face minibuffer-prompt)) + + ;; MCT has a variant of this built-in. + (unless (eq prot-emacs-completion-ui 'mct) + ;; Add prompt indicator to `completing-read-multiple'. We display + ;; [`completing-read-multiple': <separator>], e.g., + ;; [`completing-read-multiple': ,] if the separator is a comma. This + ;; is adapted from the README of the `vertico' package by Daniel + ;; Mendler. I made some small tweaks to propertize the segments of + ;; the prompt. + (defun crm-indicator (args) + (cons (format "[`completing-read-multiple': %s] %s" + (propertize + (replace-regexp-in-string + "\\`\\[.*?]\\*\\|\\[.*?]\\*\\'" "" + crm-separator) + 'face 'error) + (car args)) + (cdr args))) + + (advice-add #'completing-read-multiple :filter-args #'crm-indicator)) + + (file-name-shadow-mode 1)) (use-package marginalia :ensure t @@ -94,6 +140,7 @@ ("M-s M-o" . consult-outline) ("M-s M-l" . consult-line) ("M-s M-k" . consult-kmacro) + ("M-s M-r" . consult-register) :config (setq consult-find-args (concat "find . -not ( " @@ -147,16 +194,7 @@ (setq embark-verbose-indicator-nested nil) ; I think I don't have them, but I do not want them either (setq embark-verbose-indicator-buffer-sections '(bindings)) (setq embark-verbose-indicator-excluded-actions - '(embark-cycle embark-act-all embark-collect embark-export embark-insert)) - ) - -(use-package imenu-list - :ensure t - :config - (setq imenu-list-idle-update-delay 0.0) - (setq org-imenu-depth 2) - :bind - (("C-`" . imenu-list-smart-toggle))) + '(embark-cycle embark-act-all embark-collect embark-export embark-insert))) ;; Savehist (setq savehist-file (locate-user-emacs-file "savehist")) diff --git a/bard-emacs-modules/bard-emacs-essentials.el b/bard-emacs-modules/bard-emacs-essentials.el index ca70aaa..949c457 100644 --- a/bard-emacs-modules/bard-emacs-essentials.el +++ b/bard-emacs-modules/bard-emacs-essentials.el @@ -142,27 +142,10 @@ (define-key global-map (kbd "C-c C-w") #'world-clock) -;; timer package -(use-package tmr - :ensure t - :config - (setq tmr-sound-file "/home/bard/.local/bin/scripts/bell.mp3") - (setq tmr-notification-urgency 'normal) - (setq tmr-descriptions-list 'tmr-description-history) - (define-key global-map (kbd "C-c t l") 'tmr-tabulated-view) - (define-key global-map (kbd "C-c t t") #'tmr) - (define-key global-map (kbd "C-c t T") #'tmr-with-description) - (define-key global-map (kbd "C-c t l") #'tmr-tabulated-view) - (define-key global-map (kbd "C-c t c") #'tmr-clone) - (define-key global-map (kbd "C-c t k") #'tmr-cancel) - (define-key global-map (kbd "C-c t s") #'tmr-reschedule) - (define-key global-map (kbd "C-c t e") #'tmr-edit-description) - (define-key global-map (kbd "C-c t r") #'tmr-remove) - (define-key global-map (kbd "C-c t R") #'tmr-remove-finished)) - (use-package breadcrumb :ensure t - ) + :hook + (prog-mode . breadcrumb-mode)) ;; running emacs as server (require 'server) diff --git a/bard-emacs-modules/bard-emacs-org.el b/bard-emacs-modules/bard-emacs-org.el index 439c8b0..53fffba 100644 --- a/bard-emacs-modules/bard-emacs-org.el +++ b/bard-emacs-modules/bard-emacs-org.el @@ -35,11 +35,6 @@ (setq org-id-link-to-org-use-id t) (setq org-link-keep-stored-after-insertion nil) -(use-package org-cliplink - :ensure t - :bind - ("C-c z" . org-cliplink)) - ;; Making org mode look nice (setq org-startup-indented t org-hide-emphasis-markers t diff --git a/bard-emacs-modules/bard-emacs-theme.el b/bard-emacs-modules/bard-emacs-theme.el index 2017a68..a0718a5 100644 --- a/bard-emacs-modules/bard-emacs-theme.el +++ b/bard-emacs-modules/bard-emacs-theme.el @@ -139,6 +139,12 @@ The exact color values are taken from the active Modus theme." modus-themes-bold-constructs nil modus-themes-completions '((t . (extrabold))) modus-themes-prompts '(extrabold)) + (setq modus-themes-common-palette-overrides + `((fringe unspecified) + (bg-line-number-active bg-hl-line) + (bg-line-number-inactive unspecified) + (fg-line-number-active fg-main) + )) ;; org customization (setq org-priority-faces '((?A . (:inherit (bold next-error))) @@ -147,31 +153,6 @@ The exact color values are taken from the active Modus theme." (load-theme 'modus-vivendi t)) -(use-package theme-buffet - :ensure t - :defer nil - :bind - (("<f6>" . theme-buffet-a-la-carte)) - :config - (setq theme-buffet-menu 'end-user) - (setq theme-buffet-end-user - '(:night - (ef-autumn ef-duo-dark ef-night ef-winter ef-dark) - :twilight - (ef-bio ef-cherie modus-vivendi) - :morning - (ef-elea-light ef-maris-light ef-spring) - :day - (ef-frost ef-light ef-trio-light modus-operandi) - :afternoon - (ef-cyprus ef-arbutus ef-day ef-duo-light ef-kassio ef-melissa-light ef-summer modus-operandi-tinted) - :evening - (ef-elea-dark ef-maris-dark ef-melissa-dark ef-symbiosis ef-trio-dark))) - ;; (theme-buffet-a-la-carte) - ;; (theme-buffet-timer-hours 1) - ;; (theme-buffet-mode t) - ) - ;;;; Fonts (use-package fontaine :ensure t @@ -251,37 +232,6 @@ The exact color values are taken from the active Modus theme." (define-key global-map (kbd "C-c f") #'fontaine-set-preset)) -;;; Cursor appearance (cursory) -;; Read the manual: <https://protesilaos.com/emacs/cursory>. -(use-package cursory - :ensure t - :if (display-graphic-p) - :config - (setq cursory-presets - '((box - :blink-cursor-interval 1.0) - (bar - :cursor-type (bar . 2) - :blink-cursor-interval 1.0) - (box-no-blink - :blink-cursor-mode -1) - (underscore - :cursor-type (hbar . 3) - :blink-cursor-interval 1.0) - (t ; the default values - :cursor-type box - :cursor-in-non-selected-windows hollow - :blink-cursor-mode 1 - :blink-cursor-blinks 10 - :blink-cursor-interval 0.2 - :blink-cursor-delay 0.2))) - - (cursory-set-preset (or (cursory-restore-latest-preset) 'box)) - :hook - (kill-emacs . cursory-store-latest-preset) - :bind - ("C-c p" . cursory-set-preset)) - (use-package rainbow-mode :ensure t) @@ -292,22 +242,6 @@ The exact color values are taken from the active Modus theme." (dolist (i custom-enabled-themes) (disable-theme i))) -;; toggle mode-line -;; take from: https://lists.gnu.org/archive/html/help-gnu-emacs/2022-11/msg00695.html -;; (use-package emacs -;; :bind -;; (("<f6>" . bard/toggle-mode-line)) -;; :config -;; (defvar-local old-mode-line nil) - -;; (defun bard/toggle-mode-line () -;; (interactive) -;; (setq-local mode-line-format -;; (if old-mode-line -;; (setq mode-line-format old-mode-line) -;; (setq old-mode-line mode-line-format -;; mode-line-format nil))))) - (provide 'bard-emacs-theme) ;;; bard-emacs-theme.el ends here diff --git a/bard-emacs-modules/bard-emacs-ui.el b/bard-emacs-modules/bard-emacs-ui.el index f37d53d..45d6546 100644 --- a/bard-emacs-modules/bard-emacs-ui.el +++ b/bard-emacs-modules/bard-emacs-ui.el @@ -47,16 +47,15 @@ :ensure t :config (setq spacious-padding-widths - '( :internal-border-width 30 + '( :internal-border-width 20 :header-line-width 4 :mode-line-width 6 :tab-width 4 - :right-divider-width 30 - :left-fringe-width 15 - :right-fringe-width 15 + :right-divider-width 20 + :left-fringe-width 0 + :right-fringe-width 0 :scroll-bar-width 0)) - (spacious-padding-mode t) - ) + (spacious-padding-mode t)) ;; Todo Keywords highlighting, colors defined in bard-emacs-theme.el (use-package hl-todo @@ -64,30 +63,6 @@ :init (global-hl-todo-mode t)) -;; Show avaiable key chords -(use-package which-key - :ensure t - :init - (which-key-mode 1)) - -(use-package nerd-icons - :ensure t) - -(use-package nerd-icons-completion - :ensure t - :hook (marginalia-mode . nerd-icons-completion-marginalia-setup)) - -(use-package nerd-icons-corfu - :ensure t - :after corfu - :config - (add-to-list 'corfu-margin-formatters #'nerd-icons-corfu-formatter)) - -(use-package nerd-icons-dired - :ensure t - :hook - (dired-mode . nerd-icons-dired-mode)) - (provide 'bard-emacs-ui) ;;; bard-emacs-ui.el ends here diff --git a/bard-emacs-modules/bard-emacs-web.el b/bard-emacs-modules/bard-emacs-web.el index 4c31490..d9a8e26 100644 --- a/bard-emacs-modules/bard-emacs-web.el +++ b/bard-emacs-modules/bard-emacs-web.el @@ -27,7 +27,7 @@ (use-package elfeed :ensure t :config - (global-set-key (kbd "C-c e") 'elfeed) + (global-set-key (kbd "C-c r") 'elfeed) (setq elfeed-search-filter "+unread -academia")) (use-package elfeed-org @@ -48,10 +48,8 @@ ;;; Web Browsing (EWW and Firefox/Librewolf) (use-package eww + :defer t :config - (setq browse-url-browser-function 'eww-browse-url) - (setq browse-url-secondary-browser-function 'browse-url-default-browser) - (setq browse-url-handlers '(("wikipedia\\.org" . eww-browse-url) ;; ("github" . browse-url-chromium) diff --git a/bard-emacs-modules/bard-emacs-window.el b/bard-emacs-modules/bard-emacs-window.el index 16c386f..a358517 100644 --- a/bard-emacs-modules/bard-emacs-window.el +++ b/bard-emacs-modules/bard-emacs-window.el @@ -30,21 +30,6 @@ ("M-8" . eyebrowse-switch-to-window-config-8) ("M-9" . eyebrowse-switch-to-window-config-9))) -(use-package bufferbin - :ensure t - :bind - (("C-c b" . bufferbin)) - :config - (add-to-list 'bufferbin-ignore-regex "^*") - (dolist (fonts '((org-mode . prot-modeline-indicator-yellow-bg) - (emacs-lisp-mode . prot-modeline-indicator-magenta-bg) - (lisp-mode . prot-modeline-indicator-magenta-bg) - (scheme-mode . prot-modeline-indicator-magenta-bg) - (haskell-mode . prot-modeline-indicator-magenta-bg) - (c-mode . prot-modeline-indicator-magenta-bg) - (c++-mode . prot-modeline-indicator-magenta-bg))) - (add-to-list 'bufferbin-mode-fonts fonts))) - (use-package windmove :bind* (("C-M-<up>" . windmove-up) diff --git a/bard-emacs-modules/bard-emacs-writing.el b/bard-emacs-modules/bard-emacs-writing.el index 3bdec91..8d84c15 100644 --- a/bard-emacs-modules/bard-emacs-writing.el +++ b/bard-emacs-modules/bard-emacs-writing.el @@ -121,11 +121,6 @@ ("C-c n l" . denote-find-link) ("C-c n L" . denote-find-backlink))) -(use-package markdown-mode - :ensure t - :mode ("README\\.md\\'" . gfm-mode) - :init (setq markdown-command "multimarkdown")) - ;;; Focus mode for writing ;; Center line scrolling for focused writing @@ -206,8 +201,4 @@ :config (pdf-tools-install)) -(use-package nov - :ensure t - ) - (provide 'bard-emacs-writing) |
