Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Electron] Minimize/Close to tray #1480

Closed
1 task done
mpsdskd opened this issue Sep 14, 2017 · 47 comments · Fixed by #1676
Closed
1 task done

[Electron] Minimize/Close to tray #1480

mpsdskd opened this issue Sep 14, 2017 · 47 comments · Fixed by #1676

Comments

@mpsdskd
Copy link

mpsdskd commented Sep 14, 2017

  • I have searched open and closed issues for duplicates

Most messaging programs can be minimized to tray so they do not clutter up the taskbar, so it would be nice, if Signal could do that, too.
Since #761 Signal Desktop switched to electron so it should now be possible to implement minimizing signal to tray.

Platform info:
Operating System: Kubuntu 17.04
Signal version: 1.0.24 Electron

@bungabunga
Copy link

It's actually a standard. Most modern messengers have it (Viber, Skype...).

@GuardianMajor
Copy link

@scottnonnenberg here is something worth looking at to get this implemented, since currently the close/minimize is honestly pretty useless and it would make it easier to keep it in the tray and have it show a notification when a message comes in.

https://github.com/electron/electron/blob/master/docs/api/tray.md

Additionally, it would be quite trivial and yet useful thing to add an about menu item that will contain the version number in the least and if more motivated, links back to the project, documentation and etc. Sorry to put it here, just didn't want to clutter the issues by creating one.

@scottnonnenberg
Copy link
Contributor

Maybe you could fill me on on what exactly is wrong with the current minimize behavior?

Regarding the About menu - seems that our attempts to make it cross-platform have failed. There's an About entry in the File menu on OSX today.

@GuardianMajor
Copy link

GuardianMajor commented Sep 21, 2017

Currently when you click on minimize it sits on the taskbar and doesn't actually go away and takes up space when not in use so you have to choose between closing it or just having that space taken up all day. A proper and useful minimize would put it in the systray where it doesn't take up valuable space and can be accessed without closing it out until a notification comes that you got something, which would then bring up the interface when clicked. See? I can safely say that EVERY SINGLE "messenger" app out there with a desktop client has this behavior, except us.

@scottnonnenberg
Copy link
Contributor

@GuardianMajor And to be clear, you're on Linux? I can remember this kind of thing from my Windows days, so I expect that it applies there as well. Is anyone pushing for this on OSX?

@bungabunga
Copy link

bungabunga commented Sep 21, 2017

I can speak only about tray icons on Windows/Linux as I am not so familiar with Mac:

Systray icons are used for such prorams that are always running but are not used every single moment. If I look at my systray now I see Mega (sync), Viber, Syncthing and Mail on my tray (Ubuntu 17.04), so I think you get the picture. Those programs are running all the time but would clutter the taskbar if they'd just lay there.

Now for Signal: different people use it differently, some would like to have it allways running, from the boot on, others would prefer to start it every single time they need it and shut it down after use. So, for a nice UX you'd need two options in settings:

  • Run Signal Desktop at login (yes/no)
  • Close to systray (yes/no)

Also, if you choose to bring Signal to systray it's important for notifications to show up only when the screen is on, if the screen is off they would appear on your phone.

@GuardianMajor
Copy link

GuardianMajor commented Sep 21, 2017

@scottnonnenberg No my friend, I am on Windows. Apologies for not making that clear, I realize the OP is on Linux but I didn't want to clutter the issues by adding yet another one just for Windows, given the principle is universal across all platforms.

@bungabunga Correct, and since it is a messenger, having it open all day on your system while you are there is not unreasonable usage behavior and it would more than justify having it minimize to the system tray until you get a message/need to send a message/or otherwise interact with it.

@MartinX3
Copy link

MartinX3 commented Nov 1, 2017

https://github.com/Enrico204/Whatsapp-Desktop
That's a electron app too, with tray icon support.
Maybe the code helps you.

@UnluckyLuke
Copy link

Minimize to tray is usually a standard feature when it comes to messaging applications in Windows and have been for a long time.
ICQ, MSN Messenger, Telegram, Skype, Miranda, Pidgin... They all have that feature.

@eNTi
Copy link

eNTi commented Nov 9, 2017

