The i3 FAQ has migrated to https://github.com/i3/i3/discussions. All content here is read-only.
Ask Your Question
0

Move floating window with arrows

asked 2013-10-27 07:35:37 +0000

majkinetor gravatar image

How to configure i3 to have mode for this, to move the floating window around with arrows or position it to the screen edge.

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
0

answered 2013-10-28 10:00:34 +0000

Adaephon gravatar image

updated 2013-10-28 10:01:27 +0000

As for just moving windows around with arrow keys, it uses the same command as moving tiled windows around. So this would be the way:

mode "moveit" {
    bindsym Up move up 20px
    bindsym Left move left 20px
    bindsym Down move down 20px
    bindsym Right move right 20px
    bindsym Mod4+m mode "default"
}
bindsym Mod4+m focus floating; mode "moveit"

<super>+m will focus the last active floating window and enter "moveit" mode. With the arrow keys you can move the window by 20 pixels. Giving a pixel value is optional with 10px as the default.

Moving windows to a specific screen border is a lot trickier as there are no readymade commands for this. You can move a window to the left upper corner with move position 0px 0px. Any other corner or edge is not that easy as it is dependent on window sizes and screen size. One way to achieve this is with xdotool, some scripting and probably a lot of trial and error as xdotool does not take in account borders and title bars. For example: xdootol getwindowfocus windowmove 0 0 moves the window to the upper left corner, but so far, that the title bar and left border are outside the screen.

edit flag offensive delete link more

Comments

Thanks m8.

majkinetor gravatar imagemajkinetor ( 2013-10-28 11:54:19 +0000 )edit

Question Tools

Stats

Asked: 2013-10-27 07:35:37 +0000

Seen: 1,059 times

Last updated: Oct 28 '13