squalou / google-chat-linux

source of a fork of google-chat-linux unofficial client from robyf
50 stars 10 forks source link

feature: show window if already in systray #67

Closed niksingh710 closed 1 year ago

niksingh710 commented 1 year ago

Open the window instead of creating a new instance.

squalou commented 1 year ago

Hi,

it used to work like this :-(

I'm actually struggling to make it work again.

Electron broke things again regarding Tray integration and click use on linux.

What is your desktop environment ?

Under gnome you may want to try different extensions.

I had some success with this one

https://extensions.gnome.org//extension/615/appindicator-support/

but may cause issues depending on other extenions. (for instance native ubuntu one). You'll have to try.

squalou commented 1 year ago

Hi,

it used to work like this.

I'm actually struggling to make it work again.

Electron broke things again regarding Tray integration and click use on linux.

It mostly depends on your Desktop : which one do you use ?

Under gnome you may want to try https://extensions.gnome.org//extension/615/appindicator-support/ and see if it gets any better.

Personally I use mainly PopOS which uses Ubuntu Appindicator extension : clicking on the tray icon does not start a new one but opens the menu instead (was intended to be a right click). It's lame but at least does not start a new one

Maybe I should at least try to prevent the "launch a new one", but first I need to reproduce this behavior.

niksingh710 commented 1 year ago

i am using Arch Linux with hyprland as wayland compositor. clicking on icon will show the window of currently launched instance. i use rofi drun menu to launch application and if i launch from there it creates a new

but in case of discord it does not start a new instance it just opens the window of current window instance.

squalou commented 1 year ago

Ok ! got it, I was focused on my Tray problems but it's something else and easier here.

I'l implement a protection to prevent multi- instance asap, this one is easy (and a good idea !)

niksingh710 commented 1 year ago

Ok ! got it, I was focused on my Tray problems but it's something else and easier here.

I'l implement a protection to prevent multi- instance asap, this one is easy (and a good idea !)

That will be nice of you mate.

but for me tray is working as expected.

squalou commented 1 year ago

Arch package should be ready within a few hours, version 5.24.20-1

New instance won't start but I'm not sure if the existing one will get the focus back.

If you use the "default" settings, meaning X.Org implementation of electron (and XWayland to support it), it should work as expected.

I tried myslef native wayland support : a notification tells me existing app is ready, but no focus is given.

I hope in your case it will work fine!