about summary refs log tree commit diff
path: root/exwm-core.el
diff options
context:
space:
mode:
authorChris Feng <chris.w.feng@gmail.com>2016-08-24T11·21+0800
committerChris Feng <chris.w.feng@gmail.com>2016-08-24T11·21+0800
commita9136213020efb69672996e2306ae8c26b14e629 (patch)
tree023a42f31784c760b0fa4a08b58955f134587cbe /exwm-core.el
parentcb75d4814daac2f6d52d11550199be65d185f996 (diff)
Add toggle commands
* exwm-input.el (exwm-input-toggle-keyboard): New command for toggling
keyboard mode.
* exwm-layout.el (exwm-layout-toggle-fullscreen): New command for
toggling fullscreen mode.
* exwm-core.el (exwm-mode-menu, exwm-mode-map): Use them.
Diffstat (limited to 'exwm-core.el')
-rw-r--r--exwm-core.el10
1 files changed, 2 insertions, 8 deletions
diff --git a/exwm-core.el b/exwm-core.el
index 0c92d903394d..e65ad5169093 100644
--- a/exwm-core.el
+++ b/exwm-core.el
@@ -150,10 +150,7 @@
     "*General*"
     "---"
     ["Toggle floating" exwm-floating-toggle-floating]
-    ["Enter fullscreen" exwm-layout-set-fullscreen
-     (null (memq xcb:Atom:_NET_WM_STATE_FULLSCREEN exwm--ewmh-state))]
-    ["Leave fullscreen" exwm-reset
-     (memq xcb:Atom:_NET_WM_STATE_FULLSCREEN exwm--ewmh-state)]
+    ["Toggle fullscreen mode" exwm-layout-toggle-fullscreen]
     ["Hide window" exwm-floating-hide exwm--floating-frame]
 
     "---"
@@ -168,10 +165,7 @@
     "---"
     "*Keyboard*"
     "---"
-    ["Capture keyboard" exwm-input-release-keyboard exwm--keyboard-grabbed]
-    ;; It's recommended to use `exwm-reset' rather than
-    ;; `exwm-input-grab-keyboard' to release keyboard (enter line-mode).
-    ["Release keyboard" exwm-reset (not exwm--keyboard-grabbed)]
+    ["Toggle keyboard mode" exwm-input-toggle-keyboard]
     ["Send key" exwm-input-send-next-key exwm--keyboard-grabbed]
     ;; This is merely a reference.
     ("Send simulation key" :filter