3

I am using XFCE and I would like to have a shortcut to move some windows to other workspaces in order to "clean up" current workspace.

I know, there are settings for this kind of shortcuts (move the window to workspace number bla-bla as well as to workspace left/right/...). But the drawback here is that using this shortcuts the workspace is also switched, so "cleaning up" you all the time need to switch back to the original workspace. Is there a possibility to setup some shortcut, which would "send" a window to some workspace but the active workspace would not "follow" the window?

A solution that I like was proposed in GNOME2: moving window by arrows switches workspace also, but using workspace number does not switch the workspace (or vice versa, but it is not important here). Is there something like this for XFCE?

1 Answer 1

1

You should be able to do something using wmctrl which interacts with a EWMH compatible window manager such as Xfce. From the man page

wmctrl -r <WIN> -t <DESK>

You can specify the <WIN> by title name, or use :SELECT: and click on the window, or use :ACTIVE: for the current window. (I'm not able to try this at the moment.)

3
  • Thank you! Assigning 'wmctrl -r :ACTIVE: -t <DESK>' to keyboard shortcuts, I could reach desired behaviour. What I realized, XFCE keyboard shortcut tool does not work with keypad keys... So, I could assign shortcut as <Super>KP_1 but on hitting it nothing happened. It is not critical for me, but in te
    – Cupora
    Commented Sep 14, 2016 at 9:05
  • I do unsuccessfully wmctrl -r 1 -t 2 in Debian 8.5 Gnome 3.14. How can you find IDs for <WIN> and <DESK>? Commented Oct 3, 2016 at 9:23
  • in case anyone needs, i made two scripts that send a window to the next workspace, using your anwser and @Cupora's hint :ACTIVE:, as well as this superuser.com/a/1033185/230014 This results in: gist.github.com/LC43/e45eb381e87f5db43279979e7141bc63 and gist.github.com/LC43/e31a3ceb8f5f5f31e6838022991a4024 . Then i assigned a shortcut to each.
    – pcarvalho
    Commented Jan 10, 2019 at 2:01

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .