Using FLUXBOX as a Window Manager

PackRat

Current key bindings for tiling - makes use of the key pad on this laptop, no numlock is stated (numlockx in the ~/.fluxbox/startup)

# manual tiling with key chains - using chains to avoid clash with keybindings #

! this will tile tint2  panel
!Mod1 Shift m :ArrangeWindowsHorizontal
!Mod1 Shift n :ArrangeWindowsVertical

Ctrl a Mod4 h :MacroCmd {ResizeTo 48% 98%} {MoveTo 1% 1% UpperLeft}
Ctrl a Mod4 j :MacroCmd {ResizeTo 48% 98%} {MoveTo 1% 1% UpperRight}
Ctrl a Mod4 k :MacroCmd {ResizeTo 98% 48%} {MoveTo 1% 1% UpperLeft}
Ctrl a Mod4 l :MacroCmd {ResizeTo 98% 48%} {MoveTo 1% 1% LowerLeft}

Ctrl a Mod4 KP_4 :MacroCmd {SetDecor BORDER} {ResizeTo 48% 98%} {MoveTo 1% 1% UpperLeft}
Ctrl a Mod4 KP_6 :MacroCmd {SetDecor BORDER} {ResizeTo 48% 98%} {MoveTo 1% 1% UpperRight}
Ctrl a Mod4 KP_8 :MacroCmd {SetDecor BORDER} {ResizeTo 98% 48%} {MoveTo 1% 1% UpperLeft}
Ctrl a Mod4 KP_2 :MacroCmd {SetDecor BORDER} {ResizeTo 98% 48%} {MoveTo 1% 1% LowerLeft}

Ctrl a Mod1 h :MacroCmd {ResizeTo 48% 48%} {MoveTo 1% 1% UpperLeft}
Ctrl a Mod1 j :MacroCmd {ResizeTo 48% 48%} {MoveTo 1% 1% UpperRight}
Ctrl a Mod1 k :MacroCmd {ResizeTo 48% 48%} {MoveTo 1% 1% LowerLeft}
Ctrl a Mod1 l :MacroCmd {ResizeTo 48% 48%} {MoveTo 1% 1% LowerRight}

Ctrl a Mod1 KP_7 :MacroCmd {SetDecor BORDER} {ResizeTo 48% 48%} {MoveTo 1% 1% UpperLeft}
Ctrl a Mod1 KP_9 :MacroCmd {SetDecor BORDER} {ResizeTo 48% 48%} {MoveTo 1% 1% UpperRight}
Ctrl a Mod1 KP_1 :MacroCmd {SetDecor BORDER} {ResizeTo 48% 48%} {MoveTo 1% 1% LowerLeft}
Ctrl a Mod1 KP_3 :MacroCmd {SetDecor BORDER} {ResizeTo 48% 48%} {MoveTo 1% 1% LowerRight}

Ctrl a Mod1 KP_8 :MacroCmd {ResizeTo 70% 48%} {MoveTo 0% 1% Top}
Ctrl a Mod1 KP_2 :MacroCmd {ResizeTo 70% 48%} {MoveTo 0% 1% Bottom}

Ctrl a Mod4 c :MacroCmd {SetDecor 0x66f} {ResizeTo 85% 95%} {MoveTo 0 0 Center}
Ctrl a Mod4 x :MacroCmd {SetDecor BORDER} {ResizeTo 85% 95%} {MoveTo 0 0 Center}

Ctrl a Mod1 F12 :ToggleDecor
Mod1 Shift F12 :MacroCmd {SetDecor TAB}

Mod1 Shift d :ToggleCmd {ShowDesktop} {DeIconify all originquiet}

Mod1 Shift F10 :MacroCmd {ToggleDecor} {Maximize}
I am tired of talk that comes to nothing.
-- Chief Joseph

...the sun, the darkness, the winds are all listening to what we have to say.
-- Geronimo

PackRat

#76
Was reading through the man page for fluxbox to look for something I spotted in the ~/.fluxbox/init file (the fluxbox resource file) and I came across this:

Quotesession.titlebar.{left|right}: buttons
           The buttons or icons to place in the titlebar of decorated windows.
           You may specify any number, space-delimited.

           The available options are:
               Close Maximize MenuIcon Minimize Shade Stick LHalf RHalf

           Default left: Stick

           Default right: Shade Minimize Maximize Close

           LHalf and RHalf are buttons to quickly place a window into the left
           and right half of the current monitor.

I never knew abouit the LHalf and RHalf buttons before; I've seen lhalf.pixmap and rhalf.pixmap settings in themes before, but thought it was a reference to the window.

So I checked them out, and sure enough it's a button to tile left/right on the screen:



Unfortunately, they do not toggle like the Maximize, Shade, and Stick button do so the use is limited. Still, and interesting feature of fluxbox.
I am tired of talk that comes to nothing.
-- Chief Joseph

...the sun, the darkness, the winds are all listening to what we have to say.
-- Geronimo

PackRat

Revisited faux tiling. Fluxbox supports key binding modes like i3, so set up some faux tiling grids:



pertinent section of the ~/.fluxbox/keys file for regular tiling and the move mode

