I'm not sure what you mean by pin pictures? Like in youtube in a browser where you can pop a window out? In any case you probably want to see kwin scripting: https://develop.kde.org/docs/plasma/kwin/ There is a DBus API to trigger scripts.