summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--exwm.org2
-rw-r--r--init.org4
2 files changed, 3 insertions, 3 deletions
diff --git a/exwm.org b/exwm.org
index e7336f9..d2fd5e8 100644
--- a/exwm.org
+++ b/exwm.org
@@ -517,7 +517,7 @@
("i" "irc" jao-chats-irc)]
["Windows"
("f" "Previous window layout" winner-undo :transient t)
- ("F" "Undo window layout restore" winner-redo :transient t)
+ ("B" "Switch to EXWM buffer" jao-exwm--buffer)
("w" "set wallpaper" jao-set-wallpaper)
("W" "set radom wallpaper" jao-set-random-wallpaper)]
["PDFs"
diff --git a/init.org b/init.org
index acb9342..c0f1016 100644
--- a/init.org
+++ b/init.org
@@ -1034,7 +1034,7 @@
#+end_src
*** same mode
#+begin_src emacs-lisp
- (defun jao-buffer-same-mode (&optional mode pre-fn)
+ (defun jao-buffer-same-mode (&optional mode pre-fn switch-fn)
(interactive)
(let* ((mode (or mode major-mode))
(modes (if (symbolp mode) (list mode) mode))
@@ -1044,7 +1044,7 @@
',modes))))
(buff (read-buffer "Buffer: " nil t pred)))
(when pre-fn (funcall pre-fn))
- (pop-to-buffer buff)))
+ (if switch-fn (funcall switch-fn buff) (pop-to-buffer buff))))
(global-set-key (kbd "C-c C-b") #'jao-buffer-same-mode)
#+end_src
*** projects