about summary refs log tree commit diff
path: root/users/tazjin/emacs/config
diff options
context:
space:
mode:
authorVincent Ambo <mail@tazj.in>2023-07-05T11·53+0300
committertazjin <tazjin@tvl.su>2023-07-07T20·22+0000
commit8d3229e40a81828cd95e36142c358b5f7e98dada (patch)
tree22d054d61982a7bc169b226f95cae8e6989fc91e /users/tazjin/emacs/config
parent56c776d9e9175e135ed2cb7043685fc193be5662 (diff)
feat(tazjin/emacs): update EXWM title naming for Chromium r/6397
Change-Id: I16f80741f69267863b891d7524c6b1b4d50804a2
Reviewed-on: https://cl.tvl.fyi/c/depot/+/8930
Reviewed-by: tazjin <tazjin@tvl.su>
Autosubmit: tazjin <tazjin@tvl.su>
Tested-by: BuildkiteCI
Diffstat (limited to 'users/tazjin/emacs/config')
-rw-r--r--users/tazjin/emacs/config/desktop.el31
1 files changed, 8 insertions, 23 deletions
diff --git a/users/tazjin/emacs/config/desktop.el b/users/tazjin/emacs/config/desktop.el
index c47e3b4b91cf..1d7b66f5c0cb 100644
--- a/users/tazjin/emacs/config/desktop.el
+++ b/users/tazjin/emacs/config/desktop.el
@@ -69,29 +69,14 @@
   human-accessible titles."
 
   (pcase (list (or exwm-class-name "unknown") (or exwm-title "unknown"))
-    ;; In Cider windows, rename the class and keep the workspace/file
-    ;; as the title.
-    (`("Google-chrome" ,(and (pred (lambda (title) (s-ends-with? " - Cider" title))) title))
-     (format "Cider<%s>" (s-chop-suffix " - Cider" title)))
-    (`("Google-chrome" ,(and (pred (lambda (title) (s-ends-with? " - Cider V" title))) title))
-     (format "Cider V<%s>" (s-chop-suffix " - Cider V" title)))
-
-    ;; Attempt to detect IRCCloud windows via their title, which is a
-    ;; combination of the channel name and network.
-    ;;
-    ;; This is what would often be referred to as a "hack". The regexp
-    ;; will not work if a network connection buffer is selected in
-    ;; IRCCloud, but since the title contains no other indication that
-    ;; we're dealing with an IRCCloud window
-    (`("Google-chrome"
-       ,(and (pred (lambda (title)
-                     (s-matches? "^[\*\+]\s#[a-zA-Z0-9/\-]+\s\|\s[a-zA-Z\.]+$" title)))
-             title))
-     (format "IRCCloud<%s>" title))
-
-    ;; For other Chrome windows, make the title shorter.
-    (`("Google-chrome" ,title)
-     (format "Chrome<%s>" (s-truncate 42 (s-chop-suffix " - Google Chrome" title))))
+    ;; Yandex.Music -> `Я.Music<... stuff ...>'
+    (`("Chromium-browser" ,(and (pred (lambda (title) (s-starts-with? "Yandex.Music - " title))) title))
+     (format "Я.Music<%s>" (s-chop-prefix "Yandex.Music - " title)))
+
+    ;; For other Chromium windows, make the title shorter.
+    (`("Chromium-browser" ,title)
+     (format "Chromium<%s>" (s-truncate 42 (s-chop-suffix " - Chromium" title))))
+
 
     ;; Gnome-terminal -> Term
     (`("Gnome-terminal" ,title)