diff options
author | bd <bdunahu@operationnull.com> | 2024-11-29 18:15:04 -0500 |
---|---|---|
committer | bd <bdunahu@operationnull.com> | 2024-11-29 18:15:04 -0500 |
commit | 20cc1168f72c2e736b64671d38350048f0b1edce (patch) | |
tree | 92a09f16d74c2f87ef7d621b2f1744241c99d99b /.config/emacs | |
parent | 6ab62f8037ce1136a4d7c654199b5d40095205ed (diff) |
ef-themes -> modus-themes
Diffstat (limited to '.config/emacs')
-rw-r--r-- | .config/emacs/init.el | 1 | ||||
-rw-r--r-- | .config/emacs/libraries/fill-column.el | 4 | ||||
-rw-r--r-- | .config/emacs/modules/bd--browse.el | 2 | ||||
-rw-r--r-- | .config/emacs/modules/bd--devel.el | 13 | ||||
-rw-r--r-- | .config/emacs/modules/bd--files.el | 11 | ||||
-rw-r--r-- | .config/emacs/modules/bd--irc.el | 2 | ||||
-rw-r--r-- | .config/emacs/modules/bd--modeline.el | 16 | ||||
-rw-r--r-- | .config/emacs/modules/bd--shells.el | 5 | ||||
-rw-r--r-- | .config/emacs/modules/bd--themes.el | 52 |
9 files changed, 43 insertions, 63 deletions
diff --git a/.config/emacs/init.el b/.config/emacs/init.el index ed8b8d1..e29e63b 100644 --- a/.config/emacs/init.el +++ b/.config/emacs/init.el @@ -37,6 +37,7 @@ kill-whole-line t kill-ring-max 1000 + undo-limit 320000 sentence-end-double-space nil next-line-add-newlines t diff --git a/.config/emacs/libraries/fill-column.el b/.config/emacs/libraries/fill-column.el index 625e685..2a70cd6 100644 --- a/.config/emacs/libraries/fill-column.el +++ b/.config/emacs/libraries/fill-column.el @@ -1,12 +1,12 @@ ;;; -*- lexical-binding: t; -*- ;;; Commentary: -;; modified version of https://codeberg.org/daviwil/dotfiles/src/branch/master/emacs +;; yanked from https://codeberg.org/daviwil/dotfiles/src/branch/master/emacs ;;; Code: -(defvar-local fill-column-desired-width 120 +(defvar fill-column-desired-width 120 "The desired width of a document centered in the window.") (defun fill-column--adjust-margins () diff --git a/.config/emacs/modules/bd--browse.el b/.config/emacs/modules/bd--browse.el index 5894b87..28db1f6 100644 --- a/.config/emacs/modules/bd--browse.el +++ b/.config/emacs/modules/bd--browse.el @@ -69,7 +69,7 @@ icecat, or eww." (use-package eww :hook ((eww-after-render . (lambda () - (setopt fill-column-desired-width 90) + (setq-local fill-column-desired-width 90) (fill-column-mode)))) :custom (eww-search-prefix "https://duckduckgo.com/html/?q=") diff --git a/.config/emacs/modules/bd--devel.el b/.config/emacs/modules/bd--devel.el index 4238358..d112bca 100644 --- a/.config/emacs/modules/bd--devel.el +++ b/.config/emacs/modules/bd--devel.el @@ -44,18 +44,7 @@ to.") (use-package hl-line :hook ((prog-mode . hl-line-mode) - (text-mode . hl-line-mode)) - :config - (defun bd/face-ignore-hl (f &rest args) - "Wrapper around face-at-point, returning -the face under the hl-line-mode." - (if hl-line-mode - (progn - (hl-line-mode -1) - (prog1 (apply f args) - (hl-line-mode 1))) - (apply f args))) - (advice-add #'face-at-point :around #'bd/face-ignore-hl)) + (text-mode . hl-line-mode))) (use-package compile :demand t diff --git a/.config/emacs/modules/bd--files.el b/.config/emacs/modules/bd--files.el index 3d3d7b7..6a44d88 100644 --- a/.config/emacs/modules/bd--files.el +++ b/.config/emacs/modules/bd--files.el @@ -32,23 +32,23 @@ (defun bd/external-find-file-wrapper (f &rest args) "Wrapper around F (find-file), passing ARGS." - (defun runner (f) + (defun bd/open-with-function (f) (funcall f (car args)) (recentf-add-file (car args))) (let ((ext (or (file-name-extension (car args)) ""))) (cond ((string-match (regexp-opt '("epub" "pdf")) ext) - (runner #'bd/zathura)) + (bd/open-with-function #'bd/zathura)) ((string-match (regexp-opt '("mkv" "mov" "mp4" "webm" "m4v" "wav" "mp3" "opus" "ogv" "flac" "m4a")) ext) - (runner #'bd/mpv)) + (bd/open-with-function #'bd/mpv)) ((string-match (regexp-opt '("jpg" "jpeg" "png" "webp" "ico" "gif" "JPG" "PNG")) ext) - (runner #'bd/nsxiv)) + (bd/open-with-function #'bd/nsxiv)) ((string-match (regexp-opt '("gba" "z64" "n64" "sfc")) ext) - (runner #'bd/rom)) + (bd/open-with-function #'bd/rom)) (t (apply f args))))) (advice-add #'find-file :around #'bd/external-find-file-wrapper) @@ -66,6 +66,7 @@ (,(regexp-opt '(".html")) "icecat &")))) (use-package transmission + :defer t :bind (:map transmission-mode-map ("R" . #'transmission-move))) diff --git a/.config/emacs/modules/bd--irc.el b/.config/emacs/modules/bd--irc.el index 004314a..dc31a49 100644 --- a/.config/emacs/modules/bd--irc.el +++ b/.config/emacs/modules/bd--irc.el @@ -8,7 +8,7 @@ :defer t :hook ((rcirc-mode . (lambda () - (setopt fill-column-desired-width 80) + (setq-local fill-column-desired-width 80) (fill-column-mode) (rcirc-omit-mode)))) :custom diff --git a/.config/emacs/modules/bd--modeline.el b/.config/emacs/modules/bd--modeline.el index 0b142d6..382944e 100644 --- a/.config/emacs/modules/bd--modeline.el +++ b/.config/emacs/modules/bd--modeline.el @@ -28,20 +28,6 @@ '(:eval (format "%s " (propertize (buffer-name) 'face 'bd/underline-shadow))) "Formats the modeline-buffer-name.") -(defvar-local bd/modeline-buffer-file-state-icon - '(:eval - (cond (buffer-read-only - (propertize " L " 'face `(:foreground ,(ef-themes-get-color-value 'warning)))) - ((and buffer-file-name (buffer-modified-p)) - (propertize " S " 'face `(:foreground ,(ef-themes-get-color-value 'warning)))) - ((and buffer-file-name - ;; Avoid freezing while connection is lost - (not (file-remote-p buffer-file-name)) - (not (file-exists-p buffer-file-name))) - (propertize " ? " 'face `(:foreground ,(ef-themes-get-color-value 'err)))) - (t ""))) - "Formats the file modification status.") - ;;;; pos (column-number-mode) (setopt mode-line-position-column-line-format '(" %l:%c ")) @@ -74,7 +60,7 @@ mode-line-front-space bd/buffer-identification-mode-line mode-line-modes - bd/modeline-buffer-file-state-icon + mode-line-modified bd/vc-mode-line bd/line-position)) diff --git a/.config/emacs/modules/bd--shells.el b/.config/emacs/modules/bd--shells.el index 56fcf81..05b0b91 100644 --- a/.config/emacs/modules/bd--shells.el +++ b/.config/emacs/modules/bd--shells.el @@ -16,12 +16,11 @@ :custom (eshell-banner-message (concat "\n" (propertize " " 'display (create-image (expand-file-name "images/raven.png" user-emacs-directory) 'png nil :scale 0.8 :align-to "center")) "\n"))) -(require 'ef-themes) (use-package em-prompt :hook - ((ef-themes-post-load + ((modus-themes-post-load . (lambda () - (ef-themes-with-colors + (modus-themes-with-colors (set-face-attribute 'eshell-prompt nil :foreground fg-main :background bg-alt diff --git a/.config/emacs/modules/bd--themes.el b/.config/emacs/modules/bd--themes.el index cddcbe9..50bf1ad 100644 --- a/.config/emacs/modules/bd--themes.el +++ b/.config/emacs/modules/bd--themes.el @@ -31,37 +31,41 @@ to.") ;;;; colors -(use-package ef-themes +(use-package modus-themes + :load-path (lambda () (expand-file-name "themes/" data-directory)) :demand t :config ;; Disable all other themes to avoid awkward blending: (mapc #'disable-theme custom-enabled-themes) :custom - (ef-themes-mixed-fonts t) - (ef-themes-variable-pitch-ui nil) - (ef-themes-headings - '((0 variable-pitch bold 1.5) - (1 variable-pitch bold 1.4) - (2 variable-pitch regular 1.3) - (3 variable-pitch regular 1.1) - (t variable-pitch regular 1.0))) + (modus-themes-mixed-fonts t) + (modus-themes-italic-constructs t) + (modus-themes-tabs-accented nil) + (modus-themes-bold-constructs t) + (modus-themes-subtle-line-numbers t) + (modus-themes-variable-pitch-ui nil) + (modus-themes-mode-line '(borderless accented)) + (modus-themes-org-blocks 'grayscale) + (modus-themes-markup '(background intense)) + (modus-themes-region '(bg-only)) + (modus-themes-headings + '((0 rainbow variable-pitch bold 1.5) + (1 rainbow variable-pitch bold 1.4) + (2 rainbow variable-pitch regular 1.3) + (3 rainbow variable-pitch regular 1.1) + (t rainbow variable-pitch regular 1.0))) - (ef-themes-to-toggle '(ef-autumn ef-frost)) - (ef-themes-common-palette-overrides - '((bg-dim bg-main) - (bg-alt bg-inactive) - (bg-tab-bar bg-main) - (bg-tab-current bg-mode-line) - (bg-tab-other bg-inactive))) - (ef-bio-palette-overrides - '((bg-main "#000000"))) - (ef-tritanopia-dark-palette-overrides - '((bg-main "#000000"))) - (ef-autumn-palette-overrides - '((bg-main "#000000")))) + (modus-themes-vivendi-color-overrides + (mapcar (lambda (x) + (cons (car x) (alist-get (cdr x) modus-themes-vivendi-colors))) + '((bg-dim . bg-main) + (bg-alt . bg-inactive) + (bg-tab-bar . bg-main) + (bg-tab-current . bg-active) + (bg-tab-other . bg-inactive))))) -(load-theme 'ef-winter :no-confirm) -(run-hooks 'ef-themes-post-load-hook) +(load-theme 'modus-vivendi :no-confirm) +(run-hooks 'modus-themes-post-load-hook) (provide 'bd--themes) |