Skip to content

Commit

Permalink
Merge branch 'master' into tray-gdbus
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexays authored Oct 25, 2018
2 parents a13ce6e + 4584784 commit 0e6147b
Show file tree
Hide file tree
Showing 7 changed files with 13 additions and 8 deletions.
6 changes: 3 additions & 3 deletions meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,9 @@ gtkmm = dependency('gtkmm-3.0')
dbusmenu_gtk = dependency('dbusmenu-gtk3-0.4')
jsoncpp = dependency('jsoncpp')
sigcpp = dependency('sigc++-2.0')
libnl = dependency('libnl-3.0', required: false)
libnlgen = dependency('libnl-genl-3.0', required: false)
libpulse = dependency('libpulse', required: false)
libnl = dependency('libnl-3.0', required: get_option('libnl'))
libnlgen = dependency('libnl-genl-3.0', required: get_option('libnl'))
libpulse = dependency('libpulse', required: get_option('pulseaudio'))

src_files = files(
'src/factory.cpp',
Expand Down
2 changes: 2 additions & 0 deletions meson_options.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
option('libnl', type: 'feature', value: 'auto', description: 'Enable libnl support for network related features')
option('pulseaudio', type: 'feature', value: 'auto', description: 'Enable support for pulseaudio')
1 change: 1 addition & 0 deletions src/bar.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ waybar::Bar::Bar(const Client& client,
window.set_title("waybar");
window.set_decorated(false);
window.set_name("waybar");
window.set_resizable(false);
setupConfig();
setupCss();
setupWidgets();
Expand Down
2 changes: 1 addition & 1 deletion src/modules/clock.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ waybar::modules::Clock::Clock(const Json::Value& config)
: ALabel(config, "{:%H:%M}")
{
label_.set_name("clock");
uint32_t interval = config_["interval"] ? config_["inveral"].asUInt() : 60;
uint32_t interval = config_["interval"] ? config_["interval"].asUInt() : 60;
thread_ = [this, interval] {
auto now = waybar::chrono::clock::now();
dp.emit();
Expand Down
2 changes: 1 addition & 1 deletion src/modules/cpu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ waybar::modules::Cpu::Cpu(const Json::Value& config)
: ALabel(config, "{}%")
{
label_.set_name("cpu");
uint32_t interval = config_["interval"] ? config_["inveral"].asUInt() : 10;
uint32_t interval = config_["interval"] ? config_["interval"].asUInt() : 10;
thread_ = [this, interval] {
dp.emit();
thread_.sleep_for(chrono::seconds(interval));
Expand Down
2 changes: 1 addition & 1 deletion src/modules/memory.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ waybar::modules::Memory::Memory(const Json::Value& config)
: ALabel(config, "{}%")
{
label_.set_name("memory");
uint32_t interval = config_["interval"] ? config_["inveral"].asUInt() : 30;
uint32_t interval = config_["interval"] ? config_["interval"].asUInt() : 30;
thread_ = [this, interval] {
dp.emit();
thread_.sleep_for(chrono::seconds(interval));
Expand Down
6 changes: 4 additions & 2 deletions src/modules/sway/workspaces.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,8 @@ auto waybar::modules::sway::Workspaces::update() -> void
if (config_["format"]) {
auto format = config_["format"].asString();
button.set_label(fmt::format(format, fmt::arg("icon", icon),
fmt::arg("name", node["name"].asString())));
fmt::arg("name", node["name"].asString()),
fmt::arg("index", node["num"].asString())));
} else {
button.set_label(icon);
}
Expand All @@ -99,7 +100,8 @@ void waybar::modules::sway::Workspaces::addWorkspace(Json::Value node)
auto icon = getIcon(node["name"].asString(), node);
auto format = config_["format"]
? fmt::format(config_["format"].asString(), fmt::arg("icon", icon),
fmt::arg("name", node["name"].asString()))
fmt::arg("name", node["name"].asString()),
fmt::arg("index", node["num"].asString()))
: icon;
auto pair = buttons_.emplace(node["num"].asInt(), format);
auto &button = pair.first->second;
Expand Down

0 comments on commit 0e6147b

Please sign in to comment.