summaryrefslogtreecommitdiffhomepage
path: root/lib
diff options
context:
space:
mode:
authorjao <jao@gnu.org>2026-11-08 20:22:58 +0000
committerjao <jao@gnu.org>2026-11-08 20:22:58 +0000
commit255eca68a56e367d849ca598af391b0929d176cb (patch)
tree1e91cb8b83e8f66c8a37919426dff8204e738365 /lib
parent1fe6ce48699e74030da1f4b23f325e19730b6e1b (diff)
downloadelibs-255eca68a56e367d849ca598af391b0929d176cb.tar.gz
elibs-255eca68a56e367d849ca598af391b0929d176cb.tar.bz2
better window navigationmain
Diffstat (limited to 'lib')
-rw-r--r--lib/eos/jao-buffers.el23
-rw-r--r--lib/eos/jao-themes.el1
2 files changed, 19 insertions, 5 deletions
diff --git a/lib/eos/jao-buffers.el b/lib/eos/jao-buffers.el
index c3f4063..3339d33 100644
--- a/lib/eos/jao-buffers.el
+++ b/lib/eos/jao-buffers.el
@@ -18,11 +18,11 @@
;; You should have received a copy of the GNU General Public License
;; along with this program. If not, see <https://www.gnu.org/licenses/>.
-;;; Code:
+;;; deps
(require 'eldoc)
-;;;; lines
+;;; lines
;;;###autoload
(defun jao-goto-visible-line (n)
@@ -30,7 +30,20 @@
(goto-char (point-min))
(forward-visible-line n))
-;;;; attached buffers
+;;; windows
+;;;###autoload
+(defun transpose-windows (arg)
+ "Transpose the buffers shown in two windows."
+ (interactive "p")
+ (let ((selector (if (>= arg 0) 'next-window 'previous-window)))
+ (while (/= arg 0)
+ (let ((this-win (window-buffer))
+ (next-win (window-buffer (funcall selector))))
+ (set-window-buffer (selected-window) next-win)
+ (set-window-buffer (funcall selector) this-win)
+ (select-window (funcall selector)))
+ (setq arg (if (> arg 0) (1- arg) (1+ arg))))))
+;;; attached buffers
(defun jao-display-buffer-below-selected (buffer alist)
(delete-other-windows-vertically)
(display-buffer-below-selected buffer alist))
@@ -57,7 +70,7 @@
(add-to-list 'display-buffer-alist
(jao-attached-buffer-entry name-rx height)))
-;;;; eldoc
+;;; eldoc
;;;###autoload
(defun jao-eldoc-toggle ()
"Toggle eldoc's documentation buffer."
@@ -89,7 +102,7 @@
(display-buffer-reuse-window jao-display-below-eldoc)
(height . (or ,h 0.5)))))
-;;;; same mode
+;;; same mode
;;;###autoload
(defun jao-buffer-same-mode (&optional mode pre-fn switch-fn)
(interactive)
diff --git a/lib/eos/jao-themes.el b/lib/eos/jao-themes.el
index a1d22c1..ed4d038 100644
--- a/lib/eos/jao-themes.el
+++ b/lib/eos/jao-themes.el
@@ -1096,6 +1096,7 @@
(sunshine-forecast-date-face (~ default))
(sunshine-forecast-day-divider-face (p dimm))
(sunshine-forecast-headline-face (~ header-line))
+ (switch-window-label-face (p keyword) :height 2.0)
(symbol-overlay-face-1 (c nil "brown1"))
(symbol-overlay-face-2 (c nil "lightsalmon1"))
(symbol-overlay-face-3 (c nil "tomato1"))