mirror of
https://github.com/void-linux/void-packages.git
synced 2025-08-03 11:22:56 +02:00
Waybar: add icon-related patches (one of which fixes crash)
This commit is contained in:
parent
0f28f2629e
commit
587cc98185
3 changed files with 32 additions and 1 deletions
14
srcpkgs/Waybar/patches/fix-default-icon.patch
Normal file
14
srcpkgs/Waybar/patches/fix-default-icon.patch
Normal file
|
@ -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<Gdk::Pixbuf> 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();
|
||||||
|
}
|
17
srcpkgs/Waybar/patches/fix-network-icons.patch
Normal file
17
srcpkgs/Waybar/patches/fix-network-icons.patch
Normal file
|
@ -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";
|
|
@ -1,7 +1,7 @@
|
||||||
# Template file for 'Waybar'
|
# Template file for 'Waybar'
|
||||||
pkgname=Waybar
|
pkgname=Waybar
|
||||||
version=0.13.0
|
version=0.13.0
|
||||||
revision=2
|
revision=3
|
||||||
build_style=meson
|
build_style=meson
|
||||||
configure_args="-Dlibudev=enabled -Dman-pages=enabled
|
configure_args="-Dlibudev=enabled -Dman-pages=enabled
|
||||||
-Dsystemd=disabled -Drfkill=enabled
|
-Dsystemd=disabled -Drfkill=enabled
|
||||||
|
|
Loading…
Add table
Reference in a new issue