## manual tiling with key chains
##=================================================##

# built-in tiling in fluxbox
# these macros will tile tint2 and polybar panel

# ArangeWindows

# Mod1 Shift m :ArrangeWindowsHorizontal
# Mod1 Shift n :ArrangeWindowsVertical

# ArrangeWindowsStackRight
# ArrangeWindowsStackLeft
# ArrangeWindowsStackTop
# ArrangeWindowsStackBottom

# Quarter screen decorated
#===================================================##

#Ctrl a Mod1 KP_7 :MacroCmd {SetDecor 0x67f} {ResizeTo 50% 50%} {MoveTo 0 0 UpperLeft}
#Ctrl a Mod1 KP_9 :MacroCmd {ResizeTo 50% 50%} {MoveTo 0 0 UpperRight}
#Ctrl a Mod1 KP_1 :MacroCmd {ResizeTo 50% 50%} {MoveTo 0 0 LowerLeft}
#Ctrl a Mod1 KP_3 :MacroCmd {ResizeTo 50% 50%} {MoveTo 0 0 LowerRight}

#Ctrl a Mod1 KP_4 :MacroCmd {ResizeTo 50% 100%} {MoveTo 0 0 Left}
#Ctrl a Mod1 KP_6 :MacroCmd {ResizeTo 50% 100%} {MoveTo 0 0 Right}
#Ctrl a Mod1 KP_8 :MacroCmd {ResizeTo 100% 50%} {MoveTo 0 0 Top}
#Ctrl a Mod1 KP_2 :MacroCmd {ResizeTo 100% 50%} {MoveTo 0 0 Bottom}
#Ctrl a Mod1 KP_5 :Maximize

Ctrl a Mod1 KP_7 :MacroCmd {SetDecor 0x67f} {ResizeTo 48% 48%} {MoveTo 1% 1% UpperLeft}
Ctrl a Mod1 KP_9 :MacroCmd {SetDecor 0x67f} {ResizeTo 48% 48%} {MoveTo 1% 1% UpperRight}
Ctrl a Mod1 KP_1 :MacroCmd {SetDecor 0x67f} {ResizeTo 48% 48%} {MoveTo 1% 1% LowerLeft}
Ctrl a Mod1 KP_3 :MacroCmd {SetDecor 0x67f} {ResizeTo 48% 48%} {MoveTo 1% 1% LowerRight}

Ctrl a Mod1 KP_4 :MacroCmd {SetDecor 0x67f} {ResizeTo 48% 98%} {MoveTo 1% 1% UpperLeft}
Ctrl a Mod1 KP_6 :MacroCmd {SetDecor 0x67f} {ResizeTo 48% 98%} {MoveTo 1% 1% UpperRight}
Ctrl a Mod1 KP_8 :MacroCmd {SetDecor 0x67f} {ResizeTo 98% 48%} {MoveTo 1% 1% UpperLeft}
Ctrl a Mod1 KP_2 :MacroCmd {SetDecor 0x67f} {ResizeTo 98% 48%} {MoveTo 1% 1% LowerLeft}
Ctrl a Mod1 KP_5 :MacroCmd {SetDecor 0x67f} {ResizeTo 98% 98%} {MoveTo 0 0 Center}

# Quarter screen undecorated
##===================================================##

Ctrl a Mod4 KP_7 :MacroCmd {SetDecor BORDER} {ResizeTo 48% 48%} {MoveTo 1% 1% UpperLeft}
Ctrl a Mod4 KP_9 :MacroCmd {SetDecor BORDER} {ResizeTo 48% 48%} {MoveTo 1% 1% UpperRight}
Ctrl a Mod4 KP_1 :MacroCmd {SetDecor BORDER} {ResizeTo 48% 48%} {MoveTo 1% 1% LowerLeft}
Ctrl a Mod4 KP_3 :MacroCmd {SetDecor BORDER} {ResizeTo 48% 48%} {MoveTo 1% 1% LowerRight}

Ctrl a Mod4 KP_4 :MacroCmd {SetDecor BORDER} {ResizeTo 48% 98%} {MoveTo 1% 1% UpperLeft}
Ctrl a Mod4 KP_6 :MacroCmd {SetDecor BORDER} {ResizeTo 48% 98%} {MoveTo 1% 1% UpperRight}
Ctrl a Mod4 KP_8 :MacroCmd {SetDecor BORDER} {ResizeTo 98% 48%} {MoveTo 1% 1% UpperLeft}
Ctrl a Mod4 KP_2 :MacroCmd {SetDecor BORDER} {ResizeTo 98% 48%} {MoveTo 1% 1% LowerLeft}
Ctrl a Mod4 KP_5 :MacroCmd {SetDecor BORDER} {ResizeTo 98% 98%} {MoveTo 0 0 Center}

Ctrl a Mod1 KP_0 :MacroCmd {SetDecor 0x67f} {ResizeTo 80% 98%} {MoveTo 0 0 Center}
Ctrl a Mod4 KP_0 :MacroCmd {SetDecor BORDER} {ResizeTo 80% 98%} {MoveTo 0 0 Center}

Ctrl Mod1 KP_7 :MoveTo 1% 1% UpperLeft
Ctrl Mod1 KP_8 :MoveTo 1% 1% TopCenter
Ctrl Mod1 KP_9 :MoveTo 1% 1% UpperRight
Ctrl Mod1 KP_4 :MoveTo 1% 1% LeftCenter
Ctrl Mod1 KP_5 :MoveTo 0 0 Center
Ctrl Mod1 KP_6 :MoveTo 1% 1% RightCenter
Ctrl Mod1 KP_1 :MoveTo 1% 1% LowerLeft
Ctrl Mod1 KP_2 :MoveTo 1% 1% BottomCenter
Ctrl Mod1 KP_3 :MoveTo 1% 1% LowerRight

Shift Mod1 KP_7 :MoveTo 0 0 UpperLeft
Shift Mod1 KP_8 :MoveTo 0 0 TopCenter
Shift Mod1 KP_9 :MoveTo 0 0 UpperRight
Shift Mod1 KP_4 :MoveTo 0 0 LeftCenter
Shift Mod1 KP_5 :MoveTo 0 0 Center
Shift Mod1 KP_6 :MoveTo 0 0 RightCenter
Shift Mod1 KP_1 :MoveTo 0 0 LowerLeft
Shift Mod1 KP_2 :MoveTo 0 0 BottomCenter
Shift Mod1 KP_3 :MoveTo 0 0 LowerRight

# modes - use ESC to exit mode
# MoveMode ===========================================##

Ctrl w Mod4 m          :KeyMode MoveMode
MoveMode: Ctrl KP_7    :MacroCmd {ResizeTo 33% 33%} {MoveTo 1% 1% UpperLeft}
MoveMode: Ctrl KP_8    :MacroCmd {ResizeTo 33% 33%} {MoveTo 1% 1% TopCenter}
MoveMode: Ctrl KP_9    :MacroCmd {ResizeTo 33% 33%} {MoveTo 1% 1% UpperRight}
MoveMode: Ctrl KP_4    :MacroCmd {ResizeTo 33% 33%} {MoveTo 1% 1% LeftCenter}
MoveMode: Ctrl KP_5    :MacroCmd {ResizeTo 33% 33%} {MoveTo 1% 1% Center}
MoveMode: Ctrl KP_6    :MacroCmd {ResizeTo 33% 33%} {MoveTo 1% 1% RightCenter}
MoveMode: Ctrl KP_1    :MacroCmd {ResizeTo 33% 33%} {MoveTo 1% 1% LowerLeft}
MoveMode: Ctrl KP_2    :MacroCmd {ResizeTo 33% 33%} {MoveTo 1% 1% BottomCenter}
MoveMode: Ctrl KP_3    :MacroCmd {ResizeTo 33% 33%} {MoveTo 1% 1% LowerRight}

MoveMode: Shift KP_7   :MacroCmd {ResizeTo 36% 48%} {MoveTo 1% 1% UpperLeft}
MoveMode: Shift KP_8   :MacroCmd {ResizeTo 60% 48%} {MoveTo 1% 1% TopCenter}
MoveMode: Shift KP_9   :MacroCmd {ResizeTo 36% 48%} {MoveTo 1% 1% UpperRight}
MoveMode: Shift KP_4   :MacroCmd {ResizeTo 60% 98%} {MoveTo 1% 1% UpperLeft}
MoveMode: Shift KP_5   :MacroCmd {ResizeTo 60% 98%} {MoveTo 0 0 Center}
MoveMode: Shift KP_6   :MacroCmd {ResizeTo 60% 98%} {MoveTo 1% 1% UpperRight}
MoveMode: Shift KP_1   :MacroCmd {ResizeTo 36% 48%} {MoveTo 1% 1% LowerLeft}
MoveMode: Shift KP_2   :MacroCmd {ResizeTo 60% 48%} {MoveTo 1% 1% BottomCenter}
MoveMode: Shift KP_3   :MacroCmd {ResizeTo 36% 48%} {MoveTo 1% 1% LowerRight}


Entering a mode is like a key chain, ESC exits the mode.

Unfortunately, other key bindings like ALT - Tab window switching is suspended when in a mode, but selecting, moving etc .. with the mouse still appear to work.
I am tired of talk that comes to nothing.
-- Chief Joseph

...the sun, the darkness, the winds are all listening to what we have to say.
-- Geronimo

PackRat

#78
Fluxbox on dual monitors -

link to image

link to image

Wife has been working from home for about a year due to the plague. At her office, she uses dual monitors so went out and got a second monitor a couple months ago. Unfortunately, fluxbox does not support different workspaces on different monitors (that I'm aware of; if this can be done please share!). However, the toolbar and iconbar can span the monitors in a dual monitor setup:

Fluxbox Menu --> Configure --> Toolbar --> On Head --> All Heads.

Other than having to look to the right to see the clock and system tray not a whole lot of difference for me.
I am tired of talk that comes to nothing.
-- Chief Joseph

...the sun, the darkness, the winds are all listening to what we have to say.
-- Geronimo