summaryrefslogtreecommitdiff
path: root/emacs/site-lisp/exwm-pref.el
diff options
context:
space:
mode:
authorTCCQ <thomasmulmer02@gmail.com>2025-04-09 19:53:47 -0700
committerTCCQ <thomasmulmer02@gmail.com>2025-04-09 19:53:47 -0700
commitaacd40d6adbf9bfb510e40b7ddb93678e7cecbcd (patch)
tree4efb7ef976d7e6fd1a9c72647f2b40cf6b804565 /emacs/site-lisp/exwm-pref.el
parent729e4d189c2d25a551a77a77276c75f42fbc4faa (diff)
emacs to add single top header and move some (global) info there
Diffstat (limited to 'emacs/site-lisp/exwm-pref.el')
-rw-r--r--emacs/site-lisp/exwm-pref.el38
1 files changed, 16 insertions, 22 deletions
diff --git a/emacs/site-lisp/exwm-pref.el b/emacs/site-lisp/exwm-pref.el
index f03711c..c6d51d1 100644
--- a/emacs/site-lisp/exwm-pref.el
+++ b/emacs/site-lisp/exwm-pref.el
@@ -27,29 +27,20 @@
(setq exwm-manage-force-tiling t)
+
(defun b3n-exwm-set-buffer-name ()
- (if (and exwm-title (string-match "\\`http[^ ]+" exwm-title))
- (let ((url (match-string 0 exwm-title)))
- (setq-local buffer-file-name url)
- (setq-local exwm-title (replace-regexp-in-string
- (concat (regexp-quote url) " - ")
- ""
- exwm-title))
- (setq-local exwm-title (replace-regexp-in-string
- " - Mozilla Firefox"
- ""
- exwm-title))))
-
- (setq-local exwm-title
- (concat
- exwm-class-name
- "<"
- ;; (if (<= (length exwm-title) exwm-title-length)
- exwm-title
- ;; (concat (substring exwm-title 0 exwm-title-length) "…"))
- ">"))
-
- (exwm-workspace-rename-buffer exwm-title))
+ (if exwm-title
+ (let* ((shortened-title (replace-regexp-in-string
+ " - Mozilla Firefox"
+ ""
+ exwm-title))
+ (class-and-title (concat
+ exwm-class-name
+ "<"
+ shortened-title
+ ">")))
+ (setq-local exwm-title class-and-title)
+ (exwm-workspace-rename-buffer exwm-title))))
(add-hook 'exwm-update-class-hook 'b3n-exwm-set-buffer-name)
(add-hook 'exwm-update-title-hook 'b3n-exwm-set-buffer-name)
@@ -190,6 +181,9 @@
;; browser
([?\s-e] . (lambda ()
(interactive)
+ (start-process-shell-command "vimb" nil "vimb")))
+ ([?\s-E] . (lambda ()
+ (interactive)
(start-process-shell-command "firefox" nil "firefox")))
;; ([?\M-e] . (lambda ()
;; (interactive)