Hyprland icon indicating copy to clipboard operation
Hyprland copied to clipboard

moveclienttoworkspace clientX workspaceId

Open fedeizzo opened this issue 3 years ago • 7 comments

Hi, thanks for your work on Hyprland. I would to know if there is a plan to add a function to move a specific client to a particular workspace, I'm implementing an external multiple tagging system for windows through sockets. Given a string that represents a tag I want to move all clients that has that tag without the need of focusing them.

Example of usage

tag = get_tag_from_user()
tagged_clients = get_windows_with_tag(tag)
for client in clients
    send_to_socket('moveclienttoworkspace ' + client.id + '  name:' + tag)
    focust_workspace(tag) 

fedeizzo avatar Jul 02 '22 12:07 fedeizzo

The main problem with this approach is that during the iteration there would be a lot of movement caused by the focuswindow function. I would like a solution that moves clients in background. Another problem is related to the fact that more than one window may have the same title.

fedeizzo avatar Jul 02 '22 13:07 fedeizzo

Another problem is related to the fact that more than one window may have the same title.

and what do you want me to do about that?

The main problem with this approach is that during the iteration there would be a lot of movement caused by the focuswindow function.

Probably.

Is something like that planned? no. Will it be added? Maybe, not atm though, I have more important things to work on. Hyprland is not a tag-based compositor, and I don't understand how tags work either.

vaxerski avatar Jul 02 '22 14:07 vaxerski

and what do you want me to do about that?

The behavior of focuswindow is fine, no update is required.

Is something like that planned? no. Will it be added? Maybe, not atm though, I have more important things to work on. Hyprland is not a tag-based compositor, and I don't understand how tags work either.

Yes, no pressure. In my opinion, this feature is a "good to have" not a "must". I will try to explain my workflow for tagging. Let's suppose I have two tags: "work" and "uni". With my external program, I keep track of which windows are assigned to which tag. I work normally with hyprland keybinds to manage windows. At a specific moment, I want to see the status of all windows associated with the tag "work", my idea to do this is:

  1. create a workspace named "name:work"
  2. ask to the external program all windows id, the hex value printed with hyprctl clients
Window 24e61e0 -> hyprctl clients ~:
	at: 2,32
	size: 951,1166
	workspace: -1339 ()
	floating: 0
	monitor: 0
	class: kitty
	title: hyprctl clients ~
	pid: 5379
  1. for every window call moveclienttoworkspace id name:tag, in this example moveclienttoworkspace 24e61e0 name:work
  2. call workspace name:tag

This is a feature that I had in my xmonad config that helps me to have a quick overview of several windows associated with a specific task that I'm doing.

fedeizzo avatar Jul 02 '22 14:07 fedeizzo

This is not an ID per se, thats the physical address in memory the window is located at. But yes, I see your point

vaxerski avatar Jul 02 '22 14:07 vaxerski

Perfect. Thanks again for your time and your job. Do you prefer me to close the issue or keep it open?

fedeizzo avatar Jul 02 '22 14:07 fedeizzo

keep it

vaxerski avatar Jul 02 '22 14:07 vaxerski

forgot to mention, but this was added recently. see the wiki.

vaxerski avatar Aug 30 '22 19:08 vaxerski

Nice to hear that. Thanks

fedeizzo avatar Aug 31 '22 06:08 fedeizzo