diff options
-rw-r--r-- | lib/eos/jao-wayland.el | 11 |
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") |