From cec3955872e3bb5dc55d29a307ed3e4648d2d61f Mon Sep 17 00:00:00 2001 From: enricobuehler Date: Wed, 29 Jul 2026 11:36:22 +0200 Subject: [PATCH] =?UTF-8?q?feat(client/linux):=20the=20app=20icon=20reache?= =?UTF-8?q?s=20About=20=E2=80=94=20and=20the=20launcher,=20which=20never?= =?UTF-8?q?=20had=20it=20either?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Adding the icon to the About dialog turned out to be one line and a missing install: the icon existed, but only the flatpak ever shipped it. The deb, rpm, arch and nix entries all carried `Icon=video-display` — a stock monitor glyph — so on every non-flatpak install the launcher, the taskbar and the window switcher have been showing a generic icon this whole time. About would have shown the same nothing. So the icon moves out of `packaging/flatpak/` into `packaging/linux/icons/hicolor/` beside the tray icons, which is where a shared asset belongs, and all five packagings install it to the same hicolor path. The desktop entry names the app's own icon, and `AboutDialog` names the app id — one identity resolved through the icon theme rather than a path anyone has to keep in step. A `PUNKTFUNK_SHOT_SCENE=about` scene comes along so the dialog is capturable like every other surface; that is how the icon above was verified to actually resolve rather than silently falling back. Co-Authored-By: Claude Opus 5 (1M context) --- clients/linux/src/cli.rs | 3 +++ clients/linux/src/ui_settings.rs | 4 ++++ packaging/arch/PKGBUILD | 3 +++ packaging/debian/build-client-deb.sh | 4 ++++ packaging/flatpak/io.unom.Punktfunk.yml | 4 +++- .../icons/hicolor/scalable/apps}/io.unom.Punktfunk.svg | 0 packaging/linux/io.unom.Punktfunk.desktop | 2 +- packaging/nix/packages.nix | 4 ++++ packaging/rpm/punktfunk.spec | 5 +++++ 9 files changed, 27 insertions(+), 2 deletions(-) rename packaging/{flatpak => linux/icons/hicolor/scalable/apps}/io.unom.Punktfunk.svg (100%) diff --git a/clients/linux/src/cli.rs b/clients/linux/src/cli.rs index 89889fa5..7eea44d1 100644 --- a/clients/linux/src/cli.rs +++ b/clients/linux/src/cli.rs @@ -531,6 +531,9 @@ pub fn run_shot(ctx: &ShotCtx, scene: &str) { "00aabbccddeeff112233445566778899a0b1c2d3e4f5061728394a5b6c7d8e9f", ))); } + "about" | "08-about" => { + crate::ui_settings::show_about(&ctx.window); + } "settings" | "03-settings" => { // Mock devices so the shot shows the probe-dependent pickers populated. let dev = |name: &str, description: &str| pf_client_core::audio::AudioDevice { diff --git a/clients/linux/src/ui_settings.rs b/clients/linux/src/ui_settings.rs index eae3d5d9..759e3c06 100644 --- a/clients/linux/src/ui_settings.rs +++ b/clients/linux/src/ui_settings.rs @@ -707,6 +707,10 @@ const THIRD_PARTY_NOTICES: &str = include_str!("../../../THIRD-PARTY-NOTICES.txt pub fn show_about(parent: &impl IsA) { let about = adw::AboutDialog::builder() .application_name("Punktfunk") + // The app's own icon, by the id the desktop entry and the icon theme both use. It + // resolves from the installed hicolor icon; an uninstalled dev run simply shows the + // generic fallback rather than nothing. + .application_icon(crate::app::APP_ID) .developer_name("unom") .version(env!("CARGO_PKG_VERSION")) .website("https://git.unom.io/unom/punktfunk") diff --git a/packaging/arch/PKGBUILD b/packaging/arch/PKGBUILD index 45a3a8cb..3987e917 100644 --- a/packaging/arch/PKGBUILD +++ b/packaging/arch/PKGBUILD @@ -253,6 +253,9 @@ package_punktfunk-client() { install -Dm0755 "$T/punktfunk-session" "$pkgdir/usr/bin/punktfunk-session" # The headless CLI (design/client-architecture-split.md §4). install -Dm0755 "$T/punktfunk" "$pkgdir/usr/bin/punktfunk" + # The app icon the desktop entry (and the About dialog) name. + install -Dm0644 "$R/packaging/linux/icons/hicolor/scalable/apps/io.unom.Punktfunk.svg" \ + "$pkgdir/usr/share/icons/hicolor/scalable/apps/io.unom.Punktfunk.svg" install -Dm0644 "$R/packaging/linux/io.unom.Punktfunk.desktop" \ "$pkgdir/usr/share/applications/io.unom.Punktfunk.desktop" # DualSense hidraw access (full pad fidelity through SDL's HIDAPI driver). diff --git a/packaging/debian/build-client-deb.sh b/packaging/debian/build-client-deb.sh index aab5129a..1c911b84 100644 --- a/packaging/debian/build-client-deb.sh +++ b/packaging/debian/build-client-deb.sh @@ -55,6 +55,10 @@ install -Dm0755 "$SESSION_BIN" "$STAGE/usr/bin/punktfu install -Dm0755 "$CLI_BIN" "$STAGE/usr/bin/punktfunk" install -Dm0644 packaging/linux/io.unom.Punktfunk.desktop \ "$STAGE/usr/share/applications/io.unom.Punktfunk.desktop" +# The app icon the desktop entry (and the About dialog) name. Without it the launcher falls +# back to a generic monitor glyph, which is what shipped until now. +install -Dm0644 packaging/linux/icons/hicolor/scalable/apps/io.unom.Punktfunk.svg \ + "$STAGE/usr/share/icons/hicolor/scalable/apps/io.unom.Punktfunk.svg" # DualSense hidraw access (full pad fidelity through SDL's HIDAPI driver). install -Dm0644 scripts/70-punktfunk-client.rules \ "$STAGE/usr/lib/udev/rules.d/70-punktfunk-client.rules" diff --git a/packaging/flatpak/io.unom.Punktfunk.yml b/packaging/flatpak/io.unom.Punktfunk.yml index 050deae5..3d5b75ed 100644 --- a/packaging/flatpak/io.unom.Punktfunk.yml +++ b/packaging/flatpak/io.unom.Punktfunk.yml @@ -235,7 +235,9 @@ modules: - install -Dm0644 packaging/flatpak/io.unom.Punktfunk.metainfo.xml ${FLATPAK_DEST}/share/metainfo/io.unom.Punktfunk.metainfo.xml # Scalable icon named for the app id (GNOME runtime renders SVG via librsvg). - - install -Dm0644 packaging/flatpak/io.unom.Punktfunk.svg + # One icon source for every Linux packaging (it used to live under packaging/flatpak, + # which is why the deb/rpm/arch entries shipped a stock `video-display` instead). + - install -Dm0644 packaging/linux/icons/hicolor/scalable/apps/io.unom.Punktfunk.svg ${FLATPAK_DEST}/share/icons/hicolor/scalable/apps/io.unom.Punktfunk.svg sources: # The repo checkout. For a Flathub/published build, replace with a pinned git source: diff --git a/packaging/flatpak/io.unom.Punktfunk.svg b/packaging/linux/icons/hicolor/scalable/apps/io.unom.Punktfunk.svg similarity index 100% rename from packaging/flatpak/io.unom.Punktfunk.svg rename to packaging/linux/icons/hicolor/scalable/apps/io.unom.Punktfunk.svg diff --git a/packaging/linux/io.unom.Punktfunk.desktop b/packaging/linux/io.unom.Punktfunk.desktop index eac86d1a..6ef2073b 100644 --- a/packaging/linux/io.unom.Punktfunk.desktop +++ b/packaging/linux/io.unom.Punktfunk.desktop @@ -3,7 +3,7 @@ Type=Application Name=Punktfunk Comment=Stream a remote punktfunk host Exec=punktfunk-client %u -Icon=video-display +Icon=io.unom.Punktfunk Terminal=false Categories=Network;Game; Keywords=streaming;remote;game;moonlight; diff --git a/packaging/nix/packages.nix b/packaging/nix/packages.nix index f8f0e74e..a5acdbdd 100644 --- a/packaging/nix/packages.nix +++ b/packaging/nix/packages.nix @@ -258,6 +258,10 @@ in # hidraw access for the seated user's DualSense (SDL HIDAPI full-fidelity path). install -Dm0644 scripts/70-punktfunk-client.rules "$out/lib/udev/rules.d/70-punktfunk-client.rules" + # The app icon the desktop entry (and the About dialog) name. + install -Dm0644 packaging/linux/icons/hicolor/scalable/apps/io.unom.Punktfunk.svg \ + "$out/share/icons/hicolor/scalable/apps/io.unom.Punktfunk.svg" + # Desktop launcher — point Exec at the store binary (wrapped below). install -Dm0644 packaging/linux/io.unom.Punktfunk.desktop \ "$out/share/applications/io.unom.Punktfunk.desktop" diff --git a/packaging/rpm/punktfunk.spec b/packaging/rpm/punktfunk.spec index b95eb7ff..b0d7aa4a 100644 --- a/packaging/rpm/punktfunk.spec +++ b/packaging/rpm/punktfunk.spec @@ -331,6 +331,10 @@ install -Dm0755 target/release/punktfunk-session %{buildroot}%{_bindir}/punktfun install -Dm0755 target/release/punktfunk %{buildroot}%{_bindir}/punktfunk install -Dm0644 packaging/linux/io.unom.Punktfunk.desktop \ %{buildroot}%{_datadir}/applications/io.unom.Punktfunk.desktop +# The app icon the desktop entry (and the About dialog) name. Without it the launcher falls +# back to a generic monitor glyph, which is what shipped until now. +install -Dm0644 packaging/linux/icons/hicolor/scalable/apps/io.unom.Punktfunk.svg \ + %{buildroot}%{_datadir}/icons/hicolor/scalable/apps/io.unom.Punktfunk.svg # DualSense hidraw access (full pad fidelity through SDL's HIDAPI driver). install -Dm0644 scripts/70-punktfunk-client.rules \ %{buildroot}%{_udevrulesdir}/70-punktfunk-client.rules @@ -447,6 +451,7 @@ install -Dm0644 scripts/punktfunk-scripting.service %{buildroot}%{_userunitdir}/ %{_bindir}/punktfunk-client %{_bindir}/punktfunk-session %{_datadir}/applications/io.unom.Punktfunk.desktop +%{_datadir}/icons/hicolor/scalable/apps/io.unom.Punktfunk.svg %{_udevrulesdir}/70-punktfunk-client.rules %{_prefix}/lib/sysctl.d/99-punktfunk-client-net.conf