diff options
author | jao <jao@gnu.org> | 2022-06-03 21:51:01 +0100 |
---|---|---|
committer | jao <jao@gnu.org> | 2022-06-03 21:51:01 +0100 |
commit | d726fc6bce480c1a87751c70e31991a0c11c6847 (patch) | |
tree | fc17e4fef04bbac2f32d9c400b84d532b096b920 | |
parent | a2be53bb14bfebac4ceab5ba05d5e68c67256e86 (diff) | |
download | elibs-d726fc6bce480c1a87751c70e31991a0c11c6847.tar.gz elibs-d726fc6bce480c1a87751c70e31991a0c11c6847.tar.bz2 |
better opening of zathura docs in xmonad
-rw-r--r-- | init.org | 7 |
1 files changed, 5 insertions, 2 deletions
@@ -1892,7 +1892,7 @@ (file (jao-org-pdf-to-org-file (car info))) (page (cadr info)) (pageno (or (car (last info)) page))) - (jao-afio--goto-docs) + (ignore-errors (jao-afio--goto-docs)) (let* ((exists (file-exists-p file)) (fn (file-name-nondirectory file)) (lnk (format "[[doc:%s::%d][Page %s]]" fn page pageno))) @@ -1907,7 +1907,10 @@ (let ((id (jao-shell-string (format "xdotool search --name %s" (file-name-nondirectory file))))) (if (string-blank-p id) - (jao-shell-exec (format "zathura %s -P %s" file (or page 1))) + (progn + (when jao-xmonad-enabled + (jao-shell-exec "xdotool set_destktop 2")) + (jao-shell-exec (format "zathura %s -P %s" file (or page 1)))) (let* ((page (if page (format " && xdotool type %dg" page) "")) (cmd (format "xdotool windowactivate %s%s" id page))) (jao-shell-string cmd))))) |