summaryrefslogtreecommitdiffhomepage
path: root/lib
diff options
context:
space:
mode:
authorjao <jao@gnu.org>2023-07-25 04:39:34 +0100
committerjao <jao@gnu.org>2023-07-25 04:39:34 +0100
commitf56d1fae4140380a08764e2e6a4f96e91ffb178b (patch)
tree8e5d89a8c0d441ad9df713493746a25c291a3f90 /lib
parent73a964e2d5877b705d94f984b4a61dc0f5903cab (diff)
downloadelibs-f56d1fae4140380a08764e2e6a4f96e91ffb178b.tar.gz
elibs-f56d1fae4140380a08764e2e6a4f96e91ffb178b.tar.bz2
wayland updates
Diffstat (limited to 'lib')
-rw-r--r--lib/eos/jao-wayland.el11
1 files changed, 7 insertions, 4 deletions
diff --git a/lib/eos/jao-wayland.el b/lib/eos/jao-wayland.el
index c500d19..9458ccb 100644
--- a/lib/eos/jao-wayland.el
+++ b/lib/eos/jao-wayland.el
@@ -1,6 +1,6 @@
;;; jao-wayland.el --- interacting with wayland compositors -*- lexical-binding: t; -*-
-;; Copyright (C) 2022 jao
+;; Copyright (C) 2022, 2023 jao
;; Author: jao <mail@jao.io>
;; Keywords: convenience
@@ -37,7 +37,10 @@
(jao-wayland-type "-M" "win" (format "%s" n)))
(defsubst jao-river-window-list ()
- (jao-shell-output "lswt -j" (lambda () (let ((json-false nil)) (json-read)))))
+ (alist-get 'toplevels
+ (jao-shell-output "lswt -j"
+ (lambda ()
+ (let ((json-false nil)) (json-read))))))
(defun jao-river-focused ()
(seq-some (lambda (w) (and (alist-get 'activated w) w))
@@ -47,7 +50,7 @@
(alist-get 'title (jao-river-focused)))
(defsubst jao-river-get-focused-app-id ()
- (alist-get 'app_id (jao-river-focused)))
+ (alist-get 'app-id (jao-river-focused)))
(defun jao-river-focus-window (title &optional rx)
(let* ((ws (jao-river-window-list))
@@ -102,7 +105,7 @@
(jao-tracking-set-log ""))
(defun jao-river-toggle-emacs ()
- (let ((erx "^p?emacs\\(client\\)?"))
+ (let ((erx "^p?emacs\\(client\\)?\\|\\(.* - emacs\\)"))
(if (or (string-match-p erx (jao-river-get-focused-title))
(string-match-p erx (jao-river-get-focused-app-id)))
(jao-shell-exec "riverctl focus-previous-tags")