diff options
author | jao <jao@gnu.org> | 2022-09-24 15:48:20 +0100 |
---|---|---|
committer | jao <jao@gnu.org> | 2022-09-24 15:48:20 +0100 |
commit | 4de01c9547049260435826984f316fcb1848a842 (patch) | |
tree | 5a9c706bb4421a18a5a5ad9fc9c9cfc1e7ce4f11 /init.el | |
parent | 7b6f4038c3b4ea65f20c70b7c7ad66957d556968 (diff) | |
download | elibs-4de01c9547049260435826984f316fcb1848a842.tar.gz elibs-4de01c9547049260435826984f316fcb1848a842.tar.bz2 |
switch-window everywhere
Diffstat (limited to 'init.el')
-rw-r--r-- | init.el | 61 |
1 files changed, 30 insertions, 31 deletions
@@ -1035,37 +1035,36 @@ (define-key ctl-x-4-map (kbd "t") 'transpose-windows) ;;;; switch window -(when (or window-system jao-wayland-enabled) - (use-package switch-window - :ensure t - :custom ((switch-window-minibuffer-shortcut ?z) - (switch-window-background t) - (switch-window-shortcut-style 'qwerty) - (switch-window-shortcut-appearance 'text) - (switch-window-timeout 7) - (switch-window-threshold 2)) - :config - (defun jao-switch-window--then (prompt cmd) - (let ((f `(lambda () - (let ((default-directory ,default-directory)) - (call-interactively ',cmd))))) - (switch-window--then prompt f f))) - - (defun jao-switch-window-then-dired () - (interactive) - (jao-switch-window--then "Find directory" 'dired)) - - (defun jao-switch-window-then-find-file () - (interactive) - (jao-switch-window--then "Find file" 'find-file)) - - (defun jao-switch-window-then-consult-buffer () - (interactive) - (jao-switch-window--then "Switch to buffer" 'consult-buffer)) - - :bind (("C-x 4 d" . jao-switch-window-then-dired) - ("C-x 4 f" . jao-switch-window-then-find-file) - ("C-x 4 b" . jao-switch-window-then-consult-buffer)))) +(use-package switch-window + :ensure t + :custom ((switch-window-minibuffer-shortcut ?z) + (switch-window-background t) + (switch-window-shortcut-style 'qwerty) + (switch-window-shortcut-appearance 'text) + (switch-window-timeout 7) + (switch-window-threshold 2)) + :config + (defun jao-switch-window--then (prompt cmd) + (let ((f `(lambda () + (let ((default-directory ,default-directory)) + (call-interactively ',cmd))))) + (switch-window--then prompt f f))) + + (defun jao-switch-window-then-dired () + (interactive) + (jao-switch-window--then "Find directory" 'dired)) + + (defun jao-switch-window-then-find-file () + (interactive) + (jao-switch-window--then "Find file" 'find-file)) + + (defun jao-switch-window-then-consult-buffer () + (interactive) + (jao-switch-window--then "Switch to buffer" 'consult-buffer)) + + :bind (("C-x 4 d" . jao-switch-window-then-dired) + ("C-x 4 f" . jao-switch-window-then-find-file) + ("C-x 4 b" . jao-switch-window-then-consult-buffer))) ;;;; winner mode (winner-mode 1) |