diff options
-rw-r--r-- | init.el | 4 | ||||
-rw-r--r-- | lib/doc/jao-pdf.el | 3 |
2 files changed, 5 insertions, 2 deletions
@@ -1048,7 +1048,7 @@ (menu-bar . nil))) ;;;; frame layout, title, etc -(setq frame-title-format '("%b")) +(setq frame-title-format '("%b - emacs")) (use-package fringe) (fringe-mode) @@ -1480,7 +1480,7 @@ (setq jao-org-open-pdf-fun 'jao-find-or-open) (defun jao-zathura-open (file page) - (let ((id (jao-x11-search-window (file-name-nondirectory file)))) + (let ((id (jao-x11-search-window (jao-pdf-zathura-title-rx file)))) (if (string-blank-p id) (progn (when jao-xmonad-enabled (jao-x11-goto-ws 2)) diff --git a/lib/doc/jao-pdf.el b/lib/doc/jao-pdf.el index 5ab3f24..78d5196 100644 --- a/lib/doc/jao-pdf.el +++ b/lib/doc/jao-pdf.el @@ -72,6 +72,9 @@ (let ((page (if page (format "-P %s" page) ""))) (format "zathura %s %s %s" file page (or suffix "")))) +(defun jao-pdf-zathura-title-rx (file) + (concat (file-name-nondirectory file) " \\[.+\\]")) + ;; e.g. "~/org/doc/write-yourself-a-scheme-in-48-hours.pdf [96 (96/138)]" (defun jao-pdf-zathura-file-info (title) (when (string-match "\\(.+\\) \\[\\(.+\\) (\\([0-9]+\\)/\\([0-9]+\\))\\]" |