I am using several programs on my computer that minimize to tray, but do not have an option to start minimized to tray. I have them set to open at the start, and as a result every time I boot up my computer I have to close a bunch of random windows. Needless to say, that is a bit annoying.
Is there a way to create some kind of startup script that will open these programs and then close their windows, without killing the process entirely?
Assuming you have ‘MinimizeAll’ script enabled then the following qdbus string should work.
I’d probably just put it all in one script, and use kstart5 to breakaway the processes … such as:
The problem is I would like the windows closed, not minimized. And only specific ones, others I would like open. I kinda have a lot of startup programs lol
Oh sorry I guess I misunderstood this.
So its windows that are closed but not exited the application, icon still exists in task tray in panel.
There is probably another qdbus way of doing it … but all of my tests show it unreliable because it closes whatever open window. I also feel something like pkill would terminate the whole process.
So … unless someone has a better idea … then you could maybe employ xdotool or wmctrl.
So what you want is not to close them, but to minimize them - if possible to the system tray.
… I don’t know how to do it, never had a need for that -
depends on the program as well.
But if you can do it with a mouse action, it’s also doable via command line usually.