Skip to content

Commit 2ee13fc

Browse files
committed
tweak(window): use transient for +window-adjust-size-transient
1 parent 603a574 commit 2ee13fc

File tree

2 files changed

+10
-15
lines changed

2 files changed

+10
-15
lines changed

modules/me-evil.el

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1441,7 +1441,7 @@
14411441
(+map! :package ace-window :module me-window
14421442
"wa" #'ace-window)
14431443

1444-
(+map! "wj" '(+window-adjust-size/body :wk "+window-adjust-size"))
1444+
(+map! "wj" '(+window-adjust-size-transient :wk "+window-adjust-size"))
14451445

14461446

14471447

modules/me-window.el

Lines changed: 9 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -73,23 +73,18 @@
7373
(window-width . 0.5)
7474
(reusable-frames . visible)))
7575

76-
;; Adapted from: github.com/Phundrak/dotfiles/blob/master/org/config/emacs.org
77-
(with-eval-after-load 'hydra
78-
(defhydra +window-adjust-size (:hint nil :foreign-keys warn)
79-
"
80-
^Zoom^ ^Other
81-
^^^^^^^-----------------------------------------
82-
[_t_/_s_] shrink/enlarge vertically [_q_] quit
83-
[_c_/_r_] shrink/enlarge horizontally
84-
"
85-
("q" nil :exit t)
86-
("c" shrink-window-horizontally)
87-
("t" enlarge-window)
88-
("s" shrink-window)
89-
("r" enlarge-window-horizontally)))
9076

9177
(setq frame-title-format '("GNU Emacs (%b)"))
9278

79+
(with-eval-after-load 'transient
80+
(transient-define-prefix +window-adjust-size-transient ()
81+
"Transient for adjusting window size."
82+
[[("s" "Shrink" shrink-window :transient t)
83+
("e" "Enlarge" enlarge-window :transient t)]
84+
[("h" "Shrink horizontally" shrink-window-horizontally :transient t)
85+
("l" "Enlarge horizontally" enlarge-window-horizontally :transient t)]
86+
[("Q" "Quit" ignore :transient t)]]))
87+
9388

9489
(provide 'me-window)
9590

0 commit comments

Comments
 (0)