Xfce Forum

Sub domains
 

You are not logged in.

#1 2025-02-25 05:33:57

mabra
Member
Registered: 2015-09-05
Posts: 64
LinuxFirefox 115.0

looking for alternative for wmctrl/xdotool

Hello!

I have to rearrange my browsers regularly and I wrote a script for doing it.
The problem I see with both tools: They do not list any tabs (even not from terminals),
so my rearrangement fails often.
Does someone knows a better api/tool to list (and probably modify) windows
including tabs??
Looked on github for java/x11, but related stuff has no documentation.

Additionally, this MAY depends on features of the window manager, which I do
not have any clou about. May changing the window manager help?

Using xorg(7,4), xfce4(4.16), xfwm4(4.16), on debian 11, kernel 6.1

Thanks,
Manfred

Offline

#2 2025-02-27 15:19:34

k3dAR
Member
From: Czech Republic
Registered: 2022-07-27
Posts: 109
LinuxChrome 134.0

Re: looking for alternative for wmctrl/xdotool

not sure if any wm tool can handle list tabs inside window, but if you want recognize in multiple window of same browser name, independently on windows title based on active tab, maybe this be way, but of course only if you not have problem using diferent user profile for diferent windows :-)

using custom WM_CLASS:

# new profile you must first manualy create and activate
firefox --class Profile1 --profile Profile1Name
firefox --class Profile2 --profile Profile2Name

# or

# new profiles is auto generated
chrome_based --class Profile1 --user-data-dir /path/to/Profile1
chrome_based --class Profile2 --user-data-dir /path/to/Profile2

and list Windows with WM_CLASS column

wmctrl -l -x 

Offline

#3 2025-02-27 23:25:52

mabra
Member
Registered: 2015-09-05
Posts: 64
LinuxFirefox 115.0

Re: looking for alternative for wmctrl/xdotool

Hello!

Thank you very much and my big sorry not to have written, that I use this already.
This works perfect for different profiles, but not within the same profile - this is,
what I am needing.
I am using a regulary running task (running all 5 mins), which records the windows
in its desktops to become able to restore them to exactly these, but it fails for about
10-20% of the windows - the tab problem.

k3dAR wrote:

not sure if any wm tool can handle list tabs inside window, but if you want recognize in multiple window of same browser name, independently on windows title based on active tab, maybe this be way, but of course only if you not have problem using diferent user profile for diferent windows :-)

Another possibility could be to use another window manager, which is able to act on
window appearance/changes, but this is a little outside my current knowledge.

I have a python based script which is able to list all URLs, the browser has open,
but nothing about workspaces. Sadly, the author didnt reply to my question.
On the next hand, a browser-plugin cannot access the window/tab. This could
be used to run os-scripts (like videodownloadhelper).

Thanks!
Manfred

Offline

Registered users online in this topic: 0, guests: 1
[Bot] ClaudeBot

Board footer

Powered by FluxBB
Modified by Visman

[ Generated in 0.007 seconds, 7 queries executed - Memory usage: 527.5 KiB (Peak: 528.41 KiB) ]