jake-phy / WindowIconList

GNU General Public License v2.0
75 stars 26 forks source link

Google Chrome Apps not being Grouped Correctly #74

Closed brad-jones closed 9 years ago

brad-jones commented 9 years ago

I use Chrome's Apps feature pretty heavily.

I can easily click on the app launchers and they open but then they all get combined under the main chrome launcher. See the below screenshot for an example.

workspace 1_152

I have had this issue with other docks when I was using MATE, it has something to do with the window class name. Cario Dock is the only one I have managed to get setup to accommodate the Chrome Apps correctly.

current items_153

Here is the shortcut .desktop file for Facebook:

#!/usr/bin/env xdg-open
[Desktop Entry]
Version=1.0
Terminal=false
Type=Application
Name=Facebook
Exec=/opt/google/chrome/google-chrome --profile-directory=Default --app-id=boeajhmfdjldchidhphikilcgdacljfm
Icon=chrome-boeajhmfdjldchidhphikilcgdacljfm-Default
StartupWMClass=crx_boeajhmfdjldchidhphikilcgdacljfm

I believe the StartupWMClass uniquely identifies each of the Google Chrome app windows from one another.

jake-phy commented 9 years ago

Ok thanks for bring this to my attention i will try to fix it.

zguithues commented 9 years ago

hey! Thanks for this excellent applet! I'm surprised this functionality wasn't built in to cinnamon...

I also need separate chrome app grouping. 90% of what i do on my computer is in the chrome browser, and i have it organized into about 7 different "apps" that currently, on Win 7, stay grouped into their own app icon on the taskbar.

This is a show-stopper for me, and it may be what convinces me to switch from linux mint. :(

I hope you're able to get it working! :)

jake-phy commented 9 years ago

This is actually a chrome bug, their WM_CLASS is backwards. It has been a known bug for quite awhile but apparently if you fix it, it can cause issues in other areas :(. I think I might be able to add an option to check for the startup_wm_class and see if it matches the WM_CLASS_INSTANCE. The only problem is that libreoffice uses the same system only they have it implemented correctly. I'll see what I can do.

jake-phy commented 9 years ago

I might need to push this out to the next release though sorry.

zguithues commented 9 years ago

Thanks for looking into it, super unfortunate that its incorrectly implemented in chrome. One workaround I've heard of is to make copies (not symlinks) of the program directory, and rename the executable. I'm going to look into that for the meantime.

Good luck getting it working! Using chrome apps for everything has changed the way I use my computer. I thought it'd be easier than this to implement via linux. On Mar 7, 2015 4:58 PM, "jake-phy" notifications@github.com wrote:

I might need to push this out to the next release though sorry.

— Reply to this email directly or view it on GitHub https://github.com/jake-phy/WindowIconList/issues/74#issuecomment-77712723 .

jake-phy commented 9 years ago

It is :) I have been able to implement this after all, using the gnome shell hack. Uploading now.

jake-phy commented 9 years ago

Ok it is up now (Development Branch), can you all test it out?

zguithues commented 9 years ago

Testing now! On Mar 8, 2015 4:41 PM, "jake-phy" notifications@github.com wrote:

Ok it is up now, can you all test it out?

— Reply to this email directly or view it on GitHub https://github.com/jake-phy/WindowIconList/issues/74#issuecomment-77772901 .

zguithues commented 9 years ago

It's properly grouping the apps! Thanks! I noticed 2 issues...

1) i cannot pin chome, or any chrome apps. I lets me pin, but when i close the window, the icon disappears. not quite the showstopper lack of grouping was, but still annoying.

2) app icon. when i first create the application, it creates it's own icon with the proper logo. but if i close and re-open, it just has the chrome icon. I even tried creating a "chrome app" by actually creating a manifest.json, but it made no difference. (following instructions from here: http://blog.laptopmag.com/how-to-add-custom-shortcuts-to-your-chromebook-app-launcher)

pic

Thanks so much for working on this so fast!

jake-phy commented 9 years ago

