Integrate AppMenu into launcher #2

Closed
robrobinbin opened this Issue Jan 7, 2017 · 20 comments

Comments

Projects
None yet
8 participants
@robrobinbin

robrobinbin commented Jan 7, 2017

In my option GNOME 3 had many design flaws, but through the years many of these were solved. However one of the last things still bugging me is the AppMenu.

I don't like the menu on the panel, but I hate the fall back mode as a colourful, out-of-place icon on the window itself even more. I tweaked your extension to add the menu back to the panel, in the right container where it doesn't bother me too much, and I'm quite happy with that.

afbeelding

I was wondering however if it is possible to integrate the items of the AppMenu in the right-click menu of the launcher. This would be a more optimal solution, in my opinion.

afbeelding

What do you think? Do you think this is possible?

@jderose9

This comment has been minimized.

Show comment
Hide comment
@jderose9

jderose9 Jan 7, 2017

Member

Yes, I find the app menu frustrating too.

I really like the idea to move it to the right side! I had not thought of that, but it looks nice. Do you mind to share your technique or code? I could add it as a new config setting. Did you just remove the element from the _leftBox and add it to the _centerBox/_rightBox? I did notice that, for example, openWeather aggressively tries to set itself make as the leftmost item so it may be hard to position it at the left of the right side items consistently if using another extension that tries to do the same.

I did have the same idea about adding to the secondary menu (right click menu) but hadn't looked into it much yet. My first thought was just to tie into the same event that the gnome shell is using to add it to the top bar. However, that menu is only present for the focused window. I started thinking most people would expect every gnome application to have the menu available on right click whether that application was in the foreground or background - do you agree? I was worried that each instance of an application that was running would have its own instance of the menu and that it would need to be presented multiple times (once for each instance). But, after looking more carefully, I can't seem to find any applications that have menus that are contextual only for the running instance. For example, Cheese has a full screen option, and Calendar has an Add to Calendar button, but gnome will only let you start a single instance of these applications at a time. Files has a checkbox to hide the sidebar, but when you check it in one instance, it hides the sidebar on all other running instances too.

I guess this is a lot of rambling to say that I think it is feasible, but I need to look into it more. If you learn anything new, please share.

Member

jderose9 commented Jan 7, 2017

Yes, I find the app menu frustrating too.

I really like the idea to move it to the right side! I had not thought of that, but it looks nice. Do you mind to share your technique or code? I could add it as a new config setting. Did you just remove the element from the _leftBox and add it to the _centerBox/_rightBox? I did notice that, for example, openWeather aggressively tries to set itself make as the leftmost item so it may be hard to position it at the left of the right side items consistently if using another extension that tries to do the same.

I did have the same idea about adding to the secondary menu (right click menu) but hadn't looked into it much yet. My first thought was just to tie into the same event that the gnome shell is using to add it to the top bar. However, that menu is only present for the focused window. I started thinking most people would expect every gnome application to have the menu available on right click whether that application was in the foreground or background - do you agree? I was worried that each instance of an application that was running would have its own instance of the menu and that it would need to be presented multiple times (once for each instance). But, after looking more carefully, I can't seem to find any applications that have menus that are contextual only for the running instance. For example, Cheese has a full screen option, and Calendar has an Add to Calendar button, but gnome will only let you start a single instance of these applications at a time. Files has a checkbox to hide the sidebar, but when you check it in one instance, it hides the sidebar on all other running instances too.

I guess this is a lot of rambling to say that I think it is feasible, but I need to look into it more. If you learn anything new, please share.

@robrobinbin

This comment has been minimized.

Show comment
Hide comment
@robrobinbin

robrobinbin Jan 7, 2017

Yup, I just moved the element to the _rightBox. It would be nice if there a config setting to do so.

We seem to be on the same frequency:

I started thinking most people would expect every gnome application to have the menu available on right click whether that application was in the foreground or background - do you agree?

I do.

But, after looking more carefully, I can't seem to find any applications that have menus that are contextual only for the running instance.

