fix(window): ellipsize
This commit is contained in:
parent
69fceb1c92
commit
b3559328f1
|
@ -26,9 +26,6 @@
|
||||||
"sway/mode": {
|
"sway/mode": {
|
||||||
"format": "{}"
|
"format": "{}"
|
||||||
},
|
},
|
||||||
"sway/window": {
|
|
||||||
"max-length": 50
|
|
||||||
},
|
|
||||||
"tray": {
|
"tray": {
|
||||||
// "icon-size": 21,
|
// "icon-size": 21,
|
||||||
"spacing": 10
|
"spacing": 10
|
||||||
|
|
|
@ -4,6 +4,10 @@ waybar::modules::sway::Window::Window(Bar &bar, const Json::Value& config)
|
||||||
: ALabel(config, "{}"), bar_(bar), windowId_(-1)
|
: ALabel(config, "{}"), bar_(bar), windowId_(-1)
|
||||||
{
|
{
|
||||||
label_.set_name("window");
|
label_.set_name("window");
|
||||||
|
if (label_.get_max_width_chars() == -1) {
|
||||||
|
label_.set_hexpand(true);
|
||||||
|
label_.set_ellipsize(Pango::EllipsizeMode::ELLIPSIZE_END);
|
||||||
|
}
|
||||||
ipc_.connect();
|
ipc_.connect();
|
||||||
ipc_.subscribe("[\"window\",\"workspace\"]");
|
ipc_.subscribe("[\"window\",\"workspace\"]");
|
||||||
getFocusedWindow();
|
getFocusedWindow();
|
||||||
|
|
Loading…
Reference in New Issue