diff options
| author | Thomas Ulmer <thomasmulmer02@gmail.com> | 2025-04-17 11:27:39 -0700 |
|---|---|---|
| committer | Thomas Ulmer <thomasmulmer02@gmail.com> | 2025-04-17 11:27:39 -0700 |
| commit | 5b33c36e579fdf8c127a53e542b4f02ce3bab2b8 (patch) | |
| tree | 7f2155d3136acfdfca8d6f942b9b53bb0e7a8db8 /emacs/site-lisp | |
| parent | ae2bf0a9162084af6e32df20258ed689a24048bc (diff) | |
various small changes and additions
Diffstat (limited to 'emacs/site-lisp')
| -rw-r--r-- | emacs/site-lisp/irc-config.el | 2 | ||||
| -rw-r--r-- | emacs/site-lisp/my-binds.el | 2 | ||||
| -rw-r--r-- | emacs/site-lisp/my-funcs.el | 6 | ||||
| -rwxr-xr-x | emacs/site-lisp/single-header.el | 16 |
4 files changed, 17 insertions, 9 deletions
diff --git a/emacs/site-lisp/irc-config.el b/emacs/site-lisp/irc-config.el index d9213ef..eba66a0 100644 --- a/emacs/site-lisp/irc-config.el +++ b/emacs/site-lisp/irc-config.el @@ -16,7 +16,7 @@ erc-track-faces-priority-list '(erc-current-nick-face erc-keyword-face) erc-track-priority-faces-only 'all) -(defun start-erc () +(defun my/start-erc () "Start erc and autojoin various channels" (interactive) (erc :server "irc.libera.chat" :port 6667)) diff --git a/emacs/site-lisp/my-binds.el b/emacs/site-lisp/my-binds.el index bb80e62..990dd46 100644 --- a/emacs/site-lisp/my-binds.el +++ b/emacs/site-lisp/my-binds.el @@ -20,3 +20,5 @@ ;; searching (global-set-key (kbd "M-s g") 'rgrep) (global-set-key (kbd "M-s r") 'counsel-rg) + +(global-set-key (kbd "C-x w o") 'toggle-window-other-reachability) diff --git a/emacs/site-lisp/my-funcs.el b/emacs/site-lisp/my-funcs.el index 01bf5cc..37a8b7b 100644 --- a/emacs/site-lisp/my-funcs.el +++ b/emacs/site-lisp/my-funcs.el @@ -57,6 +57,12 @@ mark. Does the same of ARG number sexps if given" (save-buffers-kill-terminal) (delete-frame))) +(defun toggle-window-other-reachability () + (interactive) + (let* ((win (get-buffer-window (current-buffer))) + (current (window-parameter win 'no-other-window))) + (set-window-parameter win 'no-other-window (not current)))) + ;; indent code when pasting, from ;; https://trey-jackson.blogspot.com/2008/03/emacs-tip-15-indent-yanked-code.html diff --git a/emacs/site-lisp/single-header.el b/emacs/site-lisp/single-header.el index da57426..06faff5 100755 --- a/emacs/site-lisp/single-header.el +++ b/emacs/site-lisp/single-header.el @@ -14,11 +14,8 @@ (defun make-header-info-string () "generates the mode line string that contains all the info to the right" (let ((str (concat - (format-time-string "%a, %b %+4Y-%0m-%0d ") - (with-face (format-time-string "%R ") + (with-face (battery-format "[%b%p%%] " (and battery-status-function (funcall battery-status-function))) :weight 'bold) - (with-face (format "<%03.2f> " (car (load-average 1))) - :foreground "#da70d6") (with-face (let* ((mi (memory-info)) (tm (float (car mi))) (fm (float (cadr mi))) @@ -26,14 +23,17 @@ (fs (float (cadddr mi)))) (format "{%.2f %.2f} " (- 1 (/ fm tm)) (- 1 (/ fs ts)))) :foreground "#00ced1") - (with-face (battery-format "[%b%p%%] " (and battery-status-function (funcall battery-status-function))) + (with-face (format "<%03.2f> " (car (load-average 1))) + :foreground "#da70d6") + (format-time-string "%a, %b %+4Y-%0m-%0d ") + (with-face (format-time-string "%R") :weight 'bold) ))) - (setq str (concat str - (make-string + (setq str (concat (make-string (- (window-max-chars-per-line (minibuffer-window) 'single-header) (length str)) - ? ))) + ? ) + str)) (with-face str 'single-header))) (defun single-header-init-buffer (buf) |
