Problem
I'm on a default Ubuntu 22.04 desktop. I repeatedly have to move windows around on my desktop and I would like to do that using a script.
wmctrl
This seems like it was a solution in the past and it still works with some apps (e.g.: Signal desktop), but for example it does not recognize the terminal window (anymore?).
dbus
I've read a couple of threads where people used dbus
to do some automation. And it makes sense to me that this could be the solution. I just have trouble finding the information or even finding out if this is at all possible.
Using d-feet
I see a bunch of stuff in the system and session bus. And I even managed to get some info (org.gnome.Terminal has a bunch of methods). But now I'm already at my first blocker: What kind of parameter do they expect?
/org/gnome/Terminal/window/1
Activate (String action_name, Array of [Variant] parameter, Dict of {String, Variant} platform_data) ↦ ()
If I want to activate a window, what else could it expect other than the window ID?
Other apps
Signal offers some methods but they're all about notifications. Thunderbird and pycharm do not offer anything.
Summary
I think if I want to manage windows (move, maximize, minimize, activate), I should be talking to a desktop service? Not the apps themselves? How do I find more info on what to do? Is there documentation on what parameters those methods expect? I'm totally fine if you only have pointers to additional documentation since this seems kind of a new area and people don't have that one super command at hand that solves all issues.