Swap thoom/ to my/ prefix

This commit is contained in:
2024-10-03 14:47:20 -07:00
parent 873e213597
commit 36e61234ec

View File

@@ -115,7 +115,7 @@
("C-o D" . windmove-swap-states-right) ("C-o D" . windmove-swap-states-right)
;; TODO C-wasd for resizing ;; TODO C-wasd for resizing
;; TODO C-/ for undo window state change ;; TODO C-/ for undo window state change
("C-o z" . thoom/zoom-window) ("C-o z" . my/zoom-window)
;; TODO other-window scrolling ;; TODO other-window scrolling
("C-o n" . next-buffer) ("C-o n" . next-buffer)
("C-o p" . previous-buffer) ("C-o p" . previous-buffer)
@@ -504,7 +504,7 @@
compilation-mode compilation-mode
"\\*eshell.*\\*" eshell-mode)) "\\*eshell.*\\*" eshell-mode))
(defun thoom/popper-window-height (window) (defun my/popper-window-height (window)
"Make eshell popups take half the frame height, otherwise defer to popper--fit-window-height" "Make eshell popups take half the frame height, otherwise defer to popper--fit-window-height"
(let ((buffer (window-buffer window))) (let ((buffer (window-buffer window)))
(if (with-current-buffer buffer (if (with-current-buffer buffer
@@ -512,29 +512,29 @@
(/ (frame-height (window-frame window)) 2) (/ (frame-height (window-frame window)) 2)
(popper--fit-window-height window)))) (popper--fit-window-height window))))
(setq popper-window-height #'thoom/popper-window-height) (setq popper-window-height #'my/popper-window-height)
;; (setq popper-group-function #'popper-group-by-project) ;; (setq popper-group-function #'popper-group-by-project)
(popper-mode +1) (popper-mode +1)
(popper-echo-mode +1)) (popper-echo-mode +1))
;;;; Zooming ;;;; Zooming
(defvar thoom/zoom-saved-windows nil (defvar my/zoom-saved-windows nil
"Variable to store the current window configuration for thoom/zoom.") "Variable to store the current window configuration for my/zoom.")
(defun thoom/zoom-window () (defun my/zoom-window ()
"Delete other windows, or restore the saved window configuration if available." "Delete other windows, or restore the saved window configuration if available."
(interactive) (interactive)
;; Clean up if the saved config isn't valid anymore. ;; Clean up if the saved config isn't valid anymore.
(if (and thoom/zoom-saved-windows (if (and my/zoom-saved-windows
(not (window-configuration-p thoom/zoom-saved-windows))) (not (window-configuration-p my/zoom-saved-windows)))
(setq thoom/zoom-saved-windows nil)) (setq my/zoom-saved-windows nil))
(if thoom/zoom-saved-windows (if my/zoom-saved-windows
(progn (progn
(set-window-configuration thoom/zoom-saved-windows) (set-window-configuration my/zoom-saved-windows)
(setq thoom/zoom-saved-windows nil)) (setq my/zoom-saved-windows nil))
(setq thoom/zoom-saved-windows (current-window-configuration)) (setq my/zoom-saved-windows (current-window-configuration))
(if (window-parameter (selected-window) 'window-side) (if (window-parameter (selected-window) 'window-side)
(shrink-window -100) (shrink-window -100)
(delete-other-windows)))) (delete-other-windows))))
@@ -648,7 +648,7 @@
;;; Org-mode ;;; Org-mode
(use-package org (use-package org
:bind (("C-c o ," . thoom/org-clear-all) :bind (("C-c o ," . my/org-clear-all)
("C-c o s" . org-screenshot) ("C-c o s" . org-screenshot)
("C-c SPC" . org-table-blank-field) ("C-c SPC" . org-table-blank-field)
;; Unbind to make room for avy and mwim ;; Unbind to make room for avy and mwim
@@ -676,7 +676,7 @@
;; Eagerly load org-mode ;; Eagerly load org-mode
(with-temp-buffer (org-mode)) (with-temp-buffer (org-mode))
(defun thoom/org-clear-all () (defun my/org-clear-all ()
(interactive) (interactive)
(goto-char 0) (goto-char 0)
(org-map-entries (org-map-entries
@@ -698,7 +698,7 @@
;; 3. Put the following at the top of the org file: ;; 3. Put the following at the top of the org file:
;; #+STARTUP: inlineimages ;; #+STARTUP: inlineimages
;; #+ATTR_HTML: :width 500px ;; #+ATTR_HTML: :width 500px
(defvar org-screenshot-import-path "/mnt/c/Users/thoom/Seafile/Games/Screenshots/") (defvar org-screenshot-import-path "/mnt/c/Users/my/Seafile/Games/Screenshots/")
(defvar org-screenshot-export-path org-screenshot-import-path) (defvar org-screenshot-export-path org-screenshot-import-path)
(defvar org-screenshot-exec-path "ShareX.exe") (defvar org-screenshot-exec-path "ShareX.exe")
(defvar org-screenshot-exec-args "-s -workflow GameNotes") (defvar org-screenshot-exec-args "-s -workflow GameNotes")
@@ -869,7 +869,7 @@
;;; Eshell ;;; Eshell
;;;; Eshell ;;;; Eshell
(use-package eshell (use-package eshell
:bind (("M-`" . thoom/eshell-toggle)) :bind (("M-`" . my/eshell-toggle))
:config :config
(setq eshell-destroy-buffer-when-process-dies t (setq eshell-destroy-buffer-when-process-dies t
eshell-scroll-to-bottom-on-input t eshell-scroll-to-bottom-on-input t
@@ -878,7 +878,7 @@
eshell-visual-commands '() eshell-visual-commands '()
eshell-banner-message "") eshell-banner-message "")
(defun thoom/eshell-toggle () (defun my/eshell-toggle ()
"Toggle eshell based on context. "Toggle eshell based on context.
If in eshell, call `popper-toggle`. If in eshell, call `popper-toggle`.
If not in eshell but in a project, call `project-eshell`. If not in eshell but in a project, call `project-eshell`.