summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorjao <jao@gnu.org>2022-06-03 21:51:01 +0100
committerjao <jao@gnu.org>2022-06-03 21:51:01 +0100
commitd726fc6bce480c1a87751c70e31991a0c11c6847 (patch)
treefc17e4fef04bbac2f32d9c400b84d532b096b920
parenta2be53bb14bfebac4ceab5ba05d5e68c67256e86 (diff)
downloadelibs-d726fc6bce480c1a87751c70e31991a0c11c6847.tar.gz
elibs-d726fc6bce480c1a87751c70e31991a0c11c6847.tar.bz2
better opening of zathura docs in xmonad
-rw-r--r--init.org7
1 files changed, 5 insertions, 2 deletions
diff --git a/init.org b/init.org
index e94491d..6535bf7 100644
--- a/init.org
+++ b/init.org
@@ -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)))))