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

How can I move a floating window with keys?

asked 2014-09-09 09:02:25 +0000

cee gravatar image

I am constantly looking for ways to reduce my mouse usage. Therefore I wanted to be able to move any floating window with my keyboard.

To keep the question/answer format intact I am answering my own question.

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
0

answered 2014-09-09 09:07:06 +0000

cee gravatar image

I created an additional mode "move" in ~/.i3/config

##
# move floating windows with keys
bindsym $mod+m mode "move" focus floating
mode "move" {
    bindsym $mod+Tab focus right

    bindsym Left  move left
    bindsym Down  move down
    bindsym Up    move up
    bindsym Right move right

    bindsym h     move left
    bindsym j     move down
    bindsym k     move up
    bindsym l     move right

    # back to normal: Enter or Escape
    bindsym Return mode "default"
    bindsym Escape mode "default"
}

To start the "move" mode press Alt+m, then the first floating window gets focus.
To move focus press Alt+Tab. You can either use the arrow keys or hjkl to move the floating window which has focus.
All keybindings are according to my preferences but can of course be changed to your liking.

edit flag offensive delete link more

Comments

The movement seems not working..

xuhdev gravatar imagexuhdev ( 2014-12-24 02:16:53 +0000 )edit

Question Tools

Stats

Asked: 2014-09-09 09:02:25 +0000

Seen: 1,166 times

Last updated: Sep 09 '14