I've had several people report the pin issue, if you want to be geeky run this command in the terminal "cinnamon --replace &". Then try to pin a chrome app and tell me what you get.
Also where are you storing the application files? Are you storing them in the .local/ share/applications folder?

zguithues commented 9 years ago

running the command, and cinnamon restarted. Chrome would pin, but all windows stay stacked under one icon.

I'm not sure what you mean about where i'm storing the application files, it's all default. i looked in ~/.local/ share/applications and there are a bunch of chrome .desktop files. When i make my chome apps, i just assemble a folder (currently stored in ~/Downloads/ChomeApps). then "load unpacked extension" in chrome to add the app.

jake-phy commented 9 years ago

Weird. Wish I could see your system. Everything pins fine on my system.

-----Original Message----- From: "zguithues" notifications@github.com Sent: ‎3/‎8/‎2015 7:39 PM To: "jake-phy/WindowIconList" WindowIconList@noreply.github.com Cc: "jake-phy" jake.phy@gmail.com Subject: Re: [WindowIconList] Google Chrome Apps not being Grouped Correctly(#74)

running the command, and cinnamon restarted. Chrome would pin, but all windows stay stacked under one icon. I'm not sure what you mean about where i'm storing the application files, it's all default. i looked in ~/.local/ share/applications and there are a bunch of chrome .desktop files. When i make my chome apps, i just assemble a folder (currently stored in ~/Downloads/ChomeApps). then "load unpacked extension" in chrome to add the app. — Reply to this email directly or view it on GitHub.

zguithues commented 9 years ago

odd, that you're not experiencing it... i have a fresh install from yesterday. no customization...

I'd be happy to try to let you in via vnc or something, if you want to check something out. you can gtalk me at zguithues@gmail.com

brad-jones commented 9 years ago

I will give it a test sometime in the next day or so, have been away on holidays. Sounds promising though.

jake-phy commented 9 years ago

Ok I did some tweaks on this and I'd say this feature is pretty much ready to go, what say you all?

brad-jones commented 9 years ago

Yay awesome work man :) Will be making the switch from Mate to Cinnamon permanently now.

Not sure if this is intended functionality or not but on my system the Chrome Apps are still grouped under the main Chrome Icon when the main Chrome browser is open. If I just click on say Gmail and never actually open an instance of the full chrome browser then nothing is grouped under the main Chrome icon. But the second I open Chrome proper your applet then shows we have 2 Chrome windows, the one I just opened plus Gmail. Meanwhile the gmail icon continues to work as expected. See screenshot.

screenshot from 2015-03-21 19 39 45

It's much more usable than it was but to me it would make more sense to hide the Chrome Apps from being grouped under the main Chrome Icon. The main chrome icon should only show instances of the full browser and never the Chrome Apps.

A pipe dream idea I know but it would be super cool to show the individual tabs of chrome if only one chrome browser is open. I guess though that would require corporation on Chrome's behalf. Even further still imagine Alt-Tabing through chrome tabs.

jake-phy commented 9 years ago

If you really want to have the chrome apps separate from the main app, Add a "StartupWMClass=Google-chrome" or "StartupWMClass=Google-chrome-stable" (depending on the executable name, also make sure the first letter is capitalized) to the Chrome desktop file. "sudo gedit /usr/share/applications/google-chrome.desktop". That is how I am detecting the chrome apps as seperate from the main app. So pretty much what your doing is making the main instance an app :)

I believe currently in MS Windows the windows are grouped under the parent app as well as by app? That is what zguithues said.

brad-jones commented 9 years ago

Gave that a shot and made no difference. I am running Chrome Beta though if that makes a difference. So I added: StartupWMClass=Google-chrome-beta

On my Windows 8.1 laptop with Chrome v41, the main chrome windows are grouped together. And instances of each app are grouped together as you would expect. Maybe there is a setting in chrome that changes this functionality... in any case I wouldn't spend any more time on this unless you really want to.

entr commented 9 years ago

Using Rafaela, if I do alt+f2 then r all Chrome (44.0.2403.130) windows are ungrouped.