summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorjao <jao@gnu.org>2022-09-04 03:30:20 +0100
committerjao <jao@gnu.org>2022-09-04 03:30:20 +0100
commit27d65f50b9709ab2e2e91e6ff2e8cd9e792cd574 (patch)
tree8e7b27cb9a67d7e43e32c5a313dfde9a8470ec88
parent46bdf389914dafda40764963c2c89c7496e2aaed (diff)
downloadelibs-27d65f50b9709ab2e2e91e6ff2e8cd9e792cd574.tar.gz
elibs-27d65f50b9709ab2e2e91e6ff2e8cd9e792cd574.tar.bz2
jao-river-enable
-rw-r--r--init.el28
-rw-r--r--lib/eos/jao-tracking.el2
2 files changed, 16 insertions, 14 deletions
diff --git a/init.el b/init.el
index 464dfd3..98dc82a 100644
--- a/init.el
+++ b/init.el
@@ -251,13 +251,11 @@
(pdf-view-mode "application/pdf" (display-graphic-p))
("zathura \"%s\"" "application/pdf")
(image-mode "image/*" (display-graphic-p))
- (,(concat "riverctl toggle-focused-tags 64"
- " && riverctl focus-view next"
- " && qutebrowser \"%s\"")
- "text/html" (and jao-wayland-enabled (not (display-graphic-p))))
- ("swayimg \"%s\"" "image/*" jao-sway-enabled)
+ ("firefox %s && riverctl set-focused-tags 2" "text/html" jao-river-enabled)
+ ("swayimg \"%s\"" "image/*": jao-sway-enabled)
("imv-wayland \"%s\"" "image/*" jao-wayland-enabled)
- ("imv-x11 \"%s\"" "image/*" (display-graphic-p))))))
+ ("imv-x11 \"%s\"" "image/*")))))
+
;;; Crypto
;;;; PGP, EPG, passwords
(setq auth-source-debug nil)
@@ -466,9 +464,6 @@
(jao-trisect)
(message "Welcome to wayland"))
-(when jao-wayland-enabled
- (add-hook 'after-init-hook #'jao-wayland-enable))
-
(defsubst jao-wayland-type (&rest args)
(apply #'jao-shell-exec* t "wtype" args))
@@ -501,9 +496,6 @@
(defun jao-river-zathura-to-org ()
(let ((title (jao-river-get-focused-title)))
- (when (string-match-p "\\.pdf" title)
- (message "%s" title)
- (jao-notify title "Opening ORG counterpart"))
(jao-river-to-ws 1)
(jao-pdf-goto-zathura-org title t)))
@@ -532,6 +524,15 @@
(sit-for 0.2)
(jao-tracking-set-log ""))
+(defun jao-river-enable ()
+ (jao-wayland-enable)
+ (when (jao-shell-running-p "i3bar-river")
+ (jao-tracking-set-log ""))
+ (message "Welcome to river"))
+
+(when jao-river-enabled
+ (add-hook 'after-init-hook #'jao-river-enable))
+
;;;; sway
(defmacro jao-def-swaymsg (name msg)
`(defun ,(intern (format "jao-sway-%s" name)) ()
@@ -572,6 +573,9 @@
(interactive)
(jao-sway-run-or-focus "firefox"))
+(when jao-sway-enabled
+ (add-hook 'after-init-hook #'jao-wayland-enable))
+
;;;; wallpaper
(defvar jao-wallpaper-dir "~/.wallpapers/")
diff --git a/lib/eos/jao-tracking.el b/lib/eos/jao-tracking.el
index 23bd099..5fca653 100644
--- a/lib/eos/jao-tracking.el
+++ b/lib/eos/jao-tracking.el
@@ -101,8 +101,6 @@
(cmd (format "wmctrl -r emacs -b %s,demands_attention" action)))
(shell-command-to-string cmd))))
-(jao-tracking-set-log "")
-
(defun jao-tracking--buffer-str (s)
(if (listp s)
`(:propertize ,(plist-get s :propertize)