i'm doing a terrible job

This commit is contained in:
Case Duckworth 2022-05-25 22:07:33 -05:00
parent dd3afe747e
commit 3da59fb2f6
5 changed files with 56 additions and 41 deletions

65
init.el
View File

@ -51,7 +51,8 @@
"C-w" #'+kill-word-backward-or-region
"C-x C-m" #'execute-extended-command ; original: coding systems
"C-<backspace>" #'+backward-kill-word
"C-x TAB" #'+indent-rigidly)
"C-x TAB" #'+indent-rigidly
"C-x C-c" nil)
;; C-h deletes backward - see https://idiomdrottning.org/bad-emacs-defaults
(global-set-key (kbd "C-h") 'delete-backward-char)
(keyboard-translate ?\C-h ?\C-?)
@ -592,7 +593,7 @@
(cons " --- " frame-title-format))
org-clock-string-limit 7 ; just the clock bit
;; org-clock-string-limit 25 ; gives enough information
org-clock-persist t
org-clock-persist nil
org-confirm-babel-evaluate nil
org-cycle-separator-lines 0
org-directory (sync/ "org/" t)
@ -857,7 +858,7 @@
(setup scratch
(:require +scratch)
(:option initial-major-mode #'lisp-interaction-mode
initial-scratch-message (+scratch-fortune))
initial-scratch-message ";;; What good will you work in the world today?\n\n")
(:+leader "." #'+scratch-switch-to-scratch
"C-." #'+scratch-switch-to-scratch
"," #'+scratch-switch-to-text
@ -912,7 +913,8 @@
+tab-bar-tracking-mode
+tab-bar-notmuch-count
+tab-bar-timer
+tab-bar-date))
+tab-bar-date
+tab-bar-space))
(tab-bar-mode +1)
(display-time-mode +1))
@ -936,6 +938,8 @@
(setup whitespace
(:option whitespace-line-column nil
whitespace-style '(face trailing tabs tab-mark))
;; I want trailing whitespace to be cleaned up, but I don't need to know about it.
(:face 'whitespace-trailing '((t :inherit nil)))
(:hook-into text-mode prog-mode))
(setup (:straight 0x0)
@ -1003,9 +1007,8 @@
(:+key "M-j" #'avy-goto-char-timer)
(:bind-into isearch
"M-j" #'avy-isearch)
(:when-loaded
(setf (alist-get ?. avy-dispatch-alist) #'avy-action-embark)
(+avy-buffer-face-mode +1)))
(setf (alist-get ?. avy-dispatch-alist) #'avy-action-embark)
(+avy-buffer-face-mode +1))
(setup (:straight bbdb)
(:straight bbdb-vcard)
@ -1248,7 +1251,7 @@
#'enable-lui-track
#'visual-fill-column-mode
#'enable-lui-autopaste
)
(defun turn-off-electric-pair-mode () (electric-pair-mode -1)))
(:local-set fringes-outside-margins t
right-margin-width (length lui-time-stamp-format)
scroll-margin 0
@ -1303,7 +1306,8 @@
xref-show-xrefs-function #'consult-xref
xref-show-definitions-function #'consult-xref
tab-always-indent 'complete
completion-in-region-function #'consult-completion-in-region)
;; completion-in-region-function #'consult-completion-in-region
)
(advice-add #'register-preview :override #'consult-register-window)
(dolist (binding '(;; C-c bindings (mode-specific-map)
("C-c h" . consult-history)
@ -1412,10 +1416,8 @@
(setf (alist-get 'consult-notmuch vertico-multiform-commands) nil
(alist-get 'consult-notmuch-tree vertico-multiform-commands) nil)))
(setup (:straight corfu
:quit "Turns out, I actually like minibuffer completion better.")
(+with-ensure-after-init
(corfu-global-mode +1)))
(setup (:straight corfu)
(corfu-global-mode +1))
(setup (:straight crossword)
;; This isn't the perfect Emacs crossword puzzle, but it's the only one I
@ -2050,10 +2052,6 @@
(defun +modus-themes-mostly-monochrome ()
"Set up mdous-themes to be mostly monochrome."
;; Major mode in the mode-line
(defface +modeline-text-mode-face nil
"Text-mode major mode face.")
(defface +modeline-prog-mode-face nil
"Prog-mode major mode face.")
(modus-themes-with-colors
(custom-set-faces
`(font-lock-builtin-face
@ -2063,7 +2061,8 @@
((,class :inherit variable-pitch
:foreground ,fg-comment-yellow)))
`(font-lock-comment-delimiter-face
((,class :inherit font-lock-comment-face)))
((,class :inherit fixed-pitch
:foreground ,fg-comment-yellow)))
`(font-lock-constant-face
((,class :inherit underline
:foreground unspecified)))
@ -2099,16 +2098,12 @@
((,class :inherit font-lock-comment-face
:foreground ,fg-header
:background ,yellow-intense-bg)))
`(+modeline-text-mode-face
((,class :foreground ,blue
:inherit modus-themes-bold)))
`(+modeline-prog-mode-face
((,class :foreground ,magenta
:inherit modus-themes-bold))))
(:option +modeline-major-mode-faces
`((text-mode . +modeline-text-mode-face)
(prog-mode . +modeline-prog-mode-face)
(t . bold))))))
`(mode-line
((,class :height 100)))
`(mode-line-inactive
((,class :height 100)))
`(tab-bar
((,class :height 100)))))))
(require 'dawn)
(dawn-schedule #'modus-themes-load-operandi
@ -2344,16 +2339,17 @@
+modeline-ace-window-display
+modeline-modified
+modeline-buffer-name
+modeline-major-mode
(lambda () (+modeline-vc " : "))
+modeline-anzu
)
( ; right
simple-modeline-segment-process
(lambda ()
(unless +tab-bar-misc-info-mode
(+modeline-concat
'(+modeline-track
simple-modeline-segment-misc-info))))
+modeline-position
simple-modeline-segment-process
,(+modeline-concat
'(+modeline-god-mode
@ -2363,8 +2359,9 @@
+modeline-text-scale
+modeline-input-method)
" ")
+modeline-major-mode
+modeline-spacer)))
+modeline-position
;; +modeline-spacer
)))
(simple-modeline-mode +1))
(setup (:straight slack)
@ -2409,7 +2406,6 @@
#'describe-gnu-project
#'suspend-frame)
(sophomore-disable-with 'confirm
#'+save-buffers-quit
#'save-buffers-kill-terminal)
(sophomore-mode +1))
@ -2484,6 +2480,11 @@
trashed-use-header-line t
trashed-size-format 'human-readable))
(setup (:straight (twtxt
:fork (:repo "duckwork/twtxt-el")))
(:option twtxt-file "/sshx:hetzner:/var/www/acdw.casa/tw.txt"
twtxt-following '(("acdw" "https://acdw.casa/tw.txt"))))
(setup (:straight undo-fu)
(:option undo-fu-allow-undo-in-region t)
(:global "C-/" #'undo-fu-only-undo

View File

@ -62,7 +62,7 @@
(setq buffer-face-mode-face +avy-buffer-face-mode-face)
(buffer-face-mode +1)))
(define-minor-mode +avy-buffer-face-local-mode
(define-minor-mode +avy-buffer-face-mode
"Turn off `buffer-face-mode' before doing Avy selections.
Restore the mode after the selection."
:lighter ""

View File

@ -138,6 +138,9 @@ in the cdr will be applied to the major-mode in the mode line."
:type '(alist :key-type function
:value-type face))
(defface +modeline-major-mode-face nil
"Face for modeline major-mode.")
(defun +modeline-major-mode (&optional spacer)
"Display the current `major-mode'."
(+modeline-spacer nil spacer
@ -149,10 +152,11 @@ in the cdr will be applied to the major-mode in the mode line."
;; simply detect which mode it's in when I change major
;; modes (`change-major-mode-hook') and change the face
;; there, probably.
(catch :done (dolist (cel +modeline-major-mode-faces)
(when (derived-mode-p (car cel))
(throw :done (cdr cel))))
(alist-get t +modeline-major-mode-faces)))
;; (catch :done (dolist (cel +modeline-major-mode-faces)
;; (when (derived-mode-p (car cel))
;; (throw :done (cdr cel))))
;; (alist-get t +modeline-major-mode-faces))
'+modeline-major-mode-face)
'keymap (let ((map (make-sparse-keymap)))
(bindings--define-key map [mode-line down-mouse-1]
`(menu-item "Menu Bar" ignore

View File

@ -17,6 +17,10 @@
;; Common
(defun +tab-bar-space (&optional n)
"Display a space N characters long, or 1."
`((space menu-item ,(+string-repeat (or n 1) " ") ignore)))
(defun +tab-bar-misc-info ()
"Display `mode-line-misc-info', formatted for the tab-bar."
`((misc-info menu-item ,(string-trim-right
@ -66,7 +70,7 @@
"Display `display-time-string' in the tab-bar."
(when display-time-mode
`((date-time-string menu-item
,(propertize (concat " " display-time-string))
,(substring-no-properties (concat " " (string-trim display-time-string)))
(lambda (ev)
(interactive "e")
(popup-menu
@ -257,8 +261,14 @@ name to the left."
(require 'shr) ; `shr-string-pixel-width'
(let* ((rest (cdr (memq '+tab-bar-format-align-right tab-bar-format)))
(rest (tab-bar-format-list rest))
(rest (mapconcat (lambda (item) (nth 2 item)) rest ""))
(hpos (shr-string-pixel-width rest))
(rest (mapconcat (lambda (item) x(nth 2 item)) rest ""))
(hpos
;; I have to rewrite `shr-string-pixel-width' to take the tab-bar face
;; into account.
(let ((pt (point)))
(prog1 (with-temp-buffer (insert (propertize rest 'face 'tab-bar))
(shr-pixel-column))
(goto-char pt))))
(str (propertize " " 'display `(space :align-to (- right (,hpos))))))
`((align-right menu-item ,str ignore))))

View File

@ -9,7 +9,7 @@
(defun +bob-set-faces (&rest _)
(let ((base-face "IBM Plex Mono")
(base-size 105)
(base-size 110)
(italic-face nil)
;; (bold-face nil)
(mono-face nil)