Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion Panel.qml
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,15 @@ Panel {
function openUrl(url) {
var value = String(url || "")
if (value === "") return
Quickshell.execDetached(["omarchy-launch-browser", value])
var behavior = setting("linkBehavior", "Browser tab")
if (behavior === "Web app window") {
Quickshell.execDetached(["omarchy-launch-webapp", value])
} else if (behavior === "Web app window (reuse)") {
var opener = decodeURIComponent(Qt.resolvedUrl("omarchy-github-open").toString().replace(/^file:\/\//, ""))
Quickshell.execDetached([opener, value])
} else {
Quickshell.execDetached(["omarchy-launch-browser", value])
}
close()
}

Expand Down
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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** |
Expand All @@ -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 (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:

```bash
Expand Down
2 changes: 1 addition & 1 deletion Service.qml
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down
2 changes: 2 additions & 0 deletions manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
"defaultSection": "right",
"defaults": {
"refreshIntervalSec": 900,
"linkBehavior": "Browser tab",
"includeArchived": false,
"includeForks": false,
"repositoryScope": "Owned",
Expand All @@ -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 (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." },
Expand Down
25 changes: 25 additions & 0 deletions omarchy-github-open
Original file line number Diff line number Diff line change
@@ -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>

url="$1"

if [[ -z $url ]]; then
exit 0
fi

pattern='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"