gyunaev / birdtray Goto Github PK
View Code? Open in Web Editor NEWnew mail system tray notification icon for Thunderbird
License: GNU General Public License v3.0
new mail system tray notification icon for Thunderbird
License: GNU General Public License v3.0
Birdtray never displayed any notification at my workstation and after a bit of stracing I concluded this is because I had Global Search and Indexer disabled. Since I have over a million emails stored, enabling this produces >2g sqlite database (which took all night), adds few hundred of ram to Thunderbirds usage and slows down performance quite a bit. I don't need/use GS&I feature and I only want to be notified of new mail in Inbox folders, so this is severe overkill. Is there any other possible way of getting new mail notification status? Maybe directly stating Inbox mbox file or something similar?
Also, probably adding note to documentation that GS&I must be enabled might be useful to someone.
Hi, I have assigned a keyboard shortcut for launching TB, but when I launch it with that key, the "link" between Birdtray state of TB and the real state of TB seems to be lost, and the only way to "link" them again, so Birdtray can minimize and show TB again, is to click the icon couple of times.
After activating TB with the key, there are no two TBs active, only the same one.
It would be nice if we could bind a key to, say, birdtray --show/hide
so Birdtray would do the same action as clicking on its icon, i.e. know what the current state of TB is and manage it.
Is something like that maybe already possible? What do you think?
Hi,
compiling on above systems (I guess QT 5.9) I get 3 compilation errors in menu->addAction() calls
(bad parameters). Solved like this :
`
// menu->addAction( tr("New Email Message"), this, &TrayIcon::actionNewEmail );
QAction * mMenuNewEmail = new QAction( tr("New Email Message"), this );
connect( mMenuNewEmail, &QAction::triggered, this, &TrayIcon::actionNewEmail );
menu->addAction( mMenuNewEmail );
`
`
// menu->addAction( tr("Settings..."), this, &TrayIcon::actionSettings );
QAction * mMenuActionSettings = new QAction( tr("Settings..."), this );
connect( mMenuActionSettings, &QAction::triggered, this, &TrayIcon::actionSettings );
menu->addAction( mMenuActionSettings );
`
`
// menu->addAction( tr("Quit"), this, &TrayIcon::actionQuit );
QAction * mMenuActionQuit = new QAction( tr("Quit"), this );
connect( mMenuActionQuit, &QAction::triggered, this, &TrayIcon::actionQuit );
menu->addAction( mMenuActionQuit );
`
(your code commented here)
Ubuntu Xenial 16.04 LTS supports Qt up to 5.5.1 without external packages. As commit 9103218 offers to re-add Qt 5.5 support upon request, here it is. ;-)
I added this account :
mailbox://nobody@Local%20Folders/Inbox
The corresponding path on my pc is :
/home/massimo/.thunderbird/xhhp31gc.default/Mail/Local Folders/Inbox
(and Inbox.msf)
When I installed it it showed some non-existing new mails; i fixed with Fix button, now the icon is ok, but new mails are not shown.
The rest is more than perfect, I was waiting since longtime for such an extension.
Displaying the mail counter atop the Thunderbird icon makes the counter hard to notice — much less read the number it shows. Even setting the color to something highly contrastive to colors of the icon (ie, black, white and blue) doesn't seem to help:
Firetray avoid this by showing the numer atop a completely blank icon (with nothing but a frame and a gradient).
There's an option in Birdtray to use a different icon when unread, but 1. it's off by default, 2. no icons are provided, and 3. it requires a specific size — for example, trying to using Firetray's icon results in:
One last thing for a old fart like me. Please add an option to adjust the font size.
Should be my last request.
This is great work, iv been hunting for months for just this app so thank you very much for the work.
I have recently installed BirdTray and tested it and one feature I feel is missing is that when pressing the close application in the window decoration, I wish it could iconify to the tray like FireTray does.
I know you can almost get it by enable the "restart thunderbird if it was closed", but if flashes on the screen and also you would loose what you are doing at the moment.
I have built birdtray 1.4 from source (Ubuntu 18.04.1, KDE 4.14.38, Thunderbird 60.2.1) and want to reset the counter (it shows a number with about 10 digits, I can't read it). The button to fix this grayed out, though. Did I miss something that could solve the problem?
Thank you!
Many thanks for the functional replacement for Firetray! So annoying to not be able to hide TB in tray.
Would it be possible to implement the behavior described in the subject line?
Firstly i really appreciate the work on a TB tray integration for linux (especially KDE) so thank you.
I noticed a couple of bugs -
when trying to enter the profile path with the GUI file browser it will not accept the proper profile folder, it rejects it with the message that it must contain global-messages-db.sqlite but it does. I had to put the path in manually (text) it accepts it fine then.
Also the "show thunderbird" from the context menu of tray icon does not do anything even if TB is only minimized.
I am now using Kdocker to iconify, TB's settings to pop-up & sound notify and birdtray to show a persistent tray notification that i have unread/new mail. Its all a bit of a mess but that's mozilla and KDE's fault. Even though i now have to have 2 separate icons for the single app I'm happier than i was before so cheers for the work.
Manjaro KDE
Please clarify what packages I need to have installed to be able to compile this on Kubuntu 18.04:
$ qmake
qmake: could not exec '/usr/lib/x86_64-linux-gnu/qt4/bin/qmake': No such file or directory
$qmake-qt5
Der Befehl 'qmake-qt5' wurde nicht gefunden, meinten Sie:
Befehl 'qmake-qt4' aus dem deb qt4-qmake
Versuche: sudo apt install
$ sudo apt install qt5-qmake
Paketlisten werden gelesen... Fertig
Abhängigkeitsbaum wird aufgebaut.
Statusinformationen werden eingelesen.... Fertig
Die folgenden zusätzlichen Pakete werden installiert:
qt5-qmake-bin
Die folgenden NEUEN Pakete werden installiert:
qt5-qmake qt5-qmake-bin
0 aktualisiert, 2 neu installiert, 0 zu entfernen und 0 nicht aktualisiert.
Es müssen 1.118 kB an Archiven heruntergeladen werden.
Nach dieser Operation werden 4.388 kB Plattenplatz zusätzlich benutzt.
Möchten Sie fortfahren? [J/n]
Holen:1 http://de.archive.ubuntu.com/ubuntu bionic/main amd64 qt5-qmake-bin amd64 5.9.5+dfsg-0ubuntu1 [938 kB]
Holen:2 http://de.archive.ubuntu.com/ubuntu bionic/main amd64 qt5-qmake amd64 5.9.5+dfsg-0ubuntu1 [180 kB]
Es wurden 1.118 kB in 1 s geholt (2.074 kB/s).
Vormals nicht ausgewähltes Paket qt5-qmake-bin wird gewählt.
(Lese Datenbank ... 334305 Dateien und Verzeichnisse sind derzeit installiert.)
Vorbereitung zum Entpacken von .../qt5-qmake-bin_5.9.5+dfsg-0ubuntu1_amd64.deb ...
Entpacken von qt5-qmake-bin (5.9.5+dfsg-0ubuntu1) ...
Vormals nicht ausgewähltes Paket qt5-qmake:amd64 wird gewählt.
Vorbereitung zum Entpacken von .../qt5-qmake_5.9.5+dfsg-0ubuntu1_amd64.deb ...
Entpacken von qt5-qmake:amd64 (5.9.5+dfsg-0ubuntu1) ...
qt5-qmake-bin (5.9.5+dfsg-0ubuntu1) wird eingerichtet ...
qt5-qmake:amd64 (5.9.5+dfsg-0ubuntu1) wird eingerichtet ...
Trigger für man-db (2.8.3-2) werden verarbeitet ...
$ qmake
qmake: could not exec '/usr/lib/x86_64-linux-gnu/qt4/bin/qmake': No such file or directory
$ sudo apt install qt4-qmake
Paketlisten werden gelesen... Fertig
Abhängigkeitsbaum wird aufgebaut.
Statusinformationen werden eingelesen.... Fertig
Die folgenden NEUEN Pakete werden installiert:
qt4-qmake
0 aktualisiert, 1 neu installiert, 0 zu entfernen und 0 nicht aktualisiert.
Es müssen 1.366 kB an Archiven heruntergeladen werden.
Nach dieser Operation werden 5.335 kB Plattenplatz zusätzlich benutzt.
Holen:1 http://de.archive.ubuntu.com/ubuntu bionic/universe amd64 qt4-qmake amd64 4:4.8.7+dfsg-7ubuntu1 [1.366 kB]
Es wurden 1.366 kB in 0 s geholt (2.940 kB/s).
Vormals nicht ausgewähltes Paket qt4-qmake wird gewählt.
(Lese Datenbank ... 334943 Dateien und Verzeichnisse sind derzeit installiert.)
Vorbereitung zum Entpacken von .../qt4-qmake_4%3a4.8.7+dfsg-7ubuntu1_amd64.deb ...
Entpacken von qt4-qmake (4:4.8.7+dfsg-7ubuntu1) ...
qt4-qmake (4:4.8.7+dfsg-7ubuntu1) wird eingerichtet ...
Trigger für man-db (2.8.3-2) werden verarbeitet ...
$ qmake
Project MESSAGE: Warning: unknown QT: x11extras
$qmake-qt5
Der Befehl 'qmake-qt5' wurde nicht gefunden, meinten Sie:
Befehl 'qmake-qt4' aus dem deb qt4-qmake
Versuche: sudo apt install
$ sudo apt install x11extras-dev
Paketlisten werden gelesen... Fertig
Abhängigkeitsbaum wird aufgebaut.
Statusinformationen werden eingelesen.... Fertig
E: Paket x11extras-dev kann nicht gefunden werden.
$ sudo apt install libx11extras-dev
Paketlisten werden gelesen... Fertig
Abhängigkeitsbaum wird aufgebaut.
Statusinformationen werden eingelesen.... Fertig
E: Paket libx11extras-dev kann nicht gefunden werden.
What am I supposed to do?
First of all I would like to give my complements to a very useful app, great!
Would love to see an option to have Thunderbird minimized into the tray when first launched, if that would be possible.
/Thanks
Hi. Let me first thank you for this tool. A life saver.
I managed to make everything working (with mork parser, global search doesn't work), but the readibility of the unread count is quite bad. I'm using dark theme with Cinnamon on Arch, and if I have no blinking, it is (almost) impossible to read the count, as it is displayed on top of TB icon.
Maybe to have two icons, one for 0 unread emails (current), and another for X unread emails, where the latter would be dimmed, changed completely (maybe blank) or set by the user?
I compiled and get the following when I run ./birdtray.
QWidget::insertAction: Attempt to insert null action
UnreadCounter generated an error: Error opening sqlite database: unable to open database file
I am running Manjaro KDE.
Thanks...
I wanted to take a look at the config file and found in in /home/USER/.config/ulduzsoft/birdtray.conf
I think /home/USER/.config/birdtray/birdtray.conf is much more intuitive and saves time when looking for the config file
First of all, thanks for your work! I missed this type of addon so much!
But now for the problem:
Every time I change some settings, eben if I just open the settings dialog and press cancel, birdtray crashes.
caesar@arch ~ % birdtray
Color for ID 2: #ff0000
Color for ID 24: #ff0000
Color for ID 32: #ff0000
Color for ID 34: #ff0000
List of all IDs: 2,24,32,34
unreadCounterUpdate 1
Window ID found: 0
Window ID found: 58720272
QProcess: Destroyed while process ("/usr/bin/thunderbird") is still running.
I am on the latest build and use arch with the awesomewm windows manager
This is on Manjaro KDE and birdtray-git (latest).
When Birdtray is running (just sitting in the tray and no notification) the system idle cpu usage rises to a constant level of about 5-6% for process 'kwin_x11' and about 3-5% for process 'plasmashell'. When Birdtray is killed the idle cpu settles down to almost 0%. There must be some cpu leakage with Birdtray? Note: The Birdtray cpu is as described above regardless of if Thunderbird is running or not.
Really hope there is a fix for this.
This seems fairly straightforward to build on a UNIX sys but a little more problematic on a Windows env. Is there any kind of recipe or cookbook for building this on Windows? Thanks, as I would LOVE to give this a try
Reproduction:
If you set the blink rate to zero it does not show any type of notification or number but it could, just put a static count number on top of the static icon then you would still have a persistent notification plus the count number just without the blinking (if your not into it).
I'v got the idea working in trayicon.cpp with just a few lines, just a pity i cant for the life of me figure how to use github, i just don't code enough any more to warrant figuring it all out.
I found you might need to make the font bold to make the number show up nicely against the icon.
I set birdtray to monitor 3 smartfolders within 3 accounts of mine, but birdtray will always add …/…/INBOX.msf to the accounts to monitor
list on its own… I end with too much folders monitored and incorrect unread count.
Each time I remove
…/…/INBOX.msf folders, they are re-added by birdtray after I close the settings window.
Hi there,
As a Firetray refugee now on Birdtray, my muscle memory is still trained to right-click on Birdtray to write a new message without ever maximizing the main TB interface. Would that be possible to add to Birdtray?
Thanks very much for keeping TB usable for me by creating Birdtray.
Hello,
I'm getting a compile error in Kubuntu 18.04.
/usr/lib/qt5/bin/moc -DQT_DEPRECATED_WARNINGS -DQT_NO_DEBUG -DQT_X11EXTRAS_LIB -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB --include ./moc_predefs.h -I/usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux-g++ -I/home/jeremy/Build/birdtray/src -I/usr/include/x86_64-linux-gnu/qt5 -I/usr/include/x86_64-linux-gnu/qt5/QtX11Extras -I/usr/include/x86_64-linux-gnu/qt5/QtWidgets -I/usr/include/x86_64-linux-gnu/qt5/QtGui -I/usr/include/x86_64-linux-gnu/qt5/QtCore -I/usr/include/c++/7 -I/usr/include/c++/7/x86_64-suse-linux -I/usr/include/c++/7/backward -I/usr/lib64/gcc/x86_64-suse-linux/7/include -I/usr/local/include -I/usr/lib64/gcc/x86_64-suse-linux/7/include-fixed -I/usr/x86_64-suse-linux/include -I/usr/include trayicon.h -o moc_trayicon.cpp
usr/include/c++/7/bits/stl_relops.:67: Parse error at "std"
Makefile:452: recipe for target 'moc_trayicon.cpp' failed
make: *** [moc_trayicon.cpp] Error 1
Any idea what the problem could be?
Thanks
i often like to leave mail marked as unread so they draw my attention later, however i would like birdtray to cease notifying of unread mail once i un-hide TB and not notify again until the next mail arrives
in other words, detect the TB window state and, if visible, set the unread count to 0 and wait for new mail
When using birdtray to start TB, all entries from the systray are removed are I need to restart Plasma to get them back. Screenshot: https://i.imgur.com/HocsSHj.png
Otherwise, good work. Maybe sound notification or run script on new mail?
BT 1.4 (AUR)
Manjaro, KDE/Plasma
R-click tray icon -> settings -> new email -> [x] enable new email submenu
click ok, then R-click the tray icon again and there are duplicate menu items - what ones are duplicated seems to change - currently 2 'quit' items - all is normal again after exiting and restarting BT
R-click tray icon -> settings -> new email -> [x] enable new email submenu
click 'edit' and the program quits - console says:
$ birdtray
Triggering the unread counter update
Unread counter for /home/me/.thunderbird/x3sj0l37.default/Mail/Local Folders/Inbox.msf: 0
Window ID found: 5800011
Segmentation fault (core dumped)
Hi. Thanks for finally solving the tray issue! :)
I am using the sqlite option, because the mork file didn't really work for me (didn't detect changes on one account, and was showing 2-3 unread when everything was read).
As I see the mork file type is deprecated by mozilla, and it's extremely hard to understand them.
So I looked at the sqlite database (global-messages-db.sqlite), and it was easy to get how that works.
Browsing my email database I realized 2 problems:
Both problems were solved by deleting my database and let Thunderbird rebuild it. I also have the ID 59 now, and no read emails showing up as unread. So old databases can have such "corruption" issues.
Maybe it is useful to tell people in the docs that if they get wrong results using the sqlite db, backup and remove their db and let Thunderbird recreate it.
I have implemented Mork parser, which implements unread notifications differently, by querying the actual MSF file. This it will work with search disabled, and should work in many other scenarios.
If you'd like to test it, please do the following exactly:
Now you should be using the Mork parser. Try it by making a message unread in Thunderbird, the counter should adjust immediately.
This should likely fix #19, #18, #17, and #14, and is eventually going to be the preferred method, so please test.
If you use the icon context "quit" to intend to close down TB + birdtray it does not. It does end the birdtray process but leaves TB running and unreachable.
If global search is not enabled, there is no messaging database and Birdtray will not work. In this case the first configuration should switch to using Mork parser automatically. Shall address #30.
Hi, does anyone have a success with ExQuilla add-on and new message detection.
As I noticed this plugin don't write anything into messages table. Example for two read messages in Inbox folder:
sqlite> select * from folderLocations where id=3;
3|exquilla://john_smith%40domain%[email protected]/Inbox|2|Inbox|50
sqlite> select count(*) from messages where folderid=3;
0
Any ideas how to fix this behavior?
P.S. ExQuilla is very useful if your company use MS-exchange as corporate email.
In Kubuntu 18.04 with Thunderbird 1:60.2.1+build1-0ubuntu0.18.04.2
I'm getting this error when launching birdtray:
UnreadCounter generated an error: Cannot query database
The icon displays a red X and I'm not notified of new email.
birdtray is running as user and all file permissions seem to be appropriate.
You need to remove .qmake.stash. It causes compile errors on Neon. It introduces a number of include paths that simply don't exist on other distros and causes a problem with: usr/include/c++/7/bits/stl_relops.:67: Parse error at "std".
At the very least, build instructions should be: make distclean; qmake; make.
Using Ubuntu 18.10, birdtray won't start if put into startup applications.
The following message can be found in /var/syslog
:
Sorry, system tray cannot be controlled through this addon on your operating system
Maybe birdtray is started before the gnome-shell's system tray is loaded?
At least I couldn't find it anywhere in the dialog (latest commit ab86e29).
My workaround was to add the thunderbird base folder in an older version (1.1)
Hi there, I loosely organize my life based on the "Inbox Zero" method of task management. That means that messages I need to follow up on are marked as "unread" for a certain amount of time. This appears to confuse Birdtray. After running the Fix for non-zero new message count the icon reset to its normal state. But after I received a few more messages in addition to the previously unread messages, the icon continues to flash the new unread count despite those new messages already being read. Thanks a lot!
To build birdtray on openSUSE, following packages including their dependencies are needed:
Then (as an unprivileged user) download or clone birdtray to somewhere in your home dir. Then:
cd src
qmake-qt5
make
After compiling start birdtray compiled in this folder to add some setting:
./birdtray
I see this is only meant to be installed on Bionic & up, & being on Xenial poses a problem. I don't really want to go through reinstalling my whole system just to get new Thunderbird with Birdtray working.
If need be I can revert to Thunderbird 38.x & keep using FireTray, but that'd be less than ideal. So am checking here in case there's a solution.
Hi there, first of all, thanks a million for this utility, it's really saving my workflow after losing the Firetray extension in TB 60.0+.
With Firetray, I could make it override the TB close button to minimize it to the tray. This is now undoable muscle memory for me, and I constantly close TB when I just want it to go the tray. Is there any way to add this functionality to Birdtray?
Thanks again!
Hi guanev,
I am facing the same issue with #39
Ever since it is closed, I am creating a new issue.
Unfortunately marking folders and/or emails, as per your above advice, does not help.
The tray icon is blinking and showing a big number of unread emails..
Ever since the "Fix" Button is inactive, I am not aware of what to do...
My Operating System is Arch.
Awaiting your further assistance
Thank you!
Ref #32
If anyone here has some free time and knowledge of Thunderbird extensions, I'd like to ask for help.
The current way I query the unread status from Thunderbird has two major disadvantages:
To address those issues I'd like to have an extension, likely based on a stripped-down FireTray. It should do the following:
I would then alter Birdtray to use this information, as this would allow much better user experience.
The advantage of this approach is that it does not depend on js-ctypes and thus will not be broken as long as XUL is supported by TB.
Just a heads up that if you have set up some account in the setting/account tab , if you click on any of the accounts thinking you can edit them or change the set colour it makes birdtray crash.
The only way to change a set colour or edit an account ATM is to delete them and then re-add them.
KDE , manjaro
First of all, thanks a lot for this great add-on. The concept is good - it's actually less of an add-on and more a Thunderbird babysitter ;)
Changing the font weight of the unread counter should allow to make the text bold.
Changing to to any value greater than 100% ... 120% ... 200% ... does not show any effect. Font remains "slim".
Use a font, which is bold by design.
master
as of writing this bug report), using the Mork parser(This is a default openSUSE Leap 42.3 system, highest patch level.)
Instead of selecting all individual account/folders can you have something like user@account/* or even default to show all unread mail?
Thank you for making this. After firetray became obsolete I have been searching forever for a replacement.
Thank you very much for making Thunderbird usable again.
For me, the most important feature of discontinued FireTray was indication of the chat status. As you can see at https://github.com/foudfou/FireTray/tree/master/src/chrome/skin/icons/linux/hicolor/22x22/status for linux it showed the connection status. And even more important, it changed the icon to blinking when new chat messages come in. As you see it is really important when Thunderbird is used as chat (XMPP or similar) client.
Could you think about integrating these features in your add-on?
mainly when iv just rebooted my OS.
Using "start thunderbird when birdtray starts".
Im getting multiple instances of thunderbird started.
❰greg❙~/git/birdtray/src(git✱≠master)❱✔≻ ./birdtray
Window ID found: 0
Starting Thunderbird as '/usr/bin/thunderbird'
Unread counter for /home/greg/.thunderbird/tzvg3gbn.default/Mail/smart mailboxes/Inbox.msf: 0
Window ID found: 0
Window ID found: 0
Window ID found: 0
Window ID found: 0
Window ID found: 0
Window ID found: 0
Starting Thunderbird as '/usr/bin/thunderbird'
Window ID found: 0
Window ID found: 0
[calBackendLoader] Using Thunderbird's builtin libical backend
Window ID found: 0
Window ID found: 0
Window ID found: 0
Starting Thunderbird as '/usr/bin/thunderbird'
Window ID found: 0
Window ID found: 0
Window ID found: 0
Window ID found: 0
Window ID found: 0
Window ID found: 0
Starting Thunderbird as '/usr/bin/thunderbird'
Window ID found: 0
Window ID found: 0
Window ID found: 0
Window ID found: 0
Window ID found: 0
Window ID found: 0
Starting Thunderbird as '/usr/bin/thunderbird'
Window ID found: 0
Window ID found: 0
Window ID found: 0
JavaScript error: chrome://calendar/content/calendar-views.xml, line 256: TypeError: this.rangeStartDate is null
Window ID found: 0
Window ID found: 0
Starting Thunderbird as '/usr/bin/thunderbird'
JavaScript error: chrome://global/content/bindings/tree.xml, line 1285: TypeError: this.parentNode is null
For one of the monitored account, the unread count won't go to zero. When I have no unread mail, it shows 1. When I have 1 unread mail, it shows 2. Etc.
I have tried the Fix button after having closed Thunderbird first, but the problem persists. I even tried to remove that account completely and then add it again, but still no change.
AB.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.