aenany / google-hangouts-chat-linux

Unofficial Linux client for Google Hangouts Chat
MIT License
4 stars 0 forks source link

Change system tray icon when notifications are received. #12

Open aenany opened 5 years ago

aenany commented 5 years ago

Change the icon color of the system tray when new notifications are available to read, gray the icon out when all new notifications have been read.

squalou commented 4 years ago

Hi, you're app is promising, I once supported one that does exactly what you require here :

https://github.com/squalou/google-chat-linux

In my case, the "Ctrl K" to search for people crashes my app, so I'll probably switch to yours shortly.

If I ever find a few hours I'll maybe propose a PR.

squalou commented 4 years ago

I have a branch ready if you'll allow me to push to the project.. .. but looks like it somehow causes the "ctrl K" being broken again. but not sure why / how, still trying

squalou commented 4 years ago

forget it, my solution requires this :

        "webPreferences": {
            "nodeIntegration": true
        },

which breaks the Ctrl K feature

(by the way you have a typo : you set "node-integration": false

which has no effect, default value being false you don't see the difference :) )

squalou commented 4 years ago

Hi

I think I have a solution.

You can see an example here : https://github.com/squalou/google-chat-linux

aenany commented 4 years ago

Hi @squalou thanks for posting! I will certainly take a look. Thank you!

squalou commented 4 years ago

Hi,

I may have 'fixed' (worked around ?) the issue.

I removed my 'hidden window' trick, and added this option when running electron:

export NODE_OPTIONS="--no-force-async-hooks-checks"

This prevents the crash when using Ctrl K

This way I can add back the ICM listening mechanism that reflects the favicon color in systray.

you can check my repository

squalou commented 4 years ago

Note taht I faced this issue https://github.com/electron-userland/electron-builder/issues/4642

=> in my repo I provided a custom made .desktop file that sets env variables, I have no idea how to include / generate properly a desktop file with electron-builder.

Maybe other / better solutions exists to set env or to package things.

My Arch package works with an after-build tweak.

squalou commented 4 years ago

edit : forced env inside index.js, it works fine even with deb package.

aenany commented 4 years ago

@squalou , thank you for the comprehensive solution here considering the Exec issues.

I will take a look at your repo!

aenany commented 4 years ago

On another note @squalou I believe I have made you a Contributor to the project. I am still getting the hang of GitHub repo settings.

squalou commented 4 years ago

Indeed ! I just checked the email received weeeeks ago. Still I don't know how to accept (the accept link goes to a 404, and from github I can't find how to)

aenany commented 4 years ago

Strange, according to the repo settings you did accept the invite. Nevertheless, I've invited you again as a collaborator. It indicates "Pending Invite" on your username in the Collaborators table.