mirror of
https://github.com/emacs-exwm/exwm.git
synced 2025-01-22 16:08:00 +01:00
Add minibuffer toggle command
* exwm-workspace.el (exwm-workspace-toggle-minibuffer): Add minibuffer toggle command. * exwm-core.el (exwm-mode-menu, exwm-mode-map): Substitute minibuffer attach/detach commands with minibuffer toggle command. * exwm-workspace.el (exwm-workspace-toggle-minibuffer): Insert various auto load cookies.
This commit is contained in:
parent
86777c54f3
commit
d86db3edd6
2 changed files with 13 additions and 6 deletions
|
@ -199,12 +199,7 @@
|
||||||
["Swap workspaces" exwm-workspace-swap]
|
["Swap workspaces" exwm-workspace-swap]
|
||||||
["Move X window to" exwm-workspace-move-window :keys "C-c C-m"]
|
["Move X window to" exwm-workspace-move-window :keys "C-c C-m"]
|
||||||
["Move X window from" exwm-workspace-switch-to-buffer]
|
["Move X window from" exwm-workspace-switch-to-buffer]
|
||||||
["Attach minibuffer" exwm-workspace-attach-minibuffer
|
["Toggle minibuffer" exwm-workspace-toggle-minibuffer]
|
||||||
(and (exwm-workspace--minibuffer-own-frame-p)
|
|
||||||
(not (exwm-workspace--minibuffer-attached-p)))]
|
|
||||||
["Detach minibuffer" exwm-workspace-detach-minibuffer
|
|
||||||
(and (exwm-workspace--minibuffer-own-frame-p)
|
|
||||||
(exwm-workspace--minibuffer-attached-p))]
|
|
||||||
["Switch workspace" exwm-workspace-switch]
|
["Switch workspace" exwm-workspace-switch]
|
||||||
;; Place this entry at bottom to avoid selecting others by accident.
|
;; Place this entry at bottom to avoid selecting others by accident.
|
||||||
("Switch to" :filter
|
("Switch to" :filter
|
||||||
|
|
|
@ -500,6 +500,7 @@ The optional FORCE option is for internal use only."
|
||||||
"Number of workspaces `exwm-workspace-switch-create' allowed to create
|
"Number of workspaces `exwm-workspace-switch-create' allowed to create
|
||||||
each time.")
|
each time.")
|
||||||
|
|
||||||
|
;;;###autoload
|
||||||
(defun exwm-workspace-switch-create (frame-or-index)
|
(defun exwm-workspace-switch-create (frame-or-index)
|
||||||
"Switch to workspace FRAME-OR-INDEX, creating it if it does not exist yet."
|
"Switch to workspace FRAME-OR-INDEX, creating it if it does not exist yet."
|
||||||
(interactive)
|
(interactive)
|
||||||
|
@ -835,6 +836,7 @@ Please check `exwm-workspace--minibuffer-own-frame-p' first."
|
||||||
(assq (frame-parameter exwm-workspace--minibuffer 'exwm-container)
|
(assq (frame-parameter exwm-workspace--minibuffer 'exwm-container)
|
||||||
exwm-workspace--id-struts-alist))
|
exwm-workspace--id-struts-alist))
|
||||||
|
|
||||||
|
;;;###autoload
|
||||||
(defun exwm-workspace-attach-minibuffer ()
|
(defun exwm-workspace-attach-minibuffer ()
|
||||||
"Attach the minibuffer so that it always shows."
|
"Attach the minibuffer so that it always shows."
|
||||||
(interactive)
|
(interactive)
|
||||||
|
@ -858,6 +860,7 @@ Please check `exwm-workspace--minibuffer-own-frame-p' first."
|
||||||
(exwm-workspace--set-fullscreen f))
|
(exwm-workspace--set-fullscreen f))
|
||||||
(exwm-workspace--show-minibuffer))))
|
(exwm-workspace--show-minibuffer))))
|
||||||
|
|
||||||
|
;;;###autoload
|
||||||
(defun exwm-workspace-detach-minibuffer ()
|
(defun exwm-workspace-detach-minibuffer ()
|
||||||
"Detach the minibuffer so that it automatically hides."
|
"Detach the minibuffer so that it automatically hides."
|
||||||
(interactive)
|
(interactive)
|
||||||
|
@ -874,6 +877,15 @@ Please check `exwm-workspace--minibuffer-own-frame-p' first."
|
||||||
(exwm-workspace--set-fullscreen f))
|
(exwm-workspace--set-fullscreen f))
|
||||||
(exwm-workspace--hide-minibuffer))))
|
(exwm-workspace--hide-minibuffer))))
|
||||||
|
|
||||||
|
;;;###autoload
|
||||||
|
(defun exwm-workspace-toggle-minibuffer ()
|
||||||
|
"Attach the minibuffer if it's detached, or detach it if it's attached."
|
||||||
|
(interactive)
|
||||||
|
(when (exwm-workspace--minibuffer-own-frame-p)
|
||||||
|
(if (exwm-workspace--minibuffer-attached-p)
|
||||||
|
(exwm-workspace-detach-minibuffer)
|
||||||
|
(exwm-workspace-attach-minibuffer))))
|
||||||
|
|
||||||
(defun exwm-workspace--update-minibuffer-height (&optional echo-area)
|
(defun exwm-workspace--update-minibuffer-height (&optional echo-area)
|
||||||
"Update the minibuffer frame height."
|
"Update the minibuffer frame height."
|
||||||
(let ((height
|
(let ((height
|
||||||
|
|
Loading…
Reference in a new issue