[i3-discuss] Re: is there a way to select a window for repositioning

  • From: Orestis Flo <orestisf1993@xxxxxxxxx>
  • To: frederik@xxxxxxx
  • Date: Sat, 13 Oct 2018 15:02:00 +0300

vim-like marks have been around for a long time:
https://github.com/i3/i3/commit/3ada8f326cc48ea0f12c9f1434fbb2b76ed4c0a0
'move to mark' is a bit more recent:
https://github.com/i3/i3/commit/94bbdc9159f43181f9d9069893e812c1226eda00
which was released in 4.11 - 2015

On Sat, Oct 13, 2018 at 1:52 PM <frederik@xxxxxxx> wrote:

That's great, thank you!

Any idea how long this feature has been around?

On Sat, Oct 13, 2018 at 12:38:15PM +0300, Orestis Flo wrote:
You can use vim-like marks:
https://i3wm.org/docs/userguide.html#vim_like_marks

bindsym $mod+c mark _copy
bindsym $mod+p mark _paste, [con_mark=_copy] move to mark _paste

On Sat, Oct 13, 2018 at 9:02 AM <frederik@xxxxxxx> wrote:

Dear i3 people,

I normally move windows with commands like

    bindsym $mod+Ctrl+b move left

or

    bindsym $mod+Ctrl+1 move container to workspace 1

Sometimes this is cumbersome, because for example with the first
command I am staring at the same window the whole time I am trying to
move it left or right among the tabs. (It's a bit hard to explain; try
moving a window to see what I mean.) I have to figure out where I'm
moving the window by looking at the titles of neighboring windows,
which are sometimes not unique. For the second command it's pretty
much the same problem, I'm looking at the window I want to move and I
have to keep in my head which sort of windows are in Workspace 1, or
whatever workspace I want the focused window to have its new home.

It would be easier for me if I could have some command to select a
window, like "copy" or "kill" (Emacs terminology), so that the window
is in a "clipboard" or "kill ring", and another command which is like
"paste" or "yank" which would move the copied window just after (or
before) the one which is currently focused.

I think that in many cases this would provide a more natural user
interface, since I would be able to see the future neighbors of the
window I am trying to move, rather than just seeing their titles or
knowing their workspace numbers. Often I already have a familiarity
with the window I am trying to reposition, but I need to remind myself
what sort of other windows are in a particular workspace, or in a
particular area of the current workspace. Being able to see these
other windows before initiating the "move" operation would be helpful.

In other words, I want to have an interaction like this:

    * realize that I want window A next to window B
    * navigate to window A
    * "select/copy" window A
    * navigate to window B
    * "paste" window A next to window B

Has anyone suggested or implemented this idea?

Thanks,

Frederick



Other related posts: