diff --git a/init.el b/init.el index 5f2209f..53e24cd 100644 --- a/init.el +++ b/init.el @@ -12,13 +12,13 @@ (setq load-prefer-newer t) ; why ever use stale code, ever? ;; Load the files that I put my settings in... -(defvar mitch-directory +(defvar mir-directory (directory-file-name (concat user-emacs-directory (convert-standard-filename "lisp/")))) -(add-to-list 'load-path mitch-directory t) +(add-to-list 'load-path mir-directory t) -(require 'mitch-defuns) +(require 'mir-defuns) ;; minify yes/no prompts (if (>= (string-to-number emacs-version) 28) @@ -26,8 +26,8 @@ (defalias 'yes-or-no-p 'y-or-n-p)) ;; do the things -(add-hook 'server-after-make-frame-hook #'mitch/graphical-setup) -(if (display-graphic-p) (mitch/graphical-setup)) +(add-hook 'server-after-make-frame-hook #'mir/graphical-setup) +(if (display-graphic-p) (mir/graphical-setup)) ;; Control backups/swapfiles (defvar backup-directory @@ -83,7 +83,7 @@ (setq elpaca-use-package-by-default t)) (elpaca-wait) -(require 'mitch-packages) +(require 'mir-packages) ;; Absolute line numbers. Relative ones are an annoyance to set up, sadly. ;; (global-display-line-numbers-mode) diff --git a/lisp/mitch-defuns.el b/lisp/mir-defuns.el similarity index 90% rename from lisp/mitch-defuns.el rename to lisp/mir-defuns.el index b99667d..d4bbddb 100644 --- a/lisp/mitch-defuns.el +++ b/lisp/mir-defuns.el @@ -1,4 +1,4 @@ -;;; mitch-defuns.el --- custom-defined functions +;;; mir-defuns.el --- custom-defined functions ;;; Commentary: ;; _ _ _ ;; _ __ ___ (_)| |_ ___ | |__ @@ -14,7 +14,7 @@ ;; Some functions to run when loading packages... ;;; Code: -(defun mitch/evil-config () +(defun mir/evil-config () "A batch of commands to run as the :config of evil's `use-package'. Made solely to reduce lines in the init-file." ;; Visual moving @@ -29,11 +29,11 @@ Made solely to reduce lines in the init-file." (evil-next-line) (scroll-up-line)) ;; Search showing - (defun mitch/search-and-rebalance (&optional &rest flush) + (defun mir/search-and-rebalance (&optional &rest flush) (evil-scroll-line-to-center (car flush))) - (advice-add 'evil-search-next :filter-return #'mitch/search-and-rebalance) - (add-hook 'isearch-mode-end-hook #'mitch/search-and-rebalance)) -(defun mitch/visual-setup () + (advice-add 'evil-search-next :filter-return #'mir/search-and-rebalance) + (add-hook 'isearch-mode-end-hook #'mir/search-and-rebalance)) +(defun mir/visual-setup () "Commands to run when setting up any display. To be called in use-package declarations for color schemes." (tooltip-mode -1) @@ -56,7 +56,7 @@ declarations for color schemes." (let ((display-table (or standard-display-table (make-display-table)))) (set-display-table-slot display-table 'vertical-border (make-glyph-code ?│)) (setq standard-display-table display-table))) -(defun mitch/graphical-setup () +(defun mir/graphical-setup () "Commands to run at the beginning of init when on a graphical display. This prevents errors in termux and speeds up init when editing from the console." @@ -91,10 +91,10 @@ console." (setq current-input-method 'japanese-ascii) (setq current-input-method 'japanese))) -(defun mitch/general-config () +(defun mir/general-config () "A batch of commands to run immediately after loading the `general' package. Made solely to reduce lines in the init file." - (require 'mitch-keybinds)) + (require 'mir-keybinds)) (defun turn-off-line-numbers () "A tiny wrapper around `display-line-numbers-mode' or `linum'. @@ -111,7 +111,7 @@ For use in hooks." (if (fboundp #'nlinum-relative-mode) (nlinum-relative-mode -1))) -(defun mitch/terminal-setup () +(defun mir/terminal-setup () "A batch of commands to run when opening anything that looks like a terminal. For instance: - Shell @@ -135,6 +135,6 @@ For use with `vterm'." (shell (current-buffer))) ;; This one line cost me over an hour of frustration... -(provide 'mitch-defuns) +(provide 'mir-defuns) -;;; mitch-defuns.el ends here +;;; mir-defuns.el ends here diff --git a/lisp/mitch-evil.el b/lisp/mir-evil.el similarity index 91% rename from lisp/mitch-evil.el rename to lisp/mir-evil.el index d98b630..10a7962 100644 --- a/lisp/mitch-evil.el +++ b/lisp/mir-evil.el @@ -1,8 +1,8 @@ -;;; mitch-evil.el --- personal settings for evil-mode -*- lexical-binding: t; -*- +;;; mir-evil.el --- personal settings for evil-mode -*- lexical-binding: t; -*- -;; Copyright (C) 2023 mitch +;; Copyright (C) 2023 mir -;; Author: mitch +;; Author: mir ;; Keywords: ;; This program is free software; you can redistribute it and/or modify @@ -54,7 +54,7 @@ (quote undo-redo) (quote undo-fu))) :init (evil-mode t) - :config (mitch/evil-config)) + :config (mir/evil-config)) (use-package evil-collection :after evil :diminish evil-collection-unimpaired-mode @@ -96,5 +96,5 @@ ((t (:background "#303030" :foreground "#2233aa"))))) -(provide 'mitch-evil) -;;; mitch-evil.el ends here +(provide 'mir-evil) +;;; mir-evil.el ends here diff --git a/lisp/mitch-keybinds.el b/lisp/mir-keybinds.el similarity index 91% rename from lisp/mitch-keybinds.el rename to lisp/mir-keybinds.el index a95dcb1..1b429e6 100644 --- a/lisp/mitch-keybinds.el +++ b/lisp/mir-keybinds.el @@ -1,4 +1,4 @@ -;;; mitch-keybinds.el --- do keybinding things, mostly with General... +;;; mir-keybinds.el --- do keybinding things, mostly with General... ;;; Commentary: ;; ----------------------------------------------------------------------------- @@ -44,5 +44,5 @@ "r" (general-key "C-c C-v r") "s" 'eshell) -(provide 'mitch-keybinds) -;;; mitch-keybinds.el ends here +(provide 'mir-keybinds) +;;; mir-keybinds.el ends here diff --git a/lisp/mitch-meow.el b/lisp/mir-meow.el similarity index 91% rename from lisp/mitch-meow.el rename to lisp/mir-meow.el index 15fb69f..e6c3d15 100644 --- a/lisp/mitch-meow.el +++ b/lisp/mir-meow.el @@ -1,8 +1,8 @@ -;;; mitch-meow.el --- my meow settings -*- lexical-binding: t; -*- +;;; mir-meow.el --- my meow settings -*- lexical-binding: t; -*- -;; Copyright (C) 2023 mitch +;; Copyright (C) 2023 mir -;; Author: mitch +;; Author: mir ;; Keywords: ;; This program is free software; you can redistribute it and/or modify @@ -20,7 +20,7 @@ ;;; Commentary: -;; Extracted from ./mitch-packages.el because maintaining separate git branches +;; Extracted from ./mir-packages.el because maintaining separate git branches ;; is too hard. ;;; Code: @@ -52,7 +52,7 @@ (meow-motion-overwrite-define-key '("j" . meow-next) '("k" . meow-prev) - ;; '("ESC" . mitch/meow-esc-dwim) + ;; '("ESC" . mir/meow-esc-dwim) ) (meow-leader-define-key ;; SPC j/k will run the original command in MOTION state. @@ -74,10 +74,10 @@ '("g" . magit)) ;; (meow-define-keys ;; 'insert -;; '("ESC" . mitch/meow-esc-dwim)) +;; '("ESC" . mir/meow-esc-dwim)) ;; (meow-define-keys ;; 'beacon -;; '("ESC" . mitch/meow-esc-dwim)) +;; '("ESC" . mir/meow-esc-dwim)) (meow-normal-define-key '("0" . meow-expand-0) '("9" . meow-expand-9) @@ -139,9 +139,9 @@ '("Y" . meow-sync-grab) '("z" . meow-pop-selection) '("'" . repeat) - ;; '("ESC" . mitch/meow-esc-dwim) + ;; '("ESC" . mir/meow-esc-dwim) )) - (defun mitch/meow-esc-dwim () + (defun mir/meow-esc-dwim () "Escape the current search, action, or state. つまり、 @@ -172,5 +172,5 @@ (add-hook 'meow-keypad-mode-hook (lambda () (setq-local evil-state 'keypad))) ) -(provide 'mitch-meow) -;;; mitch-meow.el ends here +(provide 'mir-meow) +;;; mir-meow.el ends here diff --git a/lisp/mitch-orgstuff.el b/lisp/mir-orgstuff.el similarity index 93% rename from lisp/mitch-orgstuff.el rename to lisp/mir-orgstuff.el index 0485c7a..676981a 100644 --- a/lisp/mitch-orgstuff.el +++ b/lisp/mir-orgstuff.el @@ -1,4 +1,4 @@ -;;; mitch-orgstuff.el --- Hacking on top of Org mode. +;;; mir-orgstuff.el --- Hacking on top of Org mode. ;;; Commentary: @@ -64,18 +64,18 @@ :keymaps 'local :states 'normal "DEL" 'org-vw-back) - (dolist (key mitch/org-dwim-char-chars) + (dolist (key mir/org-dwim-char-chars) (general-define-key :keymaps 'local - key 'mitch/org-dwim-char)) + key 'mir/org-dwim-char)) ) ;; (add-to-list 'auto-mode-alist `(,org-wiki-regex . org-vw-mode)) (add-hook 'org-mode-hook #'org-vw-mode) ;; ------------------ ABANDON ALL SANITY, YE WHO ENTER HERE -------------------- -(defvar mitch/org-dwim-char-chars '("_" "/" "*" "+" "~" "=")) -(defun mitch/org-dwim-char (&optional char) +(defvar mir/org-dwim-char-chars '("_" "/" "*" "+" "~" "=")) +(defun mir/org-dwim-char (&optional char) "If a region is active (visual mode), surround selection with CHAR. If in a word, surround it with CHAR (like `evil-surround') or, if word is @@ -141,14 +141,14 @@ Otherwise, insert two of CHAR and put point between them like `electric-pair'." (insert (make-string 2 char)) (left-char)))))) (defun org-vw-snapshot-bindings () - "Make an alist of the functions formerly ran by keys to be bound to `mitch/org-dwim-char'. + "Make an alist of the functions formerly ran by keys to be bound to `mir/org-dwim-char'. Store it in the variable `org-vw-old-binds-alist'." (unless org-vw-old-binds-alist (defvar-local org-vw-old-binds-alist (mapcar (lambda (key) (cons key (key-binding key))) - mitch/org-dwim-char-chars)))) + mir/org-dwim-char-chars)))) (add-hook 'org-vw-pre-hook #'org-vw-snapshot-bindings nil 'local) ;; (defun org-vw-backspace) @@ -156,5 +156,5 @@ Store it in the variable `org-vw-old-binds-alist'." ;; (setq debug-on-error t) ;; --------- LET THY BRAIN NO LONGER TREMBLE, FOR I AM BECOME COMPLETE --------- -(provide 'mitch-orgstuff) -;;; mitch-orgstuff.el ends here +(provide 'mir-orgstuff) +;;; mir-orgstuff.el ends here diff --git a/lisp/mitch-packages.el b/lisp/mir-packages.el similarity index 95% rename from lisp/mitch-packages.el rename to lisp/mir-packages.el index 17b90a5..95cffa6 100644 --- a/lisp/mitch-packages.el +++ b/lisp/mir-packages.el @@ -1,4 +1,4 @@ -;;; mitch-packages --- Declare and configure use-package statements +;;; mir-packages --- Declare and configure use-package statements ;;; Commentary: ;; ----------------------------------------------------------------------------- @@ -103,7 +103,7 @@ (use-package general :demand t :custom (default-input-method "japanese") - :config (mitch/general-config)) + :config (mir/general-config)) (use-package gcmh :diminish @@ -138,8 +138,8 @@ ;; (use-package use-package-ensure-system-package) ;; load evil or meow -(require 'mitch-evil) -;; (require 'mitch-meow) +(require 'mir-evil) +;; (require 'mir-meow) (use-package undo-fu :after evil @@ -229,7 +229,7 @@ (interactive "p") (eshell-bol) (evil-insert count vcount)) - (defun mitch/edit-file-or-lib (name) + (defun mir/edit-file-or-lib (name) "Edit library called NAME if it exists, otherwise edit FILE. If the current window occupies the whole frame, split it." @@ -265,16 +265,16 @@ If the current window occupies the whole frame, split it." ("fs" "fullscreen" nil full-screen "Open in full screen") :external "emacs" :usage "[FILE] etc placeholder text...") - (mapcar #'mitch/edit-file-or-lib + (mapcar #'mir/edit-file-or-lib (eshell-stringify-list (flatten-tree (reverse args)))))) - (defun mitch/eshell-setup-keys () + (defun mir/eshell-setup-keys () (evil-collection-define-key 'normal 'eshell-mode-map (kbd "I") 'eshell-evil-insert-line (kbd "RET") 'hkey-either)) (advice-add 'evil-collection-eshell-setup-keys - :after 'mitch/eshell-setup-keys)) + :after 'mir/eshell-setup-keys)) ;; show command that caused last scrollback in eshell etc (use-package sticky-shell :elpaca (sticky-shell @@ -288,18 +288,18 @@ If the current window occupies the whole frame, split it." (defun esh--turn-on-sticky-shell () "Enable `sticky-shell-mode'." (sticky-shell-mode 1)) - (defun mitch/sticky-shell-refresh () + (defun mir/sticky-shell-refresh () "Only turn on sticky-shell if the prompt is at the bottom line of window." (if (>= (line-number-at-pos (point)) (window-height)) (esh--turn-on-sticky-shell) (esh--turn-off-sticky-shell))) - (add-hook 'eshell-post-command-hook #'mitch/sticky-shell-refresh) + (add-hook 'eshell-post-command-hook #'mir/sticky-shell-refresh) ;; https://emacs.ch/@bram85/109612654687707030 - (defun mitch/esh-outline-setup () + (defun mir/esh-outline-setup () (outline-minor-mode) (diminish 'outline-minor-mode) (setq-local outline-regexp eshell-prompt-regexp)) - (add-hook 'eshell-mode-hook #'mitch/esh-outline-setup)) + (add-hook 'eshell-mode-hook #'mir/esh-outline-setup)) (use-package exec-path-from-shell :hook (eshell-mode . exec-path-from-shell-initialize)) @@ -325,7 +325,7 @@ If the current window occupies the whole frame, split it." :hook (eshell-mode . eshell-syntax-highlighting-mode)) (use-package eshell-dat :elpaca (eshell-dat - :repo "https://git.mitchmarq42.xyz/mir/eshell-dat") + :repo "https://git.mirmarq42.xyz/mir/eshell-dat") :after eshell) (use-package ansilove :elpaca (:host gitlab @@ -341,7 +341,7 @@ If the current window occupies the whole frame, split it." ;; system-architecture)) ;; (add-hook 'eshell-before-prompt-hook #'gitstatus-eshell-start)) (use-package p11k - :elpaca (:repo "https://git.mitchmarq42.xyz/mir/p11k") + :elpaca (:repo "https://git.mirmarq42.xyz/mir/p11k") :after eshell :hook (eshell-first-time-mode . p11k-mode)) @@ -501,7 +501,7 @@ targets." (nlinum-relative-redisplay-delay 0) :hook (prog-mode . nlinum-relative-mode) :init - (defun mitch/nlinum-buffer-setup () + (defun mir/nlinum-buffer-setup () (nlinum-relative-mode -1) (nlinum-relative-mode 99) (setq nlinum-format-function @@ -528,7 +528,7 @@ targets." str))) (setq-local nlinum--width (length (number-to-string (line-number-at-pos (point-max)))))) - (add-hook 'minibuffer-exit-hook #'mitch/nlinum-buffer-setup)) + (add-hook 'minibuffer-exit-hook #'mir/nlinum-buffer-setup)) ;; Better modeline? Better modeline. (use-package powerline @@ -538,11 +538,11 @@ targets." (powerline-utf-8-separator-left (string-to-char "")) (powerline-utf-8-separator-right (string-to-char "")) :init - (defun mitch/powerline-never-select-cfwindow (orig) + (defun mir/powerline-never-select-cfwindow (orig) "Only run ORIG if the current frame is not a child frame." (unless (frame-parent) (funcall orig))) (advice-add #'powerline-set-selected-window - :around #'mitch/powerline-never-select-cfwindow)) + :around #'mir/powerline-never-select-cfwindow)) (use-package doom-modeline :disabled :after airline-themes @@ -575,9 +575,9 @@ targets." (use-package sv-theme :elpaca (sv-theme :repo - "https://git.mitchmarq42.xyz/mir/sv-theme") + "https://git.mirmarq42.xyz/mir/sv-theme") :config - (mitch/visual-setup) + (mir/visual-setup) (load-theme 'airline-ravenpower t) :init (load-theme 'sv t)) @@ -633,7 +633,7 @@ targets." (defun insert-ï () (interactive) (insert 239)) ; this is a lowercase I with an umlaut. Used for the word `naiive'. - (defun mitch/org-grayify-stars () + (defun mir/org-grayify-stars () "Make the `*' characters in Org headlines look like the `#'s in markdown." (interactive) (font-lock-add-keywords @@ -641,8 +641,8 @@ targets." `((,(rx bol (+ "*")) . ;; shadow font-lock-doc-markup-face)))) (add-hook 'org-mode-hook - #'mitch/org-grayify-stars 90) - (defun mitch-insert-current-datetime () + #'mir/org-grayify-stars 90) + (defun mir-insert-current-datetime () "Insert the current date and time in my preffered format, with a newline at the end." (interactive) @@ -651,13 +651,13 @@ the end." (downcase (format "%s %s\n" (calendar-date-string (calendar-current-date)) (format-time-string "%-l:%M %p")))))) - (defun mitch-1st-heading-now () + (defun mir-1st-heading-now () "Insert a brand new 2nd level Org heading containing the current date/time. Start insert mode." (interactive) (goto-char (point-max)) (insert "* ") - (mitch-insert-current-datetime) + (mir-insert-current-datetime) (evil-insert 1)) :hook @@ -688,7 +688,7 @@ Return nil if DIR is not in a hugo project at all." thisdir (let ((updir (file-name-directory (string-trim-right thisdir "/")))) (hugo-dir-above updir))))))) - ;; (hugo-dir-above "~/.local/git/mitchmarq42.github.io/content-org/") + ;; (hugo-dir-above "~/.local/git/mirmarq42.github.io/content-org/") (defun hugo-compile (&optional dir) (interactive) (if (bound-and-true-p dir) nil @@ -964,7 +964,7 @@ Return nil if DIR is not in a hugo project at all." (use-package dconf-mode :elpaca (dconf-mode :type git - :repo "https://git.mitchmarq42.xyz/mir/dconf-mode")) + :repo "https://git.mirmarq42.xyz/mir/dconf-mode")) (use-package info-variable-pitch :elpaca (info-variable-pitch @@ -987,18 +987,18 @@ Return nil if DIR is not in a hugo project at all." :if (featurep 'xwidget) :commands xwidget-webkit-browse-url :config - (defun mitch/webkit-isearch () + (defun mir/webkit-isearch () (interactive) (xwidget-webkit-search (setq isearch-string (read-from-minibuffer "Find in page: ")) (car xwidget-list) 'insensitive nil t)) - (defun mitch/webkit-isearch-next () + (defun mir/webkit-isearch-next () (interactive) (xwidget-webkit-search isearch-string (car xwidget-list) 'insensitive nil t)) - (defun mitch/webkit-isearch-prev () + (defun mir/webkit-isearch-prev () (interactive) (xwidget-webkit-search isearch-string (car xwidget-list) 'insensitive t t)) @@ -1006,13 +1006,13 @@ Return nil if DIR is not in a hugo project at all." :general (general-define-key :states 'normal :keymaps 'xwidget-webkit-mode-map - "/" 'mitch/webkit-isearch - "n" 'mitch/webkit-isearch-next - "N" 'mitch/webkit-isearch-prev))) + "/" 'mir/webkit-isearch + "n" 'mir/webkit-isearch-next + "N" 'mir/webkit-isearch-prev))) ;; (use-package ani-el ;; :elpaca (ani-el -;; :repo "https://git.mitchmarq42.xyz/mitch/ani-el" +;; :repo "https://git.mirmarq42.xyz/mir/ani-el" ;; :files ("ani-el.el" "lib"))) (use-package slime @@ -1137,7 +1137,7 @@ Taken from https://howardism.org/Technical/Emacs/eshell-why.html" ;; (use-package hypop ;; :if (display-graphic-p) -;; :elpaca (:repo "https://git.mitchmarq42.xyz/mitch/hypop.el") +;; :elpaca (:repo "https://git.mirmarq42.xyz/mir/hypop.el") ;; :demand t) ;; (use-package vertico-posframe ;; :after vertico @@ -1145,7 +1145,7 @@ Taken from https://howardism.org/Technical/Emacs/eshell-why.html" ;; :config (vertico-posframe-mode)) (use-package notibox :if (display-graphic-p) - :elpaca (:host github :repo "MitchMarq42/notibox.el") + :elpaca (:host github :repo "MirMarq42/notibox.el") :demand t :custom (notibox-corner 'topright) :config (notibox/setup-timer)) @@ -1175,7 +1175,7 @@ Taken from https://howardism.org/Technical/Emacs/eshell-why.html" (use-package vidframe :if (display-graphic-p) ;we won't yet bother with ;kitty/sixel/catimg shit - :elpaca (:host github :repo "MitchMarq42/vidframe.el") + :elpaca (:host github :repo "MirMarq42/vidframe.el") ) ;; Kitty Keyboard Protocol @@ -1285,5 +1285,5 @@ This is redefined for use with `hypop' library because multiple Emacs frames may (use-package nix-mode) -(provide 'mitch-packages) -;;; mitch-packages.el ends here +(provide 'mir-packages) +;;; mir-packages.el ends here diff --git a/lisp/obsolete.el b/lisp/obsolete.el index 9f25cfa..aeab398 100644 --- a/lisp/obsolete.el +++ b/lisp/obsolete.el @@ -1,8 +1,8 @@ ;;; obsolete.el --- code I don't use anymore -*- lexical-binding: t; -*- -;; Copyright (C) 2023 mitch +;; Copyright (C) 2023 mir -;; Author: mitch +;; Author: mir ;; Keywords:local,maint ;; This program is free software; you can redistribute it and/or modify @@ -90,16 +90,16 @@ See https://emacs.stackexchange.com/questions/2538/how-to-define-additional-mode (setq-local electric-pair-pairs (append electric-pair-pairs org-electric-pairs)) (setq-local electric-pair-text-pairs electric-pair-pairs)) (add-hook 'org-mode-hook 'org-add-electric-pairs) - (require 'mitch-orgstuff) + (require 'mir-orgstuff) (general-define-key :states '(normal visual insert) :keymaps 'org-mode-map - "_" 'mitch/org-dwim-char - "/" 'mitch/org-dwim-char - "*" 'mitch/org-dwim-char - "+" 'mitch/org-dwim-char - "~" 'mitch/org-dwim-char - "=" 'mitch/org-dwim-char) + "_" 'mir/org-dwim-char + "/" 'mir/org-dwim-char + "*" 'mir/org-dwim-char + "+" 'mir/org-dwim-char + "~" 'mir/org-dwim-char + "=" 'mir/org-dwim-char) (use-package org-modern-indent :elpaca (:host github :repo "jdtsmith/org-modern-indent") :diminish org-indent-mode @@ -141,7 +141,7 @@ See https://emacs.stackexchange.com/questions/2538/how-to-define-additional-mode (:session . "default") (:socket . nil))) (org-babel-tmux-session-prefix "ob-") - (org-babel-tmux-terminal "/home/mitch/.local/bin/emacs-term-shim.sh") + (org-babel-tmux-terminal "/home/mir/.local/bin/emacs-term-shim.sh") (org-babel-tmux-terminal-opts)) (use-package org-modern