feat: app icon + Arch package (PKGBUILD + .desktop)

Add a desktop/taskbar identity and a system package for PeerSpeak.

- assets/icons/peerspeak.svg: master app icon — the in-app mic glyph
  over a P2P mesh of peer nodes, Catppuccin Mocha palette. Rendered to
  the hicolor raster sizes (16..512) committed alongside it.
- Window/taskbar icon: embed a 128x128 straight-RGBA blob and load it
  via iced from_rgba (keeps us off iced's heavy `image` feature). Set
  the Wayland/X11 app_id to "peerspeak" so compositors match the window
  to the .desktop launcher and show the icon natively.
- packaging/peerspeak.desktop: launcher (StartupWMClass=peerspeak).
- packaging/PKGBUILD: peerspeak-git VCS package — cargo --frozen build,
  --lib check, installs the binary, .desktop, and hicolor icons.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
2026-06-12 20:01:26 -04:00
co-authored by Claude Opus 4.8
parent a757353c69
commit 02065d23bc
13 changed files with 137 additions and 0 deletions
+17
View File
@@ -336,6 +336,15 @@ pub fn run_gui() -> iced::Result {
// dock doesn't squeeze the controls column). Layout is responsive.
size: init_size,
position: iced::window::Position::Centered,
// App/taskbar icon (mainly used on X11/XWayland; native Wayland takes
// the icon from the .desktop file matched by app_id instead).
icon: window_icon(),
// app_id must match the .desktop basename so Wayland compositors
// (e.g. KWin) attach our launcher icon to the window.
platform_specific: iced::window::settings::PlatformSpecific {
application_id: "peerspeak".to_string(),
..Default::default()
},
// We save the final size ourselves on CloseRequested, then exit.
exit_on_close_request: false,
..Default::default()
@@ -343,6 +352,14 @@ pub fn run_gui() -> iced::Result {
.run()
}
/// Build the window icon from an embedded 128×128 straight-RGBA blob rendered
/// from `assets/icons/peerspeak.svg`. Using `from_rgba` (always available) keeps
/// us off iced's heavy `image` feature — the blob is raw pixels, no decoder.
fn window_icon() -> Option<iced::window::Icon> {
const RGBA: &[u8] = include_bytes!("../../assets/icons/peerspeak-128.rgba");
iced::window::icon::from_rgba(RGBA.to_vec(), 128, 128).ok()
}
fn subscription(_state: &AppState) -> Subscription<AppMessage> {
let core_sub = Subscription::run(core_subscription).map(AppMessage::UiEventReceived);
let event_sub = iced::event::listen().map(AppMessage::EventOccurred);