Merge pull request #819 from pedrocr/sway-workspaces-id
Add IDs to sway workspace buttons for CSS styling
This commit is contained in:
commit
51a66d5919
|
@ -139,3 +139,4 @@ n.b.: the list of outputs can be obtained from command line using *swaymsg -t ge
|
||||||
- *#workspaces button.urgent*
|
- *#workspaces button.urgent*
|
||||||
- *#workspaces button.persistent*
|
- *#workspaces button.persistent*
|
||||||
- *#workspaces button.current_output*
|
- *#workspaces button.current_output*
|
||||||
|
- *#workspaces button#sway-workspace-${name}
|
||||||
|
|
|
@ -248,6 +248,7 @@ Gtk::Button &Workspaces::addButton(const Json::Value &node) {
|
||||||
auto pair = buttons_.emplace(node["name"].asString(), node["name"].asString());
|
auto pair = buttons_.emplace(node["name"].asString(), node["name"].asString());
|
||||||
auto &&button = pair.first->second;
|
auto &&button = pair.first->second;
|
||||||
box_.pack_start(button, false, false, 0);
|
box_.pack_start(button, false, false, 0);
|
||||||
|
button.set_name("sway-workspace-" + node["name"].asString());
|
||||||
button.set_relief(Gtk::RELIEF_NONE);
|
button.set_relief(Gtk::RELIEF_NONE);
|
||||||
if (!config_["disable-click"].asBool()) {
|
if (!config_["disable-click"].asBool()) {
|
||||||
button.signal_pressed().connect([this, node] {
|
button.signal_pressed().connect([this, node] {
|
||||||
|
|
Loading…
Reference in New Issue