Score:1

How to move window between workspaces on Wayland using CLI (ubuntu 22.04)

ni flag
GZZ

Is there any way to move a particular window of an application (i.e. kitty terminal) between workspaces?

I would like to set up some keyboard shortcuts to achieve this with different applications. I would also need to interrogate the system to see if the window already exists (and create it if not).

Before moving to Ubuntu I was using Pop_OS and it was quite easy to achieve that, however on Ubuntu Wayland, I cannot see to find any description on how to achieve that.

Any help?

Score:0
cn flag

A Gnome Shell extension will be needed. Run or raise by e2rd can do what you are looking for. It is an extension that provides a much more powerful shortcut key daemon that fully can replace the Settings - Keyboard Shotcuts of gnome Shell (to me, it does). It's core feature is to be able to set up "Run or raise" style shortcut keys. Instead of just trying to load an application, the shortcut key will check whether a window is open or not. If a window is open, the shortcut brings the running window to the foreground. If not, the application is launched.

The move-window-to-active-workspace mode allows to achieve what you are after. If a window is already open, the shortcut key will move the window to the current workspace. See the documentation on the extension's website to learn how it is set up.

GZZ avatar
ni flag
GZZ
Thanks. I actually saw that extension before however was not working correctly as every now and then it was raising the wrong application. After your comment I gave it another chance and seems to work for now. I wish there was a way to interact with the windows through cli so I could write my own scripts though
vanadium avatar
cn flag
There are other extensions that expose a dbus interface to interact with windows.
GZZ avatar
ni flag
GZZ
any recommended ones?
vanadium avatar
cn flag
I do not remember the name. Take a look on the Gnome Extensions website, it is also there I encountered these.
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.