Closed benjamin-voisin closed 2 days ago
Hey guys, wouldn't it be possible to use the already existing groups? But just adding orientation = popout-vertical | popout-horizontal | popout-inherit or something. Why having an additional xml file and why doesn't it contain the actions instead of having an extra menu-actions. Looks so inconvenient.
Thanks for your effort guys! Best regards
@nevaforget My implementation uses Gtk objects in a more general way. That is why their is a xml
file, it's not a random file, it's a Gtk ui definition. That means that the user can use all the power of Gtk menus, with documented and very used xml files. That's also why the actions need to be defined separatly : the Gtk ui definition doesn't allow this.
Can you add it to the man, as well as an example to the default conf? :)
@Alexays I've added the checks asked, and I made sure that the app doesn't crash when trying to build the popup menu. If something fails during constructions, it display a warning message explaining why, and still launch the waybar.
I've also updated the manpages of all the modules supporting this behaviour, and created a dedicated waybar-menu
manpage.
This would be so so so so useful to have. Any updates?
Thanks!
Related to #1064 : Every ALabel module now can have a dropdown menu that can be spawned using any click you want. The menu is defined with a
xml
file, and the comportment of each button can be configured in the waybar/conf file. The menus can by styled in thewaybar/style.css
.For example, you can now easily built a well-integrated power module with this config:
Where the
~/.config/waybar/power_menu.xml
look like this:This gives something like this:![20240509_21h49m48s_grim](https://github.com/Alexays/Waybar/assets/108622675/d5929ab6-0436-49ab-bb80-7ed9f677ef94)
And it can by styled with some css:
To look like this :![20240509_21h48m57s_grim](https://github.com/Alexays/Waybar/assets/108622675/9a6f87d8-a8a6-4849-afc1-ec5ceb7815e0)
The GObject is in the AModule class, so every module could have such menu, but I figured that only the ALabel class should build it automatically reading the config. For other AModule, it could be made differently.