Move floating window with arrows
How to configure i3 to have mode for this, to move the floating window around with arrows or position it to the screen edge.
How to configure i3 to have mode for this, to move the floating window around with arrows or position it to the screen edge.
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.
Asked: 2013-10-27 07:35:37 +0000
Seen: 1,059 times
Last updated: Oct 28 '13