XFCE: moving and resizing windows with Keyboard shortcuts

Hi. I think you can move windows with these keyboard shortcuts

/xfwm4/default/<Control><Shift><Alt>Left   move_window_left_key
/xfwm4/default/<Control><Shift><Alt>Right  move_window_right_key
/xfwm4/default/<Control><Shift><Alt>Up     move_window_up_key

Not sure about resizing. Customize them in Xfce settings->Window manager

List all shortcuts with
xfconf-query -c xfce4-keyboard-shortcuts -l -v

EDIT. Sorry, I have tried and found that those don't work.

If you open the Window Manager settings (Settings > Window Manager in the menu) the window keyboard shortcuts are under the Keyboard tab.

It looks like the default for moving is Alt-F7 (Alt-F8 to resize) followed by the arrows keys. Then Enter (or any other key except Esc) to leave the window there. But these shortcuts can be changed.

7 Likes

Ya I know your problem. Even I had my rough time first when moving to xfce.
I know the solution to your problem

First
xed ~/.config/openbox/lxqt-rc.xml
Then within the <keyboard></keyboard> tags put this code

`

<keybind key="W-Up">        # Maximize
  <action name="ToggleMaximize"/>
</keybind>

<keybind key="W-Down">      # Minimize
  <action name="Iconify"/>
</keybind>

<keybind key="W-Left">        # HalfLeftScreen
  <action name="UnmaximizeFull"/>
  <action name="MoveResizeTo"><x>0</x><y>0</y>
    <height>100%</height><width>50%</width>
  </action>
</keybind>
<keybind key="W-Right">        # HalfRightScreen
  <action name="UnmaximizeFull"/>
  <action name="MoveResizeTo"><x>-0</x><y>0</y>
    <height>100%</height><width>50%</width>
  </action>
</keybind>

<keybind key="C-W-1">        # UpperQuarterLeft
  <action name="UnmaximizeFull"/>
  <action name="MoveResizeTo"><x>0</x><y>0</y>
  <height>50%</height><width>50%</width>
  </action>
</keybind>

<keybind key="C-W-2">        # LowerQuarterLeft
  <action name="UnmaximizeFull"/>
  <action name="MoveResizeTo"><x>0</x><y>-0</y>
    <height>50%</height><width>50%</width>
  </action>
</keybind>

<keybind key="C-W-3">        # LowerQuarterRight
  <action name="UnmaximizeFull"/>
  <action name="MoveResizeTo"><x>-0</x><y>-0</y>
  <height>50%</height>
  <width>50%</width>
  </action>
</keybind>

<keybind key="C-W-4">        # UpperQuarterRight
  <action name="UnmaximizeFull"/>
  <action name="MoveResizeTo"><x>-0</x><y>0</y>
  <height>50%</height>
  <width>50%</width>
  </action>
</keybind>`

Here, C = Control W = Super/Mod/Windows Key and Left/Right are arrow keys

Save the file then in the terminal type
openbox --reconfigure
(Don't worry it will some error but ya your problem is solved)
Just press Super + Left and move the windows around.
Hope this solves your problem

  1. Open "Window Manager"
  2. Open "Keyboard" tab
  3. Scroll down to "Tile Window to Top" options
  4. Double click on each of them and press "Win+Up" key combination on your keyboard.
  5. Do similar assignments to Bottom/Left/Righ
  6. "Close" Window Manager
2 Likes

Forum kindly sponsored by