I don't know how the implementation is done, but I think the design idea is indeed that the AppMenu is for the application as a whole, not for a specific instance.

I have limited knowledge about gnome extensions, so I don't think I'll be of much use, but if I do find something interesting, I'll let you know.

Yup, I just moved the element to the _rightBox. It would be nice if there a config setting to do so.

We seem to be on the same frequency:

I started thinking most people would expect every gnome application to have the menu available on right click whether that application was in the foreground or background - do you agree?

I do.

But, after looking more carefully, I can't seem to find any applications that have menus that are contextual only for the running instance.

I don't know how the implementation is done, but I think the design idea is indeed that the AppMenu is for the application as a whole, not for a specific instance.

I have limited knowledge about gnome extensions, so I don't think I'll be of much use, but if I do find something interesting, I'll let you know.

@jderose9 jderose9 added the enhancement label Jan 7, 2017

@jderose9

This comment has been minimized.

Show comment
Hide comment
@jderose9

jderose9 Jan 7, 2017

Member

I don't know how the implementation is done, but I think the design idea is indeed that the AppMenu is for the application as a whole, not for a specific instance.

Nice, good to know. I think that makes it more feasible, but I haven't look through the shell code at the implementation yet. I'm new to Gnome.. working on this extension was pretty much a pre-requisite to switching over to using it, haha. The Overview, and the Workspaces-To-Dock extension really sold me on it though. They really make using multiple workspaces painless in a way I haven't seen on any other desktop environment.

Member

jderose9 commented Jan 7, 2017

I don't know how the implementation is done, but I think the design idea is indeed that the AppMenu is for the application as a whole, not for a specific instance.

Nice, good to know. I think that makes it more feasible, but I haven't look through the shell code at the implementation yet. I'm new to Gnome.. working on this extension was pretty much a pre-requisite to switching over to using it, haha. The Overview, and the Workspaces-To-Dock extension really sold me on it though. They really make using multiple workspaces painless in a way I haven't seen on any other desktop environment.

@eldelacajita

This comment has been minimized.

Show comment
Hide comment
@eldelacajita

eldelacajita Jan 9, 2017

I totally agree with the suggestion by @robrobinbin of integrating the appmenu in the same right-click menu present in the launcher icons (and working per app, as they are usually general options not affecting a specific window).

I totally agree with the suggestion by @robrobinbin of integrating the appmenu in the same right-click menu present in the launcher icons (and working per app, as they are usually general options not affecting a specific window).

@cra0zy

This comment has been minimized.

Show comment
Hide comment
@cra0zy

cra0zy Jan 11, 2017

@robrobinbin What shell theme are you using?

cra0zy commented Jan 11, 2017

@robrobinbin What shell theme are you using?

@robrobinbin

This comment has been minimized.

Show comment
Hide comment
@robrobinbin

robrobinbin Jan 11, 2017

@cra0zy In the screenshot I was using Flat-Plat-Conpact. Now I'm using Arc though

@cra0zy In the screenshot I was using Flat-Plat-Conpact. Now I'm using Arc though

@Pointedstick

This comment has been minimized.

Show comment
Hide comment
@Pointedstick

Pointedstick Jan 18, 2017

Another vote for integrating the AppMenu into the running app's own menu.

Another vote for integrating the AppMenu into the running app's own menu.

@robrobinbin

This comment has been minimized.

Show comment
Hide comment
@robrobinbin

robrobinbin Jan 18, 2017

It would definitely be nice, but does anybody have a clue/the ability to do so?

It would definitely be nice, but does anybody have a clue/the ability to do so?

@92Julian

This comment has been minimized.

Show comment
Hide comment
@92Julian

92Julian Jan 23, 2017

Add a option to show the AppMenu in the "Click action" preference and set it default behavior for shift+click or middle-click action. Left-click = cycle windows + minimize; right-click = right-click menu; shift+click = AppMenu.

Add a option to show the AppMenu in the "Click action" preference and set it default behavior for shift+click or middle-click action. Left-click = cycle windows + minimize; right-click = right-click menu; shift+click = AppMenu.

