This forum has been archived. All content is frozen. Please use KDE Discuss instead.

looking for a kwin script ..WARNING i have 0 code skills ;-)

Tags: None
(comma "," separated)
zeltak
Registered Member
Posts
18
Karma
0
Hi guys

first a WARNING i have 0 code skills so this is more of a request or "Cry for help" :)

I have a particular use case where my screen #1 (S#1) is a laptop and sometimes at home i add an additional screen (S#2).

Im looking for an automated way to have some windows auto move to S#2 when connected and stay there no matter which desktops i use on S#1
currently im using a manual method where every day i get home, connect S#2, manually move 3-4 windows to S#2, quick tile them and then add a sticky state to each one.
i started using the amazing new kcreen module:
http://www.afiestas.org/kscreen-1-0-released/

and it seems very intelligent on knowing when a new monitor is connected/disconnected so that could be really helpful

so what im asking is
a) does anyone have a similar workflow and has any tips/ideas on the subject?
b) alternatively as a temporary solution maybe someone could help create a script where it would take all windows on current desktop on S#1 and move them to S#2 and auto create a sticky state for all of them?

sorry for the long post, just some ideas i thought could be useful for other people!

thx alot
luebking
Karma
0
This is doable.

If someone is interested in scripting this, but needs assistance, feel free to approach "kwin 'æt' kde 'døt' org" anytime (or ask here)

KWin scripting API:
http://techbase.kde.org/Development/Tut ... ng/API_4.9

Bunch of KWin scripts to look up (the downloaded file is despite the .kwinscript extension just a .zip)
http://kde-look.org/index.php?xcontentmode=91


As starting points:
- you want to connect to numberScreensChanged(int count) and at startup check numScreens.
- First obstace will likely be to get the window on the proper screen (toplevel.screen is not writable, so you'll have to walk a different path. Hint: KWin more or les considers windows to be on a screen when their center is)
This script http://kde-look.org/content/show.php/Ga ... ent=156659 can select windows by their class.


Bookmarks



Who is online

Registered users: Bing [Bot], Google [Bot], q.ignora, watchstar