From 09a310e30a9de6fe421aa97ada61135ee321bdf1 Mon Sep 17 00:00:00 2001 From: shmall Date: Fri, 21 Aug 2026 11:47:30 +0100 Subject: [PATCH 1/4] Open links in a webapp window instead of a browser tab --- Panel.qml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Panel.qml b/Panel.qml index 7306b77..f0b3b42 100644 --- a/Panel.qml +++ b/Panel.qml @@ -113,7 +113,7 @@ Panel { function openUrl(url) { var value = String(url || "") if (value === "") return - Quickshell.execDetached(["omarchy-launch-browser", value]) + Quickshell.execDetached(["omarchy-launch-webapp", value]) close() } From 7977b20e8e42fbf0d57a149dbc20884f58f7f078 Mon Sep 17 00:00:00 2001 From: shmall Date: Fri, 21 Aug 2026 19:21:19 +0100 Subject: [PATCH 2/4] Make link opening configurable: browser tab, web app window, or focus existing --- Panel.qml | 9 ++++++++- README.md | 3 +++ manifest.json | 2 ++ 3 files changed, 13 insertions(+), 1 deletion(-) diff --git a/Panel.qml b/Panel.qml index f0b3b42..65cd656 100644 --- a/Panel.qml +++ b/Panel.qml @@ -113,7 +113,14 @@ Panel { function openUrl(url) { var value = String(url || "") if (value === "") return - Quickshell.execDetached(["omarchy-launch-webapp", value]) + var behavior = setting("linkBehavior", "Browser tab") + if (behavior === "Web app window") { + Quickshell.execDetached(["omarchy-launch-webapp", value]) + } else if (behavior === "Web app window (focus existing)") { + Quickshell.execDetached(["omarchy-launch-or-focus-webapp", "chrome-github", value]) + } else { + Quickshell.execDetached(["omarchy-launch-browser", value]) + } close() } diff --git a/README.md b/README.md index 0123fdb..b55f25c 100644 --- a/README.md +++ b/README.md @@ -135,6 +135,7 @@ Configure the widget through Omarchy's bar widget settings. Existing installatio | Setting | Default | | --- | --- | | Refresh interval | 900 seconds (15 minutes) | +| Open links | **Browser tab** | | Include archived repositories | Off | | Include forks | Off | | Repository scope | **Owned** | @@ -151,6 +152,8 @@ Configure the widget through Omarchy's bar widget settings. Existing installatio **All repositories** is also opt-in and starts six paginated Actions request streams per repository on every refresh. Combining it with **Owned and organizations** can consume substantial GitHub API capacity in large organizations. Use **Recent repositories** or **Off** for a bounded scan, and increase the refresh interval when broader monitoring is required. +**Open links** controls where notifications, pull requests, issues, workflow runs, and repositories open. The default **Browser tab** keeps the historical behavior in any browser. **Web app window** opens each link in a dedicated Chromium app window via `omarchy-launch-webapp`, and **Web app window (focus existing)** additionally reuses the running GitHub web app window instead of accumulating new ones. Both web app modes require a Chromium-based default browser; with any other default browser they fall back to launching Chromium directly. + Set these options from the command line after installing the plugin: ```bash diff --git a/manifest.json b/manifest.json index d5a45ef..938be3f 100644 --- a/manifest.json +++ b/manifest.json @@ -20,6 +20,7 @@ "defaultSection": "right", "defaults": { "refreshIntervalSec": 900, + "linkBehavior": "Browser tab", "includeArchived": false, "includeForks": false, "repositoryScope": "Owned", @@ -34,6 +35,7 @@ }, "schema": [ { "key": "refreshIntervalSec", "type": "integer", "label": "Refresh interval (seconds)", "min": 60, "max": 3600, "step": 60, "defaultValue": 900 }, + { "key": "linkBehavior", "type": "enum", "label": "Open links", "options": ["Browser tab", "Web app window", "Web app window (focus existing)"], "defaultValue": "Browser tab", "description": "Open links in a browser tab, in a dedicated web app window, or in an existing web app window when one is already open. The web app modes require a Chromium-based default browser." }, { "key": "includeArchived", "type": "boolean", "label": "Include archived repositories", "defaultValue": false }, { "key": "includeForks", "type": "boolean", "label": "Include forked repositories", "defaultValue": false }, { "key": "repositoryScope", "type": "enum", "label": "Repository scope", "options": ["Owned", "Owned and organizations"], "defaultValue": "Owned", "description": "List only repositories you own, or include organization repositories. This scope also supplies candidates for Actions scanning." }, From b2c51d15c178d46e2e0226bec51113cf9eaa8829 Mon Sep 17 00:00:00 2001 From: shmall Date: Fri, 21 Aug 2026 19:39:00 +0100 Subject: [PATCH 3/4] Reuse a single web app window that always shows the clicked link --- Panel.qml | 5 +++-- README.md | 2 +- manifest.json | 2 +- omarchy-github-open | 25 +++++++++++++++++++++++++ 4 files changed, 30 insertions(+), 4 deletions(-) create mode 100755 omarchy-github-open diff --git a/Panel.qml b/Panel.qml index 65cd656..69e4da0 100644 --- a/Panel.qml +++ b/Panel.qml @@ -116,8 +116,9 @@ Panel { var behavior = setting("linkBehavior", "Browser tab") if (behavior === "Web app window") { Quickshell.execDetached(["omarchy-launch-webapp", value]) - } else if (behavior === "Web app window (focus existing)") { - Quickshell.execDetached(["omarchy-launch-or-focus-webapp", "chrome-github", value]) + } else if (behavior === "Web app window (reuse)") { + var opener = Qt.resolvedUrl("omarchy-github-open").toString().replace(/^file:\/\//, "") + Quickshell.execDetached([opener, value]) } else { Quickshell.execDetached(["omarchy-launch-browser", value]) } diff --git a/README.md b/README.md index b55f25c..5e1ac31 100644 --- a/README.md +++ b/README.md @@ -152,7 +152,7 @@ Configure the widget through Omarchy's bar widget settings. Existing installatio **All repositories** is also opt-in and starts six paginated Actions request streams per repository on every refresh. Combining it with **Owned and organizations** can consume substantial GitHub API capacity in large organizations. Use **Recent repositories** or **Off** for a bounded scan, and increase the refresh interval when broader monitoring is required. -**Open links** controls where notifications, pull requests, issues, workflow runs, and repositories open. The default **Browser tab** keeps the historical behavior in any browser. **Web app window** opens each link in a dedicated Chromium app window via `omarchy-launch-webapp`, and **Web app window (focus existing)** additionally reuses the running GitHub web app window instead of accumulating new ones. Both web app modes require a Chromium-based default browser; with any other default browser they fall back to launching Chromium directly. +**Open links** controls where notifications, pull requests, issues, workflow runs, and repositories open. The default **Browser tab** keeps the historical behavior in any browser. **Web app window** opens each link in a dedicated Chromium app window via `omarchy-launch-webapp`, and **Web app window (reuse)** keeps a single web app window: any open GitHub web app window is closed and the clicked link opens in a fresh one. Both web app modes require a Chromium-based default browser; with any other default browser they fall back to launching Chromium directly. Set these options from the command line after installing the plugin: diff --git a/manifest.json b/manifest.json index 938be3f..0bc9952 100644 --- a/manifest.json +++ b/manifest.json @@ -35,7 +35,7 @@ }, "schema": [ { "key": "refreshIntervalSec", "type": "integer", "label": "Refresh interval (seconds)", "min": 60, "max": 3600, "step": 60, "defaultValue": 900 }, - { "key": "linkBehavior", "type": "enum", "label": "Open links", "options": ["Browser tab", "Web app window", "Web app window (focus existing)"], "defaultValue": "Browser tab", "description": "Open links in a browser tab, in a dedicated web app window, or in an existing web app window when one is already open. The web app modes require a Chromium-based default browser." }, + { "key": "linkBehavior", "type": "enum", "label": "Open links", "options": ["Browser tab", "Web app window", "Web app window (reuse)"], "defaultValue": "Browser tab", "description": "Open links in a browser tab, in a dedicated web app window, or reusing a single web app window that always shows the clicked link. The web app modes require Hyprland and a Chromium-based default browser." }, { "key": "includeArchived", "type": "boolean", "label": "Include archived repositories", "defaultValue": false }, { "key": "includeForks", "type": "boolean", "label": "Include forked repositories", "defaultValue": false }, { "key": "repositoryScope", "type": "enum", "label": "Repository scope", "options": ["Owned", "Owned and organizations"], "defaultValue": "Owned", "description": "List only repositories you own, or include organization repositories. This scope also supplies candidates for Actions scanning." }, diff --git a/omarchy-github-open b/omarchy-github-open new file mode 100755 index 0000000..e71ff6c --- /dev/null +++ b/omarchy-github-open @@ -0,0 +1,25 @@ +#!/bin/bash +# Reuse a single GitHub web app window: close any open GitHub web app +# windows, then open url in a fresh one so the window always shows the +# link that was clicked. +# omarchy:args= + +url="$1" + +if [[ -z $url ]]; then + exit 0 +fi + +pattern='chrome-github\.com__' + +addresses=$(hyprctl clients -j | jq -r --arg p "$pattern" '.[] | select(.class | test($p)) | .address') + +while IFS= read -r addr; do + [[ -n $addr ]] || continue + hyprctl dispatch "hl.dsp.window.close({ window = \"address:$addr\" })" >/dev/null 2>&1 || + hyprctl dispatch "closewindow address:$addr" >/dev/null 2>&1 +done <<<"$addresses" + +sleep 0.25 + +exec omarchy-launch-webapp "$url" From 6c5670a50bea72b24a2cb5f3e80ff1f6edbcb102 Mon Sep 17 00:00:00 2001 From: shmall Date: Sat, 22 Aug 2026 00:08:46 +0100 Subject: [PATCH 4/4] Address review findings on the reused web app window --- Panel.qml | 2 +- Service.qml | 2 +- omarchy-github-open | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Panel.qml b/Panel.qml index 69e4da0..efe71fc 100644 --- a/Panel.qml +++ b/Panel.qml @@ -117,7 +117,7 @@ Panel { if (behavior === "Web app window") { Quickshell.execDetached(["omarchy-launch-webapp", value]) } else if (behavior === "Web app window (reuse)") { - var opener = Qt.resolvedUrl("omarchy-github-open").toString().replace(/^file:\/\//, "") + var opener = decodeURIComponent(Qt.resolvedUrl("omarchy-github-open").toString().replace(/^file:\/\//, "")) Quickshell.execDetached([opener, value]) } else { Quickshell.execDetached(["omarchy-launch-browser", value]) diff --git a/Service.qml b/Service.qml index 35d945d..95ae579 100644 --- a/Service.qml +++ b/Service.qml @@ -103,7 +103,7 @@ Item { } function helperPath() { - return Qt.resolvedUrl("omarchy-github-fetch").toString().replace(/^file:\/\//, ""); + return decodeURIComponent(Qt.resolvedUrl("omarchy-github-fetch").toString().replace(/^file:\/\//, "")); } function command() { diff --git a/omarchy-github-open b/omarchy-github-open index e71ff6c..c387b40 100755 --- a/omarchy-github-open +++ b/omarchy-github-open @@ -10,7 +10,7 @@ if [[ -z $url ]]; then exit 0 fi -pattern='chrome-github\.com__' +pattern='github\.com__' addresses=$(hyprctl clients -j | jq -r --arg p "$pattern" '.[] | select(.class | test($p)) | .address')