From 587cc98185bb830b43af181793d7fa516d4717c5 Mon Sep 17 00:00:00 2001 From: dogknowsnx Date: Tue, 1 Jul 2025 22:14:41 +0200 Subject: [PATCH] Waybar: add icon-related patches (one of which fixes crash) --- srcpkgs/Waybar/patches/fix-default-icon.patch | 14 ++++++++++++++ srcpkgs/Waybar/patches/fix-network-icons.patch | 17 +++++++++++++++++ srcpkgs/Waybar/template | 2 +- 3 files changed, 32 insertions(+), 1 deletion(-) create mode 100644 srcpkgs/Waybar/patches/fix-default-icon.patch create mode 100644 srcpkgs/Waybar/patches/fix-network-icons.patch diff --git a/srcpkgs/Waybar/patches/fix-default-icon.patch b/srcpkgs/Waybar/patches/fix-default-icon.patch new file mode 100644 index 00000000000..15a0994e044 --- /dev/null +++ b/srcpkgs/Waybar/patches/fix-default-icon.patch @@ -0,0 +1,14 @@ +https://github.com/Alexays/Waybar/pull/4234 +--- a/src/util/gtk_icon.cpp ++++ b/src/util/gtk_icon.cpp +@@ -25,6 +25,10 @@ Glib::RefPtr DefaultGtkIconThemeWrapper::load_icon( + + auto icon_info = default_theme->lookup_icon(name, tmp_size, flags); + ++ if (icon_info == nullptr) { ++ return default_theme->load_icon(name, tmp_size, flags); ++ } ++ + if (style.get() == nullptr) { + return icon_info.load_icon(); + } diff --git a/srcpkgs/Waybar/patches/fix-network-icons.patch b/srcpkgs/Waybar/patches/fix-network-icons.patch new file mode 100644 index 00000000000..90d9fad07e8 --- /dev/null +++ b/srcpkgs/Waybar/patches/fix-network-icons.patch @@ -0,0 +1,17 @@ +https://github.com/Alexays/Waybar/pull/4258 +--- a/src/modules/network.cpp ++++ b/src/modules/network.cpp +@@ -272,11 +272,9 @@ void waybar::modules::Network::worker() { + + const std::string waybar::modules::Network::getNetworkState() const { + #ifdef WANT_RFKILL +- if (rfkill_.getState()) return "disabled"; ++ if (rfkill_.getState() && ifid_ == -1) return "disabled"; + #endif +- if (ifid_ == -1) { +- return "disconnected"; +- } ++ if (ifid_ == -1) return "disconnected"; + if (!carrier_) return "disconnected"; + if (ipaddr_.empty() && ipaddr6_.empty()) return "linked"; + if (essid_.empty()) return "ethernet"; diff --git a/srcpkgs/Waybar/template b/srcpkgs/Waybar/template index 40be83d808f..91549249c41 100644 --- a/srcpkgs/Waybar/template +++ b/srcpkgs/Waybar/template @@ -1,7 +1,7 @@ # Template file for 'Waybar' pkgname=Waybar version=0.13.0 -revision=2 +revision=3 build_style=meson configure_args="-Dlibudev=enabled -Dman-pages=enabled -Dsystemd=disabled -Drfkill=enabled