Fix: Corrected opened URL and Added assets for Sunshine
This commit is contained in:
@@ -6,44 +6,24 @@ import Quickshell.Services.SystemTray
|
||||
import Quickshell.Widgets
|
||||
import "../../config"
|
||||
|
||||
// A curated stand-in for the full system tray (see Tray.qml) — just the
|
||||
// couple of apps worth one click away, rather than every SNI item any
|
||||
// background app happens to register. Each entry shows that app's own live
|
||||
// tray icon (and forwards clicks to it, same as Tray.qml) while it's
|
||||
// running; when it isn't, it falls back to the app's static icon, dimmed,
|
||||
// and a click launches it instead of doing nothing.
|
||||
|
||||
RowLayout {
|
||||
id: root
|
||||
spacing: Appearance.spacing * 1.
|
||||
|
||||
// name: matched case-insensitively against a tray item's id/title to
|
||||
// find this app's live icon, once it's running.
|
||||
// icon: themed icon name shown in place of a live tray icon.
|
||||
// launch: command run on left-click while not running.
|
||||
// secondary: optional command run on right-click, regardless of running
|
||||
// state, in place of forwarding to the tray item's own
|
||||
// secondaryActivate() (which for most apps' tray icons does
|
||||
// nothing useful anyway).
|
||||
|
||||
readonly property var pinned: [
|
||||
{
|
||||
name: "Bitwarden",
|
||||
// The system "bitwarden" icon (any size) bakes in a ~10% safe
|
||||
// margin around the shield, like most launcher icons do — fine
|
||||
// on a desktop grid, but next to Bitwarden's own edge-to-edge
|
||||
// tray icon it reads as noticeably smaller in the same box. This
|
||||
// is that same icon (the 1024x1024 source, for a clean
|
||||
// downscale) with that transparent margin trimmed off, so it
|
||||
// fills its slot exactly like the live tray icon does.
|
||||
icon: Qt.resolvedUrl("../../assets/bitwarden.png"),
|
||||
launch: ["bitwarden"],
|
||||
},
|
||||
{
|
||||
name: "Sunshine",
|
||||
icon: "dev.lizardbyte.app.Sunshine",
|
||||
|
||||
icon: Qt.resolvedUrl("../../assets/sunshine.svg"),
|
||||
launch: ["systemctl", "--user", "start", "app-dev.lizardbyte.app.Sunshine.service"],
|
||||
// Sunshine is configured entirely through its web UI — there's
|
||||
// no separate desktop app to "open" here.
|
||||
secondary: ["xdg-open", "https://localhost:47990"],
|
||||
secondary: ["xdg-open", "https://xol.twhomelab.local:47990"],
|
||||
},
|
||||
]
|
||||
|
||||
@@ -70,10 +50,6 @@ RowLayout {
|
||||
|
||||
IconImage {
|
||||
anchors.fill: parent
|
||||
// icon may be a plain theme name (looked up via
|
||||
// Quickshell.iconPath) or a file:// URL straight to a
|
||||
// specific asset (Bitwarden, above) — Quickshell.iconPath()
|
||||
// only understands theme names, so a URL is used as-is.
|
||||
source: slot.running
|
||||
? slot.trayItem.icon
|
||||
: (slot.modelData.icon.includes("://")
|
||||
|
||||
Reference in New Issue
Block a user