I was wondering if I had configured my fluxbox installation wrong or if signal-desktop really had no tray icon support. Please implement this.

@leafcutterant
Copy link

Just a note: it's important that notifications will work and appear the same way when the application is minimized to tray. I tried to use Signal Desktop with a 3rd party "tray iconizer" (rbtray), and when minimized, I got no visual or audio notifications. This is probably specific to how this 3rd party software works, just thought I'd share my experience with those who are experimenting with this.

@breznak
Copy link

breznak commented Nov 15, 2017

Close to systray (yes/no)

I think the common modern UI is that x ("cross close") will minimize to tray, and going to File> Quit will exit the app completely.

m-pilia added a commit to m-pilia/Signal-Desktop that referenced this issue Nov 23, 2017
This commit adds a tray icon to the application, shown in the system
tray bar, that can be used to minimise the application window.  This
is a common feature on most desktop messaging apps (e.g. Telegram
Desktop or Slack) and allows to save space in the system task bar.

The tray icon provides a context menu that contains a button to
show/hide the application window, and a button to quit the
application. When the tray icon is clicked, the visibility of the
window is toggled.  When the close (x) button of the window is
pressed, the application is not terminated but minimised to the tray
icon instead (it can be terminated by using the "Quit" entry in the
File menu or in the context menu of the tray icon).

The tray icon is disabled by default, and two command line arguments
are available to enable it:
  --use-tray-icon: enables the tray icon
  --start-in-tray: enables the tray icon and the application starts
                   minimised in the tray bar

Resolves: signalapp#1480
scottnonnenberg pushed a commit that referenced this issue Nov 27, 2017
This commit adds a tray icon to the application, shown in the system
tray bar, that can be used to minimise the application window.  This
is a common feature on most desktop messaging apps (e.g. Telegram
Desktop or Slack) and allows to save space in the system task bar.

The tray icon provides a context menu that contains a button to
show/hide the application window, and a button to quit the
application. When the tray icon is clicked, the visibility of the
window is toggled.  When the close (x) button of the window is
pressed, the application is not terminated but minimised to the tray
icon instead (it can be terminated by using the "Quit" entry in the
File menu or in the context menu of the tray icon).

The tray icon is disabled by default, and two command line arguments
are available to enable it:
  --use-tray-icon: enables the tray icon
  --start-in-tray: enables the tray icon and the application starts
                   minimised in the tray bar

Resolves: #1480
@Samillion
Copy link

This would be a great feature to have on Signal. Having it run in background with a tray icon and notification badges would be the ideal experience on Windows.

@LanceHaverkamp
Copy link

Why does this keep getting closed, rather than assigned? Clearly there is significant demand, for all operating systems.

@scottnonnenberg
Copy link
Contributor

@LanceHaverkamp If you'd like to try the prerelease tray functionality, you can start the app with --start-in-tray.

@LanceHaverkamp
Copy link

@scottnonnenberg Wonderful!!!!! Thanks! Not sure why my searching for this very answer was not productive, but that's exactly what I was looking for!

@inferno493
Copy link

How do I apply the start command to the Windows client?

@paulsommer
Copy link

paulsommer commented Feb 28, 2018

I was missing the tray option, too. Nice to see it's already there. :-)
My problem is that there is no icon for it, only a blank field (working, but not nice)
Can anybody help me? I'm on debian Stretch and KDE

Ah, and I would like to open it with a double click instead/beside of the context menu.

@mpsdskd
Copy link
Author

mpsdskd commented Feb 28, 2018

I guess you also are affected by this problem: #1876

@paulsommer
Copy link

paulsommer commented Feb 28, 2018

Exactly. Thanks for that. It's working even so I don't have unity^
For the others come here: the command is:
XDG_CURRENT_DESKTOP=Unity signal-desktop --start-in-tray

@cdysthe
Copy link

cdysthe commented Mar 21, 2018

