user-none / KDocker

Dock most applications to the system tray
GNU General Public License v2.0
316 stars 22 forks source link

How to launch kdocker with a specific application automatically on boot? #23

Closed vayulove closed 7 years ago

vayulove commented 7 years ago

I'd like a specific application to always be in the system tray.

rapgro commented 7 years ago

You can run kdocker via autostart settings of your desktop environment. To be able to help with more details, we need to know what specific desktop do you use.

vayulove commented 7 years ago

I have KDE. It seems as if I need the window ID which I won't have at startup.

Daxx commented 7 years ago

Do you need a window ID because the title is not fixed? If so, there are bash tricks you can use, e.g. (prog-xyz &) && sleep 1 && kdocker -x $(pidof 'prog-xyz') -m -t -i ~/Icons/prog-xyz.png Starts your program in a subshell and waits for it to get a pID allocated, then passes its pID to kdocker with whatever other options you need. Put that in a script, if needed, then add it to: System Settings -> System Administration -> Startup and Shutdown -> Autostart

Daxx commented 7 years ago

What happens with just: kdocker prog-xyz ?

Daxx commented 7 years ago

What does this produce? kdocker -v

vayulove commented 7 years ago

Got it working, thanks.

nardopessoa commented 5 years ago

I follow this article and works well.

https://robbinespu.github.io/eng/2018/03/17/Minimize_spotify_linux.html

RFGMM commented 4 years ago

Do you need a window ID because the title is not fixed? If so, there are bash tricks you can use, e.g. (prog-xyz &) && sleep 1 && kdocker -x $(pidof 'prog-xyz') -m -t -i ~/Icons/prog-xyz.png Starts your program in a subshell and waits for it to get a pID allocated, then passes its pID to kdocker with whatever other options you need. Put that in a script, if needed, then add it to: System Settings -> System Administration -> Startup and Shutdown -> Autostart

(rogue-program &) && sleep 1 && kdocker -x $(pgrep -o 'rogue-program') -m -t -i /usr/share/icons/url-path-to-icon/icon.svg or png

pgrep -o show the first pid of the program because some programs have many pids. you need the one that is showing the window.