about summary refs log tree commit diff
path: root/exwm-workspace.el
diff options
context:
space:
mode:
authorChris Feng <chris.w.feng@gmail.com>2016-02-19T03·02+0800
committerChris Feng <chris.w.feng@gmail.com>2016-02-19T03·02+0800
commitbfd43feb494a8a7675f3a882ea5ebeaa91fb3f82 (patch)
tree4b30e30c41c5cd194eb9711b81ab32ad3bcac86c /exwm-workspace.el
parent3f7722079cebd0d998239ce40457899135250a15 (diff)
Add system tray support
* exwm-systemtray.el: New module adds a simple system tray (using the X11
System Tray protocol).

* exwm-workspace.el (exwm-workspace-switch-hook, exwm-workspace-switch):
New hook run after switching workspace.
Diffstat (limited to 'exwm-workspace.el')
-rw-r--r--exwm-workspace.el9
1 files changed, 5 insertions, 4 deletions
diff --git a/exwm-workspace.el b/exwm-workspace.el
index 99a7c7bd2bb3..e9bab305e321 100644
--- a/exwm-workspace.el
+++ b/exwm-workspace.el
@@ -23,9 +23,6 @@
 
 ;; This module adds workspace support for EXWM.
 
-;; Todo:
-;; + Add system tray support.
-
 ;;; Code:
 
 (require 'exwm-core)
@@ -141,6 +138,9 @@ workspace frame."
                        :stack-mode xcb:StackMode:Above))
     (set-frame-width exwm-workspace--minibuffer width nil t)))
 
+(defvar exwm-workspace-switch-hook nil
+  "Normal hook run after switching workspace.")
+
 ;;;###autoload
 (defun exwm-workspace-switch (index &optional force)
   "Switch to workspace INDEX. Query for INDEX if it's not specified.
@@ -203,7 +203,8 @@ The optional FORCE option is for internal use only."
         (xcb:+request exwm--connection
             (make-instance 'xcb:ewmh:set-_NET_CURRENT_DESKTOP
                            :window exwm--root :data index))
-        (xcb:flush exwm--connection)))))
+        (xcb:flush exwm--connection))
+      (run-hooks 'exwm-workspace-switch-hook))))
 
 ;;;###autoload
 (defun exwm-workspace-move-window (index &optional id)