1

How to setup that a window (e.g. SMPlayer) is automatically shown after its start on all desktops?

PS: I know there is kstart, but I would prefer less hacky solution, one that works out of box with associated files and preferably can be activated via GUI for any application after installation/setup of this feature is done.

monnef
  • 233
  • 2
  • 8
  • Your title and your body ask completely different questions. Which one is it? Show a window on all desktops, or launch a program on a specific desktop? – Gilles 'SO- stop being evil' Nov 02 '16 at 22:13
  • Both - remember on which specific desktop the window (app) is shown (note that one option is "all desktops") and when the app is closed and launched again show it on the previously selected desktop. I am sorry, English is not my native language, so it probably sounds cumbersome :(. – monnef Nov 03 '16 at 07:30

1 Answers1

2

If you are happy with a solution with config files: Install devilspie2 (Ubuntu: sudo apt install devilspie2) and create a ~/.config/devilspie2/smplayer.lua with this content:

if (get_application_name() == "SMPlayer") then
  pin_window();
end  

Then run devilspie2 and if everything works as expected, make sure KDE starts it after login.

Jakob Lenfers
  • 737
  • 6
  • 20
  • 1
    I was secretly hoping for a more "clicky" solution, but this works just fine. Thank you :). – monnef Nov 03 '16 at 13:00
  • I'll just add that in Ubuntu one can install the tool from repository - `sudo apt-get install devilspie2`. – monnef Nov 03 '16 at 14:23