diff options
Diffstat (limited to 'emacs/site-lisp/exwm-pref.el')
| -rw-r--r-- | emacs/site-lisp/exwm-pref.el | 38 |
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) |
