refactor: remove useless bar param
parent
77d9dd06af
commit
b75e0bb0d0
|
@ -11,7 +11,7 @@ namespace waybar::modules::sway {
|
||||||
|
|
||||||
class Mode : public ALabel {
|
class Mode : public ALabel {
|
||||||
public:
|
public:
|
||||||
Mode(const std::string&, const waybar::Bar&, const Json::Value&);
|
Mode(const std::string&, const Json::Value&);
|
||||||
~Mode() = default;
|
~Mode() = default;
|
||||||
auto update() -> void;
|
auto update() -> void;
|
||||||
|
|
||||||
|
@ -19,7 +19,6 @@ class Mode : public ALabel {
|
||||||
void onEvent(const struct Ipc::ipc_response&);
|
void onEvent(const struct Ipc::ipc_response&);
|
||||||
void worker();
|
void worker();
|
||||||
|
|
||||||
const Bar& bar_;
|
|
||||||
waybar::util::SleeperThread thread_;
|
waybar::util::SleeperThread thread_;
|
||||||
Ipc ipc_;
|
Ipc ipc_;
|
||||||
std::string mode_;
|
std::string mode_;
|
||||||
|
|
|
@ -12,7 +12,7 @@ waybar::IModule* waybar::Factory::makeModule(const std::string& name) const {
|
||||||
}
|
}
|
||||||
#ifdef HAVE_SWAY
|
#ifdef HAVE_SWAY
|
||||||
if (ref == "sway/mode") {
|
if (ref == "sway/mode") {
|
||||||
return new waybar::modules::sway::Mode(id, bar_, config_[name]);
|
return new waybar::modules::sway::Mode(id, config_[name]);
|
||||||
}
|
}
|
||||||
if (ref == "sway/workspaces") {
|
if (ref == "sway/workspaces") {
|
||||||
return new waybar::modules::sway::Workspaces(id, bar_, config_[name]);
|
return new waybar::modules::sway::Workspaces(id, bar_, config_[name]);
|
||||||
|
|
|
@ -2,8 +2,8 @@
|
||||||
|
|
||||||
namespace waybar::modules::sway {
|
namespace waybar::modules::sway {
|
||||||
|
|
||||||
Mode::Mode(const std::string& id, const Bar& bar, const Json::Value& config)
|
Mode::Mode(const std::string& id, const Json::Value& config)
|
||||||
: ALabel(config, "{}"), bar_(bar) {
|
: ALabel(config, "{}") {
|
||||||
label_.set_name("mode");
|
label_.set_name("mode");
|
||||||
if (!id.empty()) {
|
if (!id.empty()) {
|
||||||
label_.get_style_context()->add_class(id);
|
label_.get_style_context()->add_class(id);
|
||||||
|
|
Loading…
Reference in New Issue