feat: allow waybar to be positioned on left/right

This commit is contained in:
Alex
2019-03-22 12:25:05 +01:00
parent f700319d7f
commit 47142a61ae
7 changed files with 48 additions and 19 deletions

View File

@ -2,8 +2,11 @@
#include <iostream>
waybar::modules::SNI::Tray::Tray(const std::string& id, const Json::Value &config)
: config_(config), watcher_(), host_(nb_hosts_, config,
waybar::modules::SNI::Tray::Tray(const std::string& id, const Bar& bar,
const Json::Value &config)
: config_(config),
box_(bar.vertical ? Gtk::ORIENTATION_VERTICAL : Gtk::ORIENTATION_HORIZONTAL, 0),
watcher_(), host_(nb_hosts_, config,
std::bind(&Tray::onAdd, this, std::placeholders::_1),
std::bind(&Tray::onRemove, this, std::placeholders::_1))
{

View File

@ -2,7 +2,9 @@
waybar::modules::sway::Workspaces::Workspaces(const std::string& id, const Bar& bar,
const Json::Value& config)
: bar_(bar), config_(config), scrolling_(false)
: bar_(bar), config_(config),
box_(bar.vertical ? Gtk::ORIENTATION_VERTICAL : Gtk::ORIENTATION_HORIZONTAL, 0),
scrolling_(false)
{
box_.set_name("workspaces");
if (!id.empty()) {