summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJulien <contact@julienpro.com>2023-07-09 00:15:44 +0200
committerJulien <contact@julienpro.com>2023-07-09 00:15:44 +0200
commit2deebb03dce91cda8b423fd51629f41f6235f5cd (patch)
treef426bcba384ef37cdcf9b5278ec984f744e5a574
parent488b21b9a5af27d177054e22bd1febd72b3aba39 (diff)
Added x-focus-name-nth command
-rw-r--r--db.py12
1 files changed, 12 insertions, 0 deletions
diff --git a/db.py b/db.py
index 885a085..e162539 100644
--- a/db.py
+++ b/db.py
@@ -239,6 +239,18 @@ def commands():
"tags": ["x11", "windows", "wmctrl" ]
},
{
+ "name": "x-focus-name-nth",
+ "description": "Give focus to the bth Window (by name)",
+ "forwarded_arguments": [
+ { "name": "WinName", "description": "The substring to match the Window Name"},
+ { "name": "Nth", "description": "The index of the window"}
+ ],
+ "command": "wmctrl -lx |grep -v wmctrl | grep -v x-get-winid | grep '#1#' | cut -d ' ' -f1 | head -#2# | tail -1 | xargs wmctrl -i -a",
+ "versions_working": [("x11", "all")],
+ "versions_not_working": [],
+ "tags": ["x11", "windows", "wmctrl" ]
+ },
+ {
"name": "x-current-focus-id",
"description": "Get the WinID having the focus",
"command": "xprop -root _NET_ACTIVE_WINDOW |cut -d ' ' -f5",