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

[KWin Scripting] Get Clientposition on Taskbar

Tags: None
(comma "," separated)
carstenk
Registered Member
Posts
1
Karma
0
TLDR: can i get the position of a client (listed in workspace.clientList) on the taskbar? per monitor?

Hey guys,
i was missing a (for me) really important feature in kde:
Switching between open windows with Hotkey+Number .
Even windows has this: with Win+1 you focus/activate the first open window, with win+2 the second, and so on...

So i though id give KWin Scripting a try.
So far so good - everything works in general. The only problem is, that the order of
Code: Select all
workspace.clientList

is not the same as the order of the windows on the taskbar.

An example:
Open windows are (in that order on the taskbar)
- Chromium
- Terminal
- Thunar

But workspace.clientList might give you:
[Thunar,Chromium,Terminal]

So if i press Hotkey+1 i currently do something like the following:
Code: Select all
workspace.activeWindow = workspace.clientList[0]

And i would expect my terminal to come up, but instead it will be chromium.

Any hints on how to work this out?

See the full stuff in this gist.
https://gist.github.com/cars10/92dd01185687ab6983f8


Bookmarks



Who is online

Registered users: abc72656, Bing [Bot], daret, Google [Bot], Sogou [Bot], Yahoo [Bot]