@cas' suggestion to use xdotool
works. Not sure why previous attempts by OP weren't successful, perhaps a combination of Thunderbird updates and use of correct syntax.
The following command finds windows with Thunderbird in their name and sends the Get All New Messages key sequence to the first of the found windows:
xdotool search --name "Mozilla Thunderbird" key --window %1 shift+F5
Thanks to this thread I was able to set up KDE Connect to use my mobile to tell my laptop to download emails.
The way xdotool
's window search works is best explained in its manpages, but in short: it builds a memory structure containing all windows that matched your criteria. How these results are sorted in memory is not in user's control, so when referring to the first window in the results (%1
), you don't know which one it is. This could be the most common reason for xdotool
invocations to have no effect: keys could be sent to the wrong window. To prevent it, try to set window search parameters to return just one window. It is tempting to replace %1
with %@
(all matched windows), but this may include applications where the keys activate an action you don't want.
pacman -S mutt
... Seriously, if you want a command line mail client.thunderbird --help
will tell you how it is only built for a GUI.xdotool
? e.g. something likexdotool search --name thunderbird key shift+F5
. seeman xdotool
for more info, and note that some programs ignore events sent by xdotool, and/or ignore such events when not in focus.xdotool
but so far no luck. I can't get Thunderbird to accept any input. Using i3 as window manager which may complicate things, although there seem to be other reports of Thunderbird not taking any 'synthetic' inputs.