aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMasaya Tojo <masaya@tojo.tokyo>2021-03-01 04:38:34 +0900
committerMasaya Tojo <masaya@tojo.tokyo>2021-03-01 04:38:34 +0900
commita2627d14f69361d8697cf29d2d4d0604222d6063 (patch)
tree1590460158ea68a4f6f3942707b08fbfbe45714a
parent56f2985dc89639747138eb901d43e7449c3ff885 (diff)
exwm: Add exwm-rename-buffer configraion
-rw-r--r--.exwm9
1 files changed, 9 insertions, 0 deletions
diff --git a/.exwm b/.exwm
index 9398634..25e5aba 100644
--- a/.exwm
+++ b/.exwm
@@ -27,4 +27,13 @@
(call-process-shell-command "setxkbmap -option ctrl:nocaps")
+(defun exwm-rename-buffer ()
+ (interactive)
+ (exwm-workspace-rename-buffer
+ (concat exwm-class-name ":"
+ (if (<= (length exwm-title) 50) exwm-title
+ (concat (substring exwm-title 0 49) "...")))))
+(add-hook 'exwm-update-class-hook 'exwm-rename-buffer)
+(add-hook 'exwm-update-title-hook 'exwm-rename-buffer)
+
(exwm-config-example)