@paulsommer I just installed Signal on KDE as well and get an ugly white square where the tray icon should be (when adding '--start-in-tray'. Have you found a solution to this or do we just have to wait unti lthey get around to fix this? All other messaging apps I have used on KDE (FB Messenger, Slack, Viber, Telegram and Skype) had functional tray icons. I was really surprised to find that Signal isn't. I hope this will be fixed soon.

@paulsommer
Copy link

paulsommer commented Mar 21, 2018

Hmm, dunno. For me the preceeding XDG_CURRENT_DESKTOP=Unity did the trick.
with
signal-desktop --start-in-tray
I also have a white sqaure. But when I use
XDG_CURRENT_DESKTOP=Unity signal-desktop --start-in-tray
I get a blue square with a white balloon in my system tray. Looks like it should be.
Unity is not installed on my system.
Just try it from the command line first.

@neteler
Copy link

neteler commented Apr 15, 2018

FWIW, tray startup also works on Fedora (signal installed via https://copr.fedorainfracloud.org/coprs/luminoso/Signal-Desktop/)

@ellisgl
Copy link

ellisgl commented Aug 12, 2018

I too wish there was a "Close to tray option". I keep accidentally closing it out with "X" when trying to close out of a picture.

@toxpal
Copy link

toxpal commented Oct 16, 2018

Didn't want to submit new ticket, but I have the same issue... Running antergos KDE and every time I start Signal (no matter if it's "normal" or tray mode), I only see empty square icon in tray, which says "Electron".

I got it fixed by using "XDG_CURRENT_DESKTOP=Unity signal-desktop --start-in-tray" command, but one issue remains: clicking the icon does not bring Signal window (even if icon is displayed properly now). The only way to open Signal is to right-click tray icon and click "Show".

@mdcramer
Copy link

signal-desktop --start-in-tray works well, although you'd probably have to be someone who reads Github to figure out how to edit the startup shortcut in Windows so that it happens automatically. It would be cool if it worked like the Slack desktop app, in this respect, but this is already a great product.

@mixpix
Copy link

mixpix commented Dec 26, 2018

OS: Windows 10.
I would also like to see the auto launch with Windows startup and minimize to system tray/notification area. These are major features for all chat systems on desktop. It's just not user friendly if it has to be manually started and runs in the task bar all the time.

@corsac-s
Copy link

I'm running Signal desktop (beta, 1.19.0-beta.4 package) on Xfce (Debian sid) and it seems that even with --use-tray-icon Signal won't appear in the system tray (so when it's close it's still running but I can't get it back).

There's a warning when starting in console but I'm unsure if it's related:

(electron) 'app.makeSingleInstance(cb)' is deprecated. Use 'app.requestSingleInstanceLock() and app.on('second-instance', cb)' instead.

@StavNoy
Copy link

StavNoy commented Jan 9, 2019

Running Signal desktop on Fedora 29 Xfce (4.12) via Snap package.
Tried with --use-tray-icon --start-in-tray, but no change.
I'm getting the same 'app.makeSingleInstance(cb)' is deprecated. warning as @corsac-s .
I'm also getting WARNING: XAUTHORITY environment value is not a clean path: "/run/lightdm/username/xauthority", which seems to be the same as this solved problem on snapcrafters, so I assume it's a problem with the Snap port (unofficial?)

@LanceHaverkamp
Copy link

LanceHaverkamp commented Feb 6, 2019

The snap version does not support --start-in-tray but the flatpak does. I've tested this on both Ubuntu & Fedora. Unfortunately that has some issues as well; you have a large Freedeskop dependency. You must install from the terminal, not a graphical installer & uninstall as needed first:

$ sudo snap remove signal-desktop
$ flatpak uninstall org.signal.Signal
$ flatpak --verbose install flathub org.signal.Signal
$ flatpak run org.signal.Signal

...after all that, you can edit the launcher with --start-in-tray

@Biserkov
Copy link

--use-tray-icon --start-in-tray

Can someone edit the top post to add this info? I came across this issue TWICE before deciding to read all the way through, since it was CLOSED.

@bungabunga
Copy link

@Biserkov these are two commands and you don't have to fire both together. to start Signal Desktop in tray the second one is enough.

@RichAyotte
Copy link

Override the GNOME shell launch default by creating ~/.local/share/applications/signal-desktop.desktop with the following contents.

[Desktop Entry]
Name=Signal
Comment=Private messaging from your desktop
Exec="/opt/Signal/signal-desktop" --use-tray-icon %U
Terminal=false
Type=Application
Icon=signal-desktop
StartupWMClass=Signal
Categories=Network;InstantMessaging;Chat;

@corsac-s
Copy link

Override the GNOME shell launch default by creating ~/.local/share/applications/signal-desktop.desktop with the following contents.

[Desktop Entry]
Name=Signal
Comment=Private messaging from your desktop
Exec="/opt/Signal/signal-desktop" --use-tray-icon %U

That still doesn't work (with 1.26.2-beta.1). Nothing appears in the systray.

@RichAyotte
Copy link

@corsac-s gnome-shell needs to be re-started for the changes to .desktop files to take effect. Try ALT-F2 and enter r to restart gnome-shell

@corsac-s
Copy link

@corsac-s gnome-shell needs to be re-started for the changes to .desktop files to take effect. Try ALT-F2 and enter r to restart gnome-shell

I don't use gnome-shell, I start from the terminal using the command in the Exec= line. The command itself doesn't work.

@jazir555
Copy link

Is this SERIOUSLY not an implemented feature? Holy fucking shit. I cannot believe im going to have to spend hours googling to find a third party solution for closing/minimizing to tray

@GuardianMajor
Copy link

@jazir5 I am aware of the irony for saying this but instead of spamming everyone's mailbox with overt and unnecessary outrage, just read a tiny bit and you'll see no need for a third party anything, just some basic skill and common sense to modify the shortcut to launch minimized, as well as minimize to tray. Really simple really, I think they should close this topic to any more comments.

@jazir555
Copy link

jazir555 commented Sep 18, 2019 via email

@corsac-s
Copy link

@GuardianMajor the command line arguments don't work anymore, so editing the shortcuts won't do anything.

@bungabunga
Copy link

@corsac-s where exactly they do not work? i use command line arguments on ubuntu and windows and they work.

@corsac-s
Copy link

@bungabunga as indicated on #1480 (comment) I'm using Xfce (4.14 now) with their systray plugin, on Debian sid. Tray icon was working just fine until few months ago (maybe a year).

@GuardianMajor
Copy link

GuardianMajor commented Sep 18, 2019

@corsac-s as much as I hate to say this in response to people, it woks just fine for me as of this morning. Now I am on Windows if that matters, can't speak for Linux but even then it doesn't justify abusive, rude or insulting stance against the developers. Now I realize having issues on Linux would be a less than ideal situation and it is not a small group of people but it is indeed limited to specific platform right now so unfair to crap on the whole thing. Just my two cents.

You have probably done this already but if not, have you opened a ticket with them so they can follow through and find out why it is not working on Linux? or your particular distro or whatnot? I don't see @scottnonnenberg and them intentionally ignoring issues affecting a decent amount of people if they were aware of it, unless it is some kind of technical limitation that is stalling them.

@corsac-s
Copy link

@corsac-s as much as I hate to say this in response to people, it woks just fine for me as of this morning. Now I am on Windows if that matters

So yes, it's likely using different primitives and it's not surprising that it could work on one OS and not on the other

, can't speak for Linux but even then it doesn't justify abusive, rude or insulting stance against the developers.
Could you point me to where I have been abusive, rude or insulting? I don't think I ever was, but feel free to point me to it, I'm not a native speaker so maybe I fumbled things. Or maybe you confused me with someone else.

Now I realize having issues on Linux would be a less than ideal situation and it is not a small group of people but it is indeed limited to specific platform right now so unfair to crap on the whole thing. Just my two cents.
Again, I didn't “crap” on anything. I'm just saying the feature doesn't work for me (for a few months/year at least).

You have probably done this already but if not, have you opened a ticket with them so they can follow through and find out why it is not working on Linux?

I think that's exactly the point of that issue. Unless you mean someone else with “them”.

@scottnonnenberg-signal
Copy link
Contributor

Conversation deep in an already-closed issue is not the right way to make progress on anything. Clearly it works for some now, even on Linux, so a new bug with all the necessary details of the affected platforms would be great. Locking this issue now.

@signalapp signalapp locked and limited conversation to collaborators Sep 18, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Development

Successfully merging a pull request may close this issue.