Is it possible to run the program so that it is immediately minimized? For example, if I want to add telegram-desktop to autostart, but I don’t want to see the window every time I start it (when closed, this application “hides” in the tray).
Some apps can do this out of the box, but some don’t. Is there a solution that will allow you to launch the application and then close its window automatically?
You should normally be able to do this by way of a window rule.
System Settings → Workspace → Window Management → Window Rules
Alternatively, you can directly configure it for a running application by right-clicking the title bar (or left-clicking the “window properties” button if you have that on your title bar) and selecting “More Actions”, and then either “Configure Special Window Settings” or “Configure Special Application Settings”.
The difference between those two options is that the latter option will affect all of the windows belonging to the given application, whereas the former option will affect only the selected window — e.g. only the main application window but not the application’s child windows.
However, be advised that it’s going to be a bit of trial and error, because the interface for setting up and configuring the window rules has been changed a couple of Plasma versions ago.