aboutsummaryrefslogtreecommitdiff
path: root/bard-elisp
diff options
context:
space:
mode:
authorBardofSprites <[email protected]>2025-01-08 17:50:14 -0500
committerBardofSprites <[email protected]>2025-01-08 17:50:14 -0500
commit9df9eaa13ea957c5dcdbf4076319a4e5129fb033 (patch)
treed9f5644540c5b5af4d591b18cfd662e203d5a193 /bard-elisp
parent7193563e1b51901c9631da2f17b596465eb3d3af (diff)
toggle-window-split, undelete frame, and ibuffer
Diffstat (limited to 'bard-elisp')
-rw-r--r--bard-elisp/bard-window.el11
1 files changed, 11 insertions, 0 deletions
diff --git a/bard-elisp/bard-window.el b/bard-elisp/bard-window.el
index 1670312..274f583 100644
--- a/bard-elisp/bard-window.el
+++ b/bard-elisp/bard-window.el
@@ -144,4 +144,15 @@ This as the action function in a `display-buffer-alist' entry."
(rx (or "*" "helpful" "Org Src"))
"" name)))
+(defun bard/toggle-window-split ()
+ "Toggle between horizontal and vertical window splits."
+ (interactive)
+ (let ((split-direction (if (= (window-width) (frame-width))
+ 'vertical
+ 'horizontal)))
+ (delete-other-windows)
+ (if (eq split-direction 'horizontal)
+ (split-window-vertically)
+ (split-window-horizontally))))
+
(provide 'bard-window)