Hello community, here is the log from the commit of package waybar for openSUSE:Factory checked in at 2019-06-12 13:15:54 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/waybar (Old) and /work/SRC/openSUSE:Factory/.waybar.new.4811 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "waybar" Wed Jun 12 13:15:54 2019 rev:8 rq:709001 version:0.6.8 Changes: -------- --- /work/SRC/openSUSE:Factory/waybar/waybar.changes 2019-06-03 18:56:37.836400808 +0200 +++ /work/SRC/openSUSE:Factory/.waybar.new.4811/waybar.changes 2019-06-12 13:15:56.472713369 +0200 @@ -1,0 +2,8 @@ +Tue Jun 11 03:20:47 UTC 2019 - mvet...@suse.com + +- Update to 0.6.8: + * Fixed window app class 1962caf + * Fixed static custom module 9dbf057 + * Only watch pulseaudio change events 0b01b35 + +------------------------------------------------------------------- Old: ---- 0.6.7.tar.gz New: ---- 0.6.8.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ waybar.spec ++++++ --- /var/tmp/diff_new_pack.B07JeF/_old 2019-06-12 13:15:56.868712954 +0200 +++ /var/tmp/diff_new_pack.B07JeF/_new 2019-06-12 13:15:56.868712954 +0200 @@ -17,7 +17,7 @@ Name: waybar -Version: 0.6.7 +Version: 0.6.8 Release: 0 Summary: Customizable Wayland bar for Sway and Wlroots based compositors License: MIT ++++++ 0.6.7.tar.gz -> 0.6.8.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Waybar-0.6.7/include/modules/sway/window.hpp new/Waybar-0.6.8/include/modules/sway/window.hpp --- old/Waybar-0.6.7/include/modules/sway/window.hpp 2019-05-31 12:15:01.000000000 +0200 +++ new/Waybar-0.6.8/include/modules/sway/window.hpp 2019-06-08 18:33:17.000000000 +0200 @@ -29,6 +29,8 @@ std::string window_; int windowId_; std::string app_id_; + std::string old_app_id_; + std::size_t app_nb_; util::JsonParser parser_; util::SleeperThread thread_; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Waybar-0.6.7/include/util/command.hpp new/Waybar-0.6.8/include/util/command.hpp --- old/Waybar-0.6.7/include/util/command.hpp 2019-05-31 12:15:01.000000000 +0200 +++ new/Waybar-0.6.8/include/util/command.hpp 2019-06-08 18:33:17.000000000 +0200 @@ -90,6 +90,8 @@ setpgid(pid, pid); execl("/bin/sh", "sh", "-c", cmd.c_str(), (char*)0); exit(0); + } else { + signal(SIGCHLD,SIG_IGN); } return pid; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Waybar-0.6.7/meson.build new/Waybar-0.6.8/meson.build --- old/Waybar-0.6.7/meson.build 2019-05-31 12:15:01.000000000 +0200 +++ new/Waybar-0.6.8/meson.build 2019-06-08 18:33:17.000000000 +0200 @@ -1,6 +1,6 @@ project( 'waybar', 'cpp', 'c', - version: '0.6.7', + version: '0.6.8', license: 'MIT', default_options : [ 'cpp_std=c++17', diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Waybar-0.6.7/resources/style.css new/Waybar-0.6.8/resources/style.css --- old/Waybar-0.6.7/resources/style.css 2019-05-31 12:15:01.000000000 +0200 +++ new/Waybar-0.6.8/resources/style.css 2019-06-08 18:33:17.000000000 +0200 @@ -7,10 +7,10 @@ } window#waybar { - background: rgba(43, 48, 59, 0.5); + background-color: rgba(43, 48, 59, 0.5); border-bottom: 3px solid rgba(100, 114, 125, 0.5); color: #ffffff; - transition-property: background, background-color; + transition-property: background-color; transition-duration: .5s; } @@ -20,10 +20,10 @@ /* window#waybar.empty { - background: transparent; + background-color: transparent; } window#waybar.solo { - background: #FFFFFF; + background-color: #FFFFFF; } */ @@ -39,13 +39,13 @@ /* https://github.com/Alexays/Waybar/wiki/FAQ#the-workspace-buttons-have-a-strange-hover-effect */ #workspaces button { padding: 0 5px; - background: transparent; + background-color: transparent; color: #ffffff; border-bottom: 3px solid transparent; } #workspaces button.focused { - background: #64727D; + background-color: #64727D; border-bottom: 3px solid #ffffff; } @@ -54,7 +54,7 @@ } #mode { - background: #64727D; + background-color: #64727D; border-bottom: 3px solid #ffffff; } @@ -86,7 +86,7 @@ } #battery.critical:not(.charging) { - background: #f53c3c; + background-color: #f53c3c; color: #ffffff; animation-name: blink; animation-duration: 0.5s; @@ -100,56 +100,56 @@ } #cpu { - background: #2ecc71; + background-color: #2ecc71; color: #000000; } #memory { - background: #9b59b6; + background-color: #9b59b6; } #backlight { - background: #90b1b1; + background-color: #90b1b1; } #network { - background: #2980b9; + background-color: #2980b9; } #network.disconnected { - background: #f53c3c; + background-color: #f53c3c; } #pulseaudio { - background: #f1c40f; + background-color: #f1c40f; color: #000000; } #pulseaudio.muted { - background: #90b1b1; + background-color: #90b1b1; color: #2a5c45; } #custom-media { - background: #66cc99; + background-color: #66cc99; color: #2a5c45; min-width: 100px; } -.custom-spotify { - background: #66cc99; +#custom-media.custom-spotify { + background-color: #66cc99; } -.custom-vlc { - background: #ffa000; +#custom-media.custom-vlc { + background-color: #ffa000; } #temperature { - background: #f0932b; + background-color: #f0932b; } #temperature.critical { - background: #eb4d4b; + background-color: #eb4d4b; } #tray { @@ -166,18 +166,18 @@ } #mpd { - background: #66cc99; + background-color: #66cc99; color: #2a5c45; } #mpd.disconnected { - background: #f53c3c; + background-color: #f53c3c; } #mpd.stopped { - background: #90b1b1; + background-color: #90b1b1; } #mpd.paused { - background: #51a37a; + background-color: #51a37a; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Waybar-0.6.7/src/modules/custom.cpp new/Waybar-0.6.8/src/modules/custom.cpp --- old/Waybar-0.6.7/src/modules/custom.cpp 2019-05-31 12:15:01.000000000 +0200 +++ new/Waybar-0.6.8/src/modules/custom.cpp 2019-06-08 18:33:17.000000000 +0200 @@ -102,14 +102,14 @@ } else { parseOutputRaw(); } - if (text_.empty()) { + auto str = fmt::format(format_, + text_, + fmt::arg("alt", alt_), + fmt::arg("icon", getIcon(percentage_, alt_)), + fmt::arg("percentage", percentage_)); + if (str.empty()) { event_box_.hide(); } else { - auto str = fmt::format(format_, - text_, - fmt::arg("alt", alt_), - fmt::arg("icon", getIcon(percentage_, alt_)), - fmt::arg("percentage", percentage_)); label_.set_markup(str); if (tooltipEnabled()) { if (text_ == tooltip_) { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Waybar-0.6.7/src/modules/pulseaudio.cpp new/Waybar-0.6.8/src/modules/pulseaudio.cpp --- old/Waybar-0.6.7/src/modules/pulseaudio.cpp 2019-05-31 12:15:01.000000000 +0200 +++ new/Waybar-0.6.8/src/modules/pulseaudio.cpp 2019-06-08 18:33:17.000000000 +0200 @@ -128,6 +128,10 @@ pa_subscription_event_type_t type, uint32_t idx, void *data) { unsigned facility = type & PA_SUBSCRIPTION_EVENT_FACILITY_MASK; + unsigned operation = type & PA_SUBSCRIPTION_EVENT_TYPE_MASK; + if (operation != PA_SUBSCRIPTION_EVENT_CHANGE) { + return; + } if (facility == PA_SUBSCRIPTION_EVENT_SINK) { pa_context_get_sink_info_by_index(context, idx, sinkInfoCb, data); } else if (facility == PA_SUBSCRIPTION_EVENT_SOURCE) { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Waybar-0.6.7/src/modules/sway/window.cpp new/Waybar-0.6.8/src/modules/sway/window.cpp --- old/Waybar-0.6.7/src/modules/sway/window.cpp 2019-05-31 12:15:01.000000000 +0200 +++ new/Waybar-0.6.8/src/modules/sway/window.cpp 2019-06-08 18:33:17.000000000 +0200 @@ -9,7 +9,7 @@ label_.set_hexpand(true); label_.set_ellipsize(Pango::EllipsizeMode::ELLIPSIZE_END); } - ipc_.subscribe(R"(["window","workspace"])"); + ipc_.subscribe(R"(["window"])"); ipc_.signal_event.connect(sigc::mem_fun(*this, &Window::onEvent)); ipc_.signal_cmd.connect(sigc::mem_fun(*this, &Window::onCmd)); // Get Initial focused window @@ -23,34 +23,9 @@ void Window::onCmd(const struct Ipc::ipc_response& res) { try { std::lock_guard<std::mutex> lock(mutex_); - auto payload = parser_.parse(res.payload); - auto [nb, id, name, app_id] = getFocusedNode(payload); - if (!app_id_.empty()) { - bar_.window.get_style_context()->remove_class(app_id_); - } - if (nb == 0) { - bar_.window.get_style_context()->remove_class("solo"); - if (!bar_.window.get_style_context()->has_class("empty")) { - bar_.window.get_style_context()->add_class("empty"); - } - } else if (nb == 1) { - bar_.window.get_style_context()->remove_class("empty"); - if (!bar_.window.get_style_context()->has_class("solo")) { - bar_.window.get_style_context()->add_class("solo"); - } - if (!app_id.empty() && !bar_.window.get_style_context()->has_class(app_id)) { - bar_.window.get_style_context()->add_class(app_id); - } - } else { - bar_.window.get_style_context()->remove_class("solo"); - bar_.window.get_style_context()->remove_class("empty"); - } - app_id_ = app_id; - if (windowId_ != id || window_ != name) { - windowId_ = id; - window_ = name; - dp.emit(); - } + auto payload = parser_.parse(res.payload); + std::tie(app_nb_, windowId_, window_, app_id_) = getFocusedNode(payload); + dp.emit(); } catch (const std::exception& e) { spdlog::error("Window: {}", e.what()); } @@ -67,6 +42,27 @@ } auto Window::update() -> void { + if (!old_app_id_.empty()) { + bar_.window.get_style_context()->remove_class(old_app_id_); + } + if (app_nb_ == 0) { + bar_.window.get_style_context()->remove_class("solo"); + if (!bar_.window.get_style_context()->has_class("empty")) { + bar_.window.get_style_context()->add_class("empty"); + } + } else if (app_nb_ == 1) { + bar_.window.get_style_context()->remove_class("empty"); + if (!bar_.window.get_style_context()->has_class("solo")) { + bar_.window.get_style_context()->add_class("solo"); + } + if (!app_id_.empty() && !bar_.window.get_style_context()->has_class(app_id_)) { + bar_.window.get_style_context()->add_class(app_id_); + old_app_id_ = app_id_; + } + } else { + bar_.window.get_style_context()->remove_class("solo"); + bar_.window.get_style_context()->remove_class("empty"); + } label_.set_markup(fmt::format(format_, window_)); if (tooltipEnabled()) { label_.set_tooltip_text(window_);