@heftig

This comment has been minimized.

Show comment
Hide comment
@heftig

heftig Feb 8, 2017

Please find some interim solution ASAP (even if it's just restoring the menu in the panel). I'd really consider this a bug and not an enhancement.

Apps depending on the menu being accessible are currently unusable. Attempting to open the menu using Super+F10 pops up an unclickable menu in the top-left corner.

heftig commented Feb 8, 2017

Please find some interim solution ASAP (even if it's just restoring the menu in the panel). I'd really consider this a bug and not an enhancement.

Apps depending on the menu being accessible are currently unusable. Attempting to open the menu using Super+F10 pops up an unclickable menu in the top-left corner.

@jderose9

This comment has been minimized.

Show comment
Hide comment
@jderose9

jderose9 Feb 8, 2017

Member

@heftig There is an option to add the menu back to the panel in the current master branch thanks to @robrobinbin. It's awaiting Gnome approval (v4 here: https://extensions.gnome.org/review/6566) to go live but you can grab it from github if you don't want to wait.

The other option is to turn off the menu from Tweak Tool under Top Bar > Show Application Menu. That seems to disable Super+F10 but will give you access to the menu in the top left of each application window.

Member

jderose9 commented Feb 8, 2017

@heftig There is an option to add the menu back to the panel in the current master branch thanks to @robrobinbin. It's awaiting Gnome approval (v4 here: https://extensions.gnome.org/review/6566) to go live but you can grab it from github if you don't want to wait.

The other option is to turn off the menu from Tweak Tool under Top Bar > Show Application Menu. That seems to disable Super+F10 but will give you access to the menu in the top left of each application window.

jderose9 added a commit that referenced this issue Feb 25, 2017

jderose9 added a commit that referenced this issue Feb 25, 2017

@jderose9

This comment has been minimized.

Show comment
Hide comment
@jderose9

jderose9 Feb 25, 2017

Member

Ok. I think I got this in pretty good shape. The gnome AppMenu items are now merged into the right click menu.

Couple things to note:

  1. The menu items aren't available unless the app is currently running.
  2. If you have the AppMenu displayed on the panel, Super+F10 will still open it, but if you don't it will be remapped to open the right click menu from the launcher.
  3. I removed Help and About from the AppMenu items and Show Details (which opens the app in Gnome Software) from the launcher items, to try to cut down on the amount of stuff in the popup. Let me know what you think of this.
  4. Previously the order was Window List, New Window, Favorite, Quit. Now the order is Window List, New Window, AppMenu items, Favorite Quit. Let me know if this makes sense.

appmenu

Member

jderose9 commented Feb 25, 2017

Ok. I think I got this in pretty good shape. The gnome AppMenu items are now merged into the right click menu.

Couple things to note:

  1. The menu items aren't available unless the app is currently running.
  2. If you have the AppMenu displayed on the panel, Super+F10 will still open it, but if you don't it will be remapped to open the right click menu from the launcher.
  3. I removed Help and About from the AppMenu items and Show Details (which opens the app in Gnome Software) from the launcher items, to try to cut down on the amount of stuff in the popup. Let me know what you think of this.
  4. Previously the order was Window List, New Window, Favorite, Quit. Now the order is Window List, New Window, AppMenu items, Favorite Quit. Let me know if this makes sense.

appmenu

@robrobinbin

This comment has been minimized.

Show comment
Hide comment
@robrobinbin

robrobinbin Feb 25, 2017

You're doing amazing stuff, this looks great! (The changes to the indicators look great to!)

  1. No problem, the flow feels natural.

  2. Nice

  3. I don't like the idea of removing functionality, however it does look neater and more integrated with these items removed, so 👍. For some reason however this doesn't completely work on my machine (with Dutch locale): "New window" and "Quit" are removed, "Help" and "About" are not (all are different words in Dutch)

  4. Makes sense!

You're doing amazing stuff, this looks great! (The changes to the indicators look great to!)

  1. No problem, the flow feels natural.

  2. Nice

  3. I don't like the idea of removing functionality, however it does look neater and more integrated with these items removed, so 👍. For some reason however this doesn't completely work on my machine (with Dutch locale): "New window" and "Quit" are removed, "Help" and "About" are not (all are different words in Dutch)

  4. Makes sense!

@cra0zy

This comment has been minimized.

Show comment
Hide comment
@cra0zy

cra0zy Feb 25, 2017

I removed Help and About from the AppMenu items and Show Details (which opens the app in Gnome Software) from the launcher items, to try to cut down on the amount of stuff in the popup. Let me know what you think of this.

Add an option to remove the items, but don't remove them by default.

cra0zy commented Feb 25, 2017

I removed Help and About from the AppMenu items and Show Details (which opens the app in Gnome Software) from the launcher items, to try to cut down on the amount of stuff in the popup. Let me know what you think of this.

Add an option to remove the items, but don't remove them by default.

@robrobinbin

This comment has been minimized.

Show comment
Hide comment
@robrobinbin

robrobinbin Feb 25, 2017

Locking and unlocking GNOME crashes the extension now

Locking and unlocking GNOME crashes the extension now

@jderose9

This comment has been minimized.

Show comment
Hide comment
@jderose9

jderose9 Feb 26, 2017

Member

@robrobinbin This is fixed now. Let me know if you discover any other issues. Thanks.

For some reason however this doesn't completely work on my machine (with Dutch locale): "New window" and "Quit" are removed, "Help" and "About" are not (all are different words in Dutch)

It looks like Help and About are not translated in the shell. These menu items are added from each application and I can't access the translations. They are handled individually by the apps on the C side and I can't find any other generic way to identify them.

So I think it makes the most sense just to put them back in the menu. I moved the appMenu items to the top of the right click menu, because I felt that New Window and the window list were probably used more frequently, and because I didn't like that the New Window moved so far north when the application was running versus when it was not. What are your thoughts?

screenshot from 2017-02-25 20-15-47

Member

jderose9 commented Feb 26, 2017

@robrobinbin This is fixed now. Let me know if you discover any other issues. Thanks.

For some reason however this doesn't completely work on my machine (with Dutch locale): "New window" and "Quit" are removed, "Help" and "About" are not (all are different words in Dutch)

It looks like Help and About are not translated in the shell. These menu items are added from each application and I can't access the translations. They are handled individually by the apps on the C side and I can't find any other generic way to identify them.

So I think it makes the most sense just to put them back in the menu. I moved the appMenu items to the top of the right click menu, because I felt that New Window and the window list were probably used more frequently, and because I didn't like that the New Window moved so far north when the application was running versus when it was not. What are your thoughts?

screenshot from 2017-02-25 20-15-47

@Pointedstick

This comment has been minimized.

Show comment
Hide comment

I like it.

@robrobinbin

This comment has been minimized.

Show comment
Hide comment
@robrobinbin

robrobinbin Feb 26, 2017

Everything seems to work! Feel free to close this issue. 🎉

You might consider removing #29 again, since this is a more elegant solution to the appMenu problem.

Cheers

Everything seems to work! Feel free to close this issue. 🎉

You might consider removing #29 again, since this is a more elegant solution to the appMenu problem.

Cheers

@jderose9

This comment has been minimized.

Show comment
Hide comment
@jderose9

jderose9 Mar 2, 2017

Member

I'll leave #29 as it's a pretty straightforward implementation and gives some additional customization options. Thanks for the input everyone!

Member

jderose9 commented Mar 2, 2017

I'll leave #29 as it's a pretty straightforward implementation and gives some additional customization options. Thanks for the input everyone!

@virtualviolet

This comment has been minimized.

Show comment
Hide comment
@virtualviolet

virtualviolet Apr 11, 2018

hey guys, I am finding the quit menu option is not appearing when the app menu is merged with the dock icon

hey guys, I am finding the quit menu option is not appearing when the app menu is merged with the dock icon

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment