diff options
-rw-r--r-- | init.el | 31 |
1 files changed, 4 insertions, 27 deletions
@@ -195,33 +195,10 @@ | |||
195 | (start-process-shell-command | 195 | (start-process-shell-command |
196 | command nil command))) | 196 | command nil command))) |
197 | ;; Switch workspace with `s-w' | 197 | ;; Switch workspace with `s-w' |
198 | ([?\s-w] . exwm-workspace-switch)))) | 198 | ([?\s-w] . exwm-workspace-switch))) |
199 | 199 | (exwm-enable)) | |
200 | ;; Named workspaces | 200 | |
201 | (setq exwm-workspace-index-map (lambda (index) | 201 | |
202 | (let ((named-workspaces ["0:Admin" | ||
203 | "1:Agenda" | ||
204 | "2:KB" | ||
205 | "3:IDE"])) | ||
206 | (if (< index (length named-workspaces)) | ||
207 | (elt named-workspaces index) | ||
208 | (number-to-string index))))) | ||
209 | |||
210 | (defun mm/exwm-workspace--update-ewmh-desktop-names () | ||
211 | "Update the names of desktops in `exwm-workspace-index-map'." | ||
212 | (xcb:+request exwm--connection | ||
213 | (make-instance 'xcb:ewmh:set-_NET_DESKTOP_NAMES | ||
214 | :window exwm--root :data | ||
215 | (mapconcat (lambda (i) (funcall exwm-workspace-index-map i)) | ||
216 | (number-sequence 0 (1- (exwm-workspace--count))) | ||
217 | "\0")))) | ||
218 | |||
219 | (add-hook 'exwm-workspace-list-change-hook | ||
220 | #'mm/exwm-workspace--update-ewmh-desktop-names) | ||
221 | |||
222 | ;; Start EXWM | ||
223 | (exwm-enable) | ||
224 | (mm/exwm-workspace--update-ewmh-desktop-names) | ||
225 | ;; --------------------------------- | 202 | ;; --------------------------------- |
226 | ;; Temporary theme | 203 | ;; Temporary theme |
227 | ;; --------------- | 204 | ;; --------------- |