From b68e4b4af9ffe0b52f5f351b9f020769c927b196 Mon Sep 17 00:00:00 2001 From: Jake Stanger Date: Mon, 14 Jul 2025 19:27:51 +0100 Subject: [PATCH 1/3] chore(deps): update `system-tray` --- Cargo.lock | 5 +++-- Cargo.toml | 2 +- src/modules/tray/icon.rs | 9 ++++----- src/modules/tray/mod.rs | 8 +++++--- 4 files changed, 13 insertions(+), 11 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 0bce5ae..ae54749 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3348,10 +3348,11 @@ dependencies = [ [[package]] name = "system-tray" -version = "0.7.0" +version = "0.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3397841ed755bf361606a845779e0f7333d35fb4e39627ef6f656d7cdad4c73" +checksum = "90d5d024b1573d22079347055d817863c21ea0903df404668095499c08800e4a" dependencies = [ + "cfg-if", "dbusmenu-gtk3-sys", "futures-lite", "gtk", diff --git a/Cargo.toml b/Cargo.toml index fc6c1cb..55fe78a 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -177,7 +177,7 @@ futures-signals = { version = "0.3.34", optional = true } sysinfo = { version = "0.36.0", optional = true } # tray -system-tray = { version = "0.7.0", features = ["dbusmenu-gtk3"], optional = true } +system-tray = { version = "0.8.1", features = ["dbusmenu-gtk3"], optional = true } # volume libpulse-binding = { version = "2.30.1", optional = true } diff --git a/src/modules/tray/icon.rs b/src/modules/tray/icon.rs index 4586f23..e7932dd 100644 --- a/src/modules/tray/icon.rs +++ b/src/modules/tray/icon.rs @@ -11,6 +11,7 @@ use std::collections::HashSet; use std::ffi::CStr; use std::os::raw::{c_char, c_int}; use std::ptr; +use system_tray::item::IconPixmap; /// Gets the GTK icon theme search paths by calling the FFI function. /// Conveniently returns the result as a `HashSet`. @@ -45,10 +46,10 @@ pub fn get_image( icon_theme: &IconTheme, ) -> Result { if !prefer_icons && item.icon_pixmap.is_some() { - get_image_from_pixmap(item, size) + get_image_from_pixmap(item.icon_pixmap.as_deref(), size) } else { get_image_from_icon_name(item, size, icon_theme) - .or_else(|_| get_image_from_pixmap(item, size)) + .or_else(|_| get_image_from_pixmap(item.icon_pixmap.as_deref(), size)) } } @@ -81,12 +82,10 @@ fn get_image_from_icon_name(item: &TrayMenu, size: u32, icon_theme: &IconTheme) /// which has 8 bits per sample and a bit stride of `4*width`. /// The Pixbuf expects RGBA32 format, so some channel shuffling /// is required. -fn get_image_from_pixmap(item: &TrayMenu, size: u32) -> Result { +fn get_image_from_pixmap(item: Option<&[IconPixmap]>, size: u32) -> Result { const BITS_PER_SAMPLE: i32 = 8; let pixmap = item - .icon_pixmap - .as_ref() .and_then(|pixmap| pixmap.first()) .ok_or_else(|| Report::msg("Failed to get pixmap from tray icon"))?; diff --git a/src/modules/tray/mod.rs b/src/modules/tray/mod.rs index b0159f1..d42f7cb 100644 --- a/src/modules/tray/mod.rs +++ b/src/modules/tray/mod.rs @@ -181,9 +181,11 @@ fn on_update( UpdateEvent::AttentionIcon(_icon) => { warn!("received unimplemented NewAttentionIcon event"); } - UpdateEvent::Icon(icon) => { - if icon.as_ref() != menu_item.icon_name() { - menu_item.set_icon_name(icon); + UpdateEvent::Icon { icon_name, icon_pixmap} => { + menu_item.icon_pixmap = icon_pixmap; + + if icon_name.as_ref() != menu_item.icon_name() { + menu_item.set_icon_name(icon_name); match icon::get_image(menu_item, icon_size, prefer_icons, icon_theme) { Ok(image) => menu_item.set_image(&image), Err(_) => menu_item.show_label(), From 3a3888a2d605f528a659ad8a16615eb5530975a1 Mon Sep 17 00:00:00 2001 From: Jake Stanger Date: Mon, 14 Jul 2025 19:55:25 +0100 Subject: [PATCH 2/3] chore: update deps --- Cargo.lock | 156 ++++++++++++++++++++++----------------------- Cargo.toml | 10 +-- src/config/impl.rs | 15 ++--- 3 files changed, 86 insertions(+), 95 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index ae54749..700ac5a 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -265,9 +265,9 @@ checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" [[package]] name = "bitflags" -version = "2.9.0" +version = "2.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c8214115b7bf84099f1309324e63141d4c5d7cc26862f97a0a857dbefe165bd" +checksum = "1b8e56985ec62d17e9c1001dc89c88ecd7dc08e47eba5ec7c29c7b5eeecde967" dependencies = [ "serde", ] @@ -309,7 +309,7 @@ version = "0.18.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8ca26ef0159422fb77631dc9d17b102f253b876fe1586b03b803e63a309b4ee2" dependencies = [ - "bitflags 2.9.0", + "bitflags 2.9.1", "cairo-sys-rs", "glib", "libc", @@ -330,11 +330,11 @@ dependencies = [ [[package]] name = "calloop" -version = "0.12.4" +version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fba7adb4dd5aa98e5553510223000e7148f621165ec5f9acd7113f6ca4995298" +checksum = "b99da2f8558ca23c71f4fd15dc57c906239752dd27ff3c00a1d56b685b7cbfec" dependencies = [ - "bitflags 2.9.0", + "bitflags 2.9.1", "log", "polling", "rustix 0.38.44", @@ -344,9 +344,9 @@ dependencies = [ [[package]] name = "calloop-wayland-source" -version = "0.2.0" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0f0ea9b9476c7fad82841a8dbb380e2eae480c21910feba80725b46931ed8f02" +checksum = "95a66a987056935f7efce4ab5668920b5d0dac4a7c99991a67395f13702ddd20" dependencies = [ "calloop", "rustix 0.38.44", @@ -432,9 +432,9 @@ dependencies = [ [[package]] name = "clap_complete" -version = "4.5.54" +version = "4.5.55" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aad5b1b4de04fead402672b48897030eec1f3bfe1550776322f59f6d6e6a5677" +checksum = "a5abde44486daf70c5be8b8f8f1b66c49f86236edf6fa2abadb4d961c4c6229a" dependencies = [ "clap", ] @@ -827,11 +827,11 @@ dependencies = [ [[package]] name = "evdev-rs" -version = "0.6.1" +version = "0.6.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9812d5790fb6fcce449333eb6713dad335e8c979225ed98755c84a3987e06dba" +checksum = "53b9cb6084eed4e72c0306e1cbcd3fd4c8acb613044e66810f9f5d3c7896bfb7" dependencies = [ - "bitflags 1.3.2", + "bitflags 2.9.1", "evdev-sys", "libc", "log", @@ -839,9 +839,9 @@ dependencies = [ [[package]] name = "evdev-sys" -version = "0.2.5" +version = "0.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "14ead42b547b15d47089c1243d907bcf0eb94e457046d3b315a26ac9c9e9ea6d" +checksum = "cdcf0d489f4d9a80ac2b3b35b92fdd8fcf68d33bb67f947afe5cd36e482de576" dependencies = [ "cc", "libc", @@ -1237,7 +1237,7 @@ version = "0.18.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "233daaf6e83ae6a12a52055f568f9d7cf4671dabb78ff9560ab6da230ce00ee5" dependencies = [ - "bitflags 2.9.0", + "bitflags 2.9.1", "futures-channel", "futures-core", "futures-executor", @@ -1337,7 +1337,7 @@ version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bc759b3184830a547b31549ab40c4b54450ab702bba79ba23f049bc1d1e3ca98" dependencies = [ - "bitflags 2.9.0", + "bitflags 2.9.1", "gdk", "glib", "glib-sys 0.18.1", @@ -1789,7 +1789,7 @@ version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f37dccff2791ab604f9babef0ba14fbe0be30bd368dc541e2b08d07c8aa908f3" dependencies = [ - "bitflags 2.9.0", + "bitflags 2.9.1", "inotify-sys", "libc", ] @@ -1809,7 +1809,7 @@ version = "0.7.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b86e202f00093dcba4275d4636b93ef9dd75d025ae560d2521b45ea28ab49013" dependencies = [ - "bitflags 2.9.0", + "bitflags 2.9.1", "cfg-if", "libc", ] @@ -1876,7 +1876,7 @@ dependencies = [ "universal-config", "walkdir", "wayland-client", - "wayland-protocols-wlr 0.3.8", + "wayland-protocols-wlr", "zbus", ] @@ -1930,9 +1930,9 @@ checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe" [[package]] name = "libc" -version = "0.2.173" +version = "0.2.174" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d8cfeafaffdbc32176b64fb251369d52ea9f0a8fbc6f8759edffef7b525d64bb" +checksum = "1171693293099992e19cddea4e8b849964e9846f4acee11b3948bcc337be8776" [[package]] name = "libcorn" @@ -1963,7 +1963,7 @@ version = "2.30.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "909eb3049e16e373680fe65afe6e2a722ace06b671250cc4849557bc57d6a397" dependencies = [ - "bitflags 2.9.0", + "bitflags 2.9.1", "libc", "libpulse-sys", "num-derive", @@ -1990,7 +1990,7 @@ version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c0ff37bd590ca25063e35af745c343cb7a0271906fb7b37e4813e8f79f00268d" dependencies = [ - "bitflags 2.9.0", + "bitflags 2.9.1", "libc", ] @@ -2024,9 +2024,9 @@ dependencies = [ [[package]] name = "log" -version = "0.4.26" +version = "0.4.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "30bde2b3dc3671ae49d8e2e9f044c7c005836e7a023ee57cffa25ab82764bb9e" +checksum = "13dc2df351e3202783a1fe0d44375f7295ffb4049267b0f3018346dc122a1d94" [[package]] name = "lua-src" @@ -2099,9 +2099,9 @@ dependencies = [ [[package]] name = "mlua" -version = "0.10.5" +version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c1f5f8fbebc7db5f671671134b9321c4b9aa9adeafccfd9a8c020ae45c6a35d0" +checksum = "22fe7d52e09b3229ee7a6dfc5ba77fa250d8cd3478d3a509cc17934571a7ea0b" dependencies = [ "bstr", "either", @@ -2114,9 +2114,9 @@ dependencies = [ [[package]] name = "mlua-sys" -version = "0.6.8" +version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "380c1f7e2099cafcf40e51d3a9f20a346977587aa4d012eae1f043149a728a93" +checksum = "bcdf7c9e260ca82aaa32ac11148941952b856bb8c69aa5a9e65962f21fcb8637" dependencies = [ "cc", "cfg-if", @@ -2197,7 +2197,7 @@ version = "0.30.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "74523f3a35e05aba87a1d978330aef40f67b0304ac79c1c00b294c9830543db6" dependencies = [ - "bitflags 2.9.0", + "bitflags 2.9.1", "cfg-if", "cfg_aliases", "libc", @@ -2220,7 +2220,7 @@ version = "8.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3163f59cd3fa0e9ef8c32f242966a7b9994fd7378366099593e0e73077cd8c97" dependencies = [ - "bitflags 2.9.0", + "bitflags 2.9.1", "inotify", "kqueue", "libc", @@ -2288,7 +2288,7 @@ version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1c10c2894a6fed806ade6027bcd50662746363a9589d3ec9d9bef30a4e4bc166" dependencies = [ - "bitflags 2.9.0", + "bitflags 2.9.1", ] [[package]] @@ -2322,7 +2322,7 @@ version = "0.10.72" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fedfea7d58a1f73118430a55da6a286e7b044961736ce96a16a17068ea25e5da" dependencies = [ - "bitflags 2.9.0", + "bitflags 2.9.1", "cfg-if", "foreign-types", "libc", @@ -2712,7 +2712,7 @@ version = "0.5.10" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0b8c0c260b63a8219631167be35e6a988e9554dbd323f8bd08439c8ed1302bd1" dependencies = [ - "bitflags 2.9.0", + "bitflags 2.9.1", ] [[package]] @@ -2726,6 +2726,26 @@ dependencies = [ "thiserror 2.0.12", ] +[[package]] +name = "ref-cast" +version = "1.0.24" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4a0ae411dbe946a674d89546582cea4ba2bb8defac896622d6496f14c23ba5cf" +dependencies = [ + "ref-cast-impl", +] + +[[package]] +name = "ref-cast-impl" +version = "1.0.24" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1165225c21bff1f3bbce98f5a1f889949bc902d3575308cc7b0de30b4f6d27c7" +dependencies = [ + "proc-macro2", + "quote 1.0.39", + "syn 2.0.99", +] + [[package]] name = "regex" version = "1.11.1" @@ -2829,7 +2849,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "beceb6f7bf81c73e73aeef6dd1356d9a1b2b4909e1f0fc3e59b034f9572d7b7f" dependencies = [ "base64", - "bitflags 2.9.0", + "bitflags 2.9.1", "serde", "serde_derive", "unicode-ident", @@ -2862,7 +2882,7 @@ version = "0.38.44" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fdb5bc1ae2baa591800df16c9ca78619bf65c0488b41b96ccec5d11220d8c154" dependencies = [ - "bitflags 2.9.0", + "bitflags 2.9.1", "errno", "libc", "linux-raw-sys 0.4.15", @@ -2875,7 +2895,7 @@ version = "1.0.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c71e83d6afe7ff64890ec6b71d6a69bb8a610ab78ce364b3352876bb4c801266" dependencies = [ - "bitflags 2.9.0", + "bitflags 2.9.1", "errno", "libc", "linux-raw-sys 0.9.3", @@ -2944,11 +2964,12 @@ dependencies = [ [[package]] name = "schemars" -version = "0.8.22" +version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3fbf2ae1b8bc8e02df939598064d22402220cd5bbcca1c76f7d6a310974d5615" +checksum = "82d20c4491bc164fa2f6c5d44565947a52ad80b9505d8e36f8d54c27c739fcd0" dependencies = [ "dyn-clone", + "ref-cast", "schemars_derive", "serde", "serde_json", @@ -2956,9 +2977,9 @@ dependencies = [ [[package]] name = "schemars_derive" -version = "0.8.22" +version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "32e265784ad618884abaea0600a9adf15393368d840e0222d101a072f3f7534d" +checksum = "33d020396d1d138dc19f1165df7545479dcd58d93810dc5d646a16e55abefa80" dependencies = [ "proc-macro2", "quote 1.0.39", @@ -2978,7 +2999,7 @@ version = "2.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "897b2245f0b511c87893af39b033e5ca9cce68824c4d7e7630b5a1d339658d02" dependencies = [ - "bitflags 2.9.0", + "bitflags 2.9.1", "core-foundation", "core-foundation-sys", "libc", @@ -3147,11 +3168,11 @@ checksum = "7fcf8323ef1faaee30a44a340193b1ac6814fd9b7b4e88e9d4519a3e4abe1cfd" [[package]] name = "smithay-client-toolkit" -version = "0.18.1" +version = "0.19.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "922fd3eeab3bd820d76537ce8f582b1cf951eceb5475c28500c7457d9d17f53a" +checksum = "3457dea1f0eb631b4034d61d4d8c32074caa6cd1ab2d59f2327bd8461e2c0016" dependencies = [ - "bitflags 2.9.0", + "bitflags 2.9.1", "calloop", "calloop-wayland-source", "cursor-icon", @@ -3164,8 +3185,8 @@ dependencies = [ "wayland-client", "wayland-csd-frame", "wayland-cursor", - "wayland-protocols 0.31.2", - "wayland-protocols-wlr 0.2.0", + "wayland-protocols", + "wayland-protocols-wlr", "wayland-scanner", "xkeysym", ] @@ -3615,7 +3636,7 @@ version = "0.6.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5cc2d9e086a412a451384326f521c8123a99a466b329941a9403696bff9b0da2" dependencies = [ - "bitflags 2.9.0", + "bitflags 2.9.1", "bytes", "futures-util", "http", @@ -3999,7 +4020,7 @@ version = "0.31.10" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "978fa7c67b0847dbd6a9f350ca2569174974cd4082737054dbb7fbb79d7d9a61" dependencies = [ - "bitflags 2.9.0", + "bitflags 2.9.1", "rustix 0.38.44", "wayland-backend", "wayland-scanner", @@ -4011,7 +4032,7 @@ version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "625c5029dbd43d25e6aa9615e88b829a5cad13b2819c4ae129fdbb7c31ab4c7e" dependencies = [ - "bitflags 2.9.0", + "bitflags 2.9.1", "cursor-icon", "wayland-backend", ] @@ -4027,53 +4048,28 @@ dependencies = [ "xcursor", ] -[[package]] -name = "wayland-protocols" -version = "0.31.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f81f365b8b4a97f422ac0e8737c438024b5951734506b0e1d775c73030561f4" -dependencies = [ - "bitflags 2.9.0", - "wayland-backend", - "wayland-client", - "wayland-scanner", -] - [[package]] name = "wayland-protocols" version = "0.32.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "779075454e1e9a521794fed15886323ea0feda3f8b0fc1390f5398141310422a" dependencies = [ - "bitflags 2.9.0", + "bitflags 2.9.1", "wayland-backend", "wayland-client", "wayland-scanner", ] -[[package]] -name = "wayland-protocols-wlr" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad1f61b76b6c2d8742e10f9ba5c3737f6530b4c243132c2a2ccc8aa96fe25cd6" -dependencies = [ - "bitflags 2.9.0", - "wayland-backend", - "wayland-client", - "wayland-protocols 0.31.2", - "wayland-scanner", -] - [[package]] name = "wayland-protocols-wlr" version = "0.3.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1cb6cdc73399c0e06504c437fe3cf886f25568dd5454473d565085b36d6a8bbf" dependencies = [ - "bitflags 2.9.0", + "bitflags 2.9.1", "wayland-backend", "wayland-client", - "wayland-protocols 0.32.8", + "wayland-protocols", "wayland-scanner", ] @@ -4427,7 +4423,7 @@ version = "0.33.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3268f3d866458b787f390cf61f4bbb563b922d091359f9608842999eaee3943c" dependencies = [ - "bitflags 2.9.0", + "bitflags 2.9.1", ] [[package]] diff --git a/Cargo.toml b/Cargo.toml index 55fe78a..a85aada 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -138,7 +138,7 @@ walkdir = "2.5.0" notify = { version = "8.1.0", default-features = false } wayland-client = "0.31.1" wayland-protocols-wlr = { version = "0.3.8", features = ["client"] } -smithay-client-toolkit = { version = "0.18.1", default-features = false, features = [ +smithay-client-toolkit = { version = "0.19.2", default-features = false, features = [ "calloop", ] } universal-config = { version = "0.5.1", default-features = false } @@ -153,7 +153,7 @@ reqwest = { version = "0.12.22", default-features = false, features = ["default- # cairo lua-src = { version = "548.1.1", optional = true } -mlua = { version = "0.10.5", optional = true, features = ["luajit", "send"] } +mlua = { version = "0.11.0", optional = true, features = ["luajit", "send"] } cairo-rs = { version = "0.18.5", optional = true, features = ["png"] } # clock @@ -161,7 +161,7 @@ chrono = { version = "0.4.41", optional = true, default-features = false, featur # keyboard colpetto = { version = "0.6.0", features = ["tokio", "tracing"], optional = true } -evdev-rs = { version = "0.6.1", optional = true } +evdev-rs = { version = "0.6.2", optional = true } # music mpd-utils = { version = "0.2.1", optional = true } @@ -191,10 +191,10 @@ rustix = { version = "1.0.7", default-features = false, features = ["std", "fs", serde_json = { version = "1.0.140", optional = true } # ipc, niri # schema -schemars = { version = "0.8.22", optional = true } +schemars = { version = "1.0.4", optional = true } [build-dependencies] clap = { version = "4.5.41", features = ["derive"] } -clap_complete = "4.5.54" +clap_complete = "4.5.55" serde = { version = "1.0.219", features = ["derive"] } serde_json = "1.0.140" \ No newline at end of file diff --git a/src/config/impl.rs b/src/config/impl.rs index dd64599..2f13c16 100644 --- a/src/config/impl.rs +++ b/src/config/impl.rs @@ -52,16 +52,11 @@ where } #[cfg(feature = "schema")] -pub fn schema_layer(generator: &mut schemars::r#gen::SchemaGenerator) -> schemars::schema::Schema { - use schemars::JsonSchema; - let mut schema: schemars::schema::SchemaObject = ::json_schema(generator).into(); - schema.enum_values = Some(vec![ - "background".into(), - "bottom".into(), - "top".into(), - "overlay".into(), - ]); - schema.into() +pub fn schema_layer(_generator: &mut schemars::SchemaGenerator) -> schemars::Schema { + schemars::json_schema!({ + "type": "string", + "enum": ["background", "bottom", "top", "overlay"], + }) } impl BarPosition { From f1a8b42cfa29269e989ac92ff94cea8790f2d976 Mon Sep 17 00:00:00 2001 From: Jake Stanger Date: Mon, 14 Jul 2025 19:55:46 +0100 Subject: [PATCH 3/3] chore: clippy/fmt --- src/desktop_file.rs | 2 +- src/modules/tray/mod.rs | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/desktop_file.rs b/src/desktop_file.rs index 8b0a509..ce54730 100644 --- a/src/desktop_file.rs +++ b/src/desktop_file.rs @@ -328,7 +328,7 @@ fn files(dir: &Path) -> Vec { pub fn open_program(file_name: &str, str: &str) { let expanded = str.replace("{app_name}", file_name); let launch_command_parts: Vec<&str> = expanded.split_whitespace().collect(); - if let Err(err) = Command::new(&launch_command_parts[0]) + if let Err(err) = Command::new(launch_command_parts[0]) .args(&launch_command_parts[1..]) .stdout(Stdio::null()) .stderr(Stdio::null()) diff --git a/src/modules/tray/mod.rs b/src/modules/tray/mod.rs index d42f7cb..64893af 100644 --- a/src/modules/tray/mod.rs +++ b/src/modules/tray/mod.rs @@ -181,7 +181,10 @@ fn on_update( UpdateEvent::AttentionIcon(_icon) => { warn!("received unimplemented NewAttentionIcon event"); } - UpdateEvent::Icon { icon_name, icon_pixmap} => { + UpdateEvent::Icon { + icon_name, + icon_pixmap, + } => { menu_item.icon_pixmap = icon_pixmap; if icon_name.as_ref() != menu_item.icon_name() {