From f56d1fae4140380a08764e2e6a4f96e91ffb178b Mon Sep 17 00:00:00 2001 From: jao Date: Tue, 25 Jul 2023 04:39:34 +0100 Subject: wayland updates --- lib/eos/jao-wayland.el | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'lib') 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 ;; 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") -- cgit v1.2.3