Native Window Snapping / Window Tiling with Fluxbox, Openbox, and xfwm4 (Xfce)

I find tiling helpful when I have to work with the contents of two windows at once, or when comparing things.

By native window tiling I mean that we will be using only the native commands of a particular window manager and not any external program.


The following can be added to ~/.fluxbox/keys

# Tiling
Control Mod1 Left :MacroCmd {ResizeTo 50% 100%} {MoveTo 00 00 Left}
Control Mod1 Right :MacroCmd {ResizeTo 50% 100%} {MoveTo 00 00 Right}
Control Mod1 Up :MacroCmd {ResizeTo 100% 50%} {MoveTo 00 00 Up}
Control Mod1 Down :MacroCmd {ResizeTo 100% 50%} {MoveTo 00 00 Bottom}
Control Mod1 Return :ToggleCmd {Maximize} {Restore}

The modifiers above (Ctrl + Alt + Left/Right/Up/Down/Enter) should not conflict with existing modifiers, else they will not work correctly.


The following can be added to ~/.config/openbox/rc.xml within the keyboard tags.
(have to use a pastebin as WordPress interprets it as tags)

xfwm4 (Xfce)

Go to Menu -> Settings -> Window Manager -> Keyboard

The commands should already be present, only the keys need to be set.


9 thoughts on “Native Window Snapping / Window Tiling with Fluxbox, Openbox, and xfwm4 (Xfce)

  1. Cheers man, I just copy-and-pasted the fluxbox lines. I might have figured it out for myself, but it’s nice to google and find a 10 line blog entry to copy from :-). So here’s my appreciation for the blog entry.

  2. Thank you so much. I first discovered but it was very complex and fragile. My second search led me here and these very simple one-line commands that do the intended task. And they even use window manager built-ins! I picked fluxbox as my first low-key window manager and all the little tricks like what you have shared here make it much easier to use.

  3. Pingback: Fluxbox
  4. This is awesome, thank you. I switched from being a decades-long fluxbox/blackbox user to i3wm because I was fascinated with tiling wms but I felt like I always arranged windows in a tiling format anyway so it would be more efficient. While after about 6 months using i3 I love it, there are some things in my personal workflow that are desired. I miss my dockapps, for one. And the snapping/tiling feature was one that I was envious of now because I have to use Windows 11 at work and got very used to window snapping.This is making me switch back to flux at home and test out your code. Cheers! =)

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s