AWC functionality is great but I modestly think that its implementation of the global menu is currently not as good as plasma's official global menu. Hence I suggest embedding the official global menu instead. This is doable. I have a piece of code that integrates the active application applet (https://github.com/kupiqu/plasma-active-application derived from AWC) together with the official global menu. I could upload this integrated applet to github if interested (this implementation does not include AWC buttons, but I don't think it would be very hard to add them). But please note that my skills as Plasma dev are limited, so this is not to say that my code should be used or is any better. This is just to reccomend using the official global menu and deviating from it the least that is possible. Ideally all AWC functionality would be part of the official plasma workspace, but until this is a reality...
Last I looked into using the GlobalMenu (aka appmenu) widget's code, it wouldn't work since you'd need the plugin namespace to be org.kde.appmenu. You need the appmenu's nativeInterface to even trigger a button. * https://github.com/KDE/plasma-workspace/blob/master/applets/appmenu/package/metadata.desktop#L84 * https://github.com/KDE/plasma-workspace/blob/master/applets/appmenu/package/contents/ui/main.qml#L39 * https://github.com/KDE/plasma-workspace/blob/master/applets/appmenu/package/contents/ui/main.qml#L133 This is why AWC was forced to copy the appmenu code. As for "embedding" the widget... Hmmm. It's possible to do (like the System Tray or the Group widget), but I've never done that before. AWC could break into 2 widgets, the "app title + window buttons" could be 1 widget, and the global menu a different widget. Global menu would need to be patched to offer the following though: * Ability to fill up the panel width * Double click to toggle maximize and all the other mouse shortcuts. An issue with making it multiple widgets is that you'd get padding between the widgets you'd have no way of controlling. So you wouldn't be able to get this exact look: https://i.imgur.com/p6UMZE2.png
(In reply to Chris Holland from comment #1) > Last I looked into using the GlobalMenu (aka appmenu) widget's code, it > wouldn't work since you'd need the plugin namespace to be org.kde.appmenu. > You need the appmenu's nativeInterface to even trigger a button. > > * > https://github.com/KDE/plasma-workspace/blob/master/applets/appmenu/package/ > metadata.desktop#L84 > * > https://github.com/KDE/plasma-workspace/blob/master/applets/appmenu/package/ > contents/ui/main.qml#L39 > * > https://github.com/KDE/plasma-workspace/blob/master/applets/appmenu/package/ > contents/ui/main.qml#L133 > > This is why AWC was forced to copy the appmenu code. > > As for "embedding" the widget... Hmmm. It's possible to do (like the System > Tray or the Group widget), but I've never done that before. > > AWC could break into 2 widgets, the "app title + window buttons" could be 1 > widget, and the global menu a different widget. > > Global menu would need to be patched to offer the following though: > * Ability to fill up the panel width > * Double click to toggle maximize and all the other mouse shortcuts. > > An issue with making it multiple widgets is that you'd get padding between > the widgets you'd have no way of controlling. So you wouldn't be able to get > this exact look: https://i.imgur.com/p6UMZE2.png I don't consider myself more than a newbie for plasma development and perhaps the way I combined the two functionalities is totally wrong, but why don't I upload this piece of code to github and you take a fast look? [I will try to find the time to do so asap and will link to it here.] You could have this "Double click to toggle maximize and all the other mouse shortcuts" just on the application name, or do you need this working also in global menu buttons?
I recently forked the "kdeplasma-addons/applets/grouping" widget to see how difficult it would be to create a "container" Plasma::Applet which embeds a private Plasma::Container "applet". The Plasma::Container applet can load a nested widget like the Global Menu. I've uploaded the code I'm toying around with here: https://github.com/Zren/plasma-awc2 I still need to make the private applet resize itself to the same size as it's nested appmenu widget, but I've managed to remove the TabBar+StackWidget and make it automatically add a global menu. I'll be deleting the repo once I'm comfortable refactoring AWC to use a Plasma::Container.
Nice. That would save a lot of energy from maintaining different projects with the same feature. In the future, it could be like this: AWC = [ buttons (from psifidotos) + official global menu. ] I hope they could work together smoothly.
(In reply to trmdi from comment #4) > Nice. That would save a lot of energy from maintaining different projects > with the same feature. > In the future, it could be like this: > AWC = [ buttons (from psifidotos) + official global menu. ] > > I hope they could work together smoothly. But would we still need AWC while we could place [ buttons (from psifidotos) + official global menu. ] directly on the panel ? I think Zren and psifidotos should discuss before implementing things, to save your enegery.
Oh, nowadays you could use the applets by psifidotos. They are so good. AWC is almost dead.:)
Active Window Control was archived, and saw its last update 2 years ago. All bugs for it are being closed. Thanks for your understanding.