aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--bard-elisp/bard-window.el11
-rw-r--r--bard-emacs-modules/bard-emacs-window.el31
2 files changed, 20 insertions, 22 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)
diff --git a/bard-emacs-modules/bard-emacs-window.el b/bard-emacs-modules/bard-emacs-window.el
index 130ab6c..354088d 100644
--- a/bard-emacs-modules/bard-emacs-window.el
+++ b/bard-emacs-modules/bard-emacs-window.el
@@ -101,28 +101,16 @@
(display-buffer-reuse-mode-window display-buffer-below-selected)
(dedicated . t)
(window-height . fit-window-to-buffer))
- ;; NOTE 2022-09-10: The following is for `ispell-word', though
- ;; it only works because I override `ispell-display-buffer'
- ;; with `prot-spell-ispell-display-buffer' and change the
- ;; value of `ispell-choices-buffer'.
("\\*ispell-top-choices\\*.*"
(display-buffer-reuse-mode-window display-buffer-below-selected)
(window-height . fit-window-to-buffer))
- ;; same window
-
- ;; NOTE 2023-02-17: `man' does not fully obey the
- ;; `display-buffer-alist'. It works for new frames and for
- ;; `display-buffer-below-selected', but otherwise is
- ;; unpredictable. See `Man-notify-method'.
- ((or . ((derived-mode . Man-mode)
- (derived-mode . woman-mode)
- "\\*\\(Man\\|woman\\).*"))
- (display-buffer-same-window))))
+ ))
)
(use-package frame
:ensure nil
- :bind ("C-x u" . undelete-frame) ; I use only C-/ for `undo'
+ :bind (("C-x u" . undelete-frame)
+ ("C-x f" . other-frame-prefix)) ; I use only C-/ for `undo'
:hook (after-init . undelete-frame-mode))
(use-package winner-mode
@@ -141,16 +129,15 @@
:bind
("C-x w t" . tear-off-window))
-(use-package tab-bar
+(use-package ibuffer
:ensure nil
:config
- (tab-bar-mode +1)
+ (setq ibuffer-default-sorting-mode 'major-mode))
- (setq tab-bar-tab-hints t
- tab-bar-close-button-show nil
- tab-bar-new-button-show nil
- tab-bar-separator " "
- tab-bar-auto-width nil))
+(use-package emacs
+ :ensure nil
+ :bind
+ ("C-x w w" . bard/toggle-window-split))
(provide 'bard-emacs-window)
;;; bard-emacs-window.el ends here