diff options
author | David Morgan <djm_uk@protonmail.com> | 2024-09-24 08:53:02 +0100 |
---|---|---|
committer | David Morgan <djm_uk@protonmail.com> | 2024-09-24 08:53:02 +0100 |
commit | 7fd449d04683eaeaa3c68332e7c5b5e9aac36b18 (patch) | |
tree | 8efba0fde6cb73a25413f47dfe101bd2de8fc3ce /.emacs.d | |
parent | 5976ca5d608a128c3ae150ad8da513f3fe0b3a59 (diff) | |
download | dotfiles-7fd449d04683eaeaa3c68332e7c5b5e9aac36b18.tar.gz |
Control window splitting with threshold vars
Diffstat (limited to '.emacs.d')
-rw-r--r-- | .emacs.d/lisp/init-clojure.el | 8 | ||||
-rw-r--r-- | .emacs.d/lisp/init-windows.el | 18 |
2 files changed, 3 insertions, 23 deletions
diff --git a/.emacs.d/lisp/init-clojure.el b/.emacs.d/lisp/init-clojure.el index 20394e3..b85c090 100644 --- a/.emacs.d/lisp/init-clojure.el +++ b/.emacs.d/lisp/init-clojure.el @@ -209,16 +209,8 @@ (delete-other-windows))) (advice-add #'cider-close-ancillary-buffers :after #'fix-duplicate-windows) - (defun switch-to-cider-repl () - "Wrapper around `cider-switch-to-repl-buffer' with custom functionality." - (interactive) - (if (get-buffer-window (cider-current-repl)) - (cider-switch-to-repl-buffer) - (cider-switch-to-repl-buffer) - (transpose-large-frame))) :bind (:map cider-mode-map - ("C-c C-z" . switch-to-cider-repl) ("C-c M-l" . cider-load-file) ("C-c M-b" . cider-interrupt)) (:map cider-repl-mode-map diff --git a/.emacs.d/lisp/init-windows.el b/.emacs.d/lisp/init-windows.el index c1b9943..56ba032 100644 --- a/.emacs.d/lisp/init-windows.el +++ b/.emacs.d/lisp/init-windows.el @@ -5,11 +5,8 @@ (use-feature emacs :custom (switch-to-buffer-obey-display-actions t) - :config - (defcustom large-frame-width-threshold 500 - "Minimum width (in chars) to consider the frame large." - :group 'djm - :type 'natnum)) + (split-height-threshold nil) + (split-width-threshold 200)) (use-feature ibuffer :bind @@ -66,16 +63,7 @@ (fullframe elpaca-fetch-all quit-window)) (use-package transpose-frame - :bind (:map ctl-x-4-map ("t" . transpose-frame)) - :config - (defun transpose-large-frame () - "Trasnpose the window arrangement, if the frame is large. - -This is based on the frame width, with the threshold being customised using -`large-frame-width-threshold'." - (when (> large-frame-width-threshold (frame-char-width)) (transpose-frame))) - :hook - (cider-connected . transpose-large-frame)) + :bind (:map ctl-x-4-map ("t" . transpose-frame))) (use-package ace-window :diminish |