mirror of
				https://github.com/rad4day/Waybar.git
				synced 2025-11-04 09:42:42 +01:00 
			
		
		
		
	fix(window): ellipsize
This commit is contained in:
		@@ -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();
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user