Floating - bakkeby/dusk GitHub Wiki

A window that is floating is freely placed and resized by the end user. In other words it is a window that is not tiled by the window manager.

A client window can switch between floating and tiled mode via the togglefloating function unless the window is also fixed (i.e. not resizeable).

A floating window can be moved or resized using the mouse. The floating size and position of the client is automatically saved when moved or resized.

Floating windows can overlap. The MOD+left mouse click keybinding will bring a floating window on top.

A floating window will always stay on top of tiled windows unless the FocusedOnTop functionality is enabled, which allows for a tiled window to display on top of a floating window as long as it has focus.

The Floating flag is commonly used in client rules to make a client window start as floating.

The size and position of a window that starts out as floating depends on the size hints provided by the application. If there are no size hints or the size hints are outside of the window drawing area then the window will be placed in the top left corner of the window drawing area.

The position of a floating window can be overridden by either the Centered flag, which positions the floating window in the center of the window drawing area, or by the floatpos client rule option allowing more fine-grained control over the size and position of the window.

Window titles for floating windows

The window titles for floating clients are by default show separately in a secondary bar at the bottom of the screen. If you prefer to show floating windows in the main bar along other windows then you can set the weight of floating windows to 1.

static int flexwintitle_floatweight = 0;  // floating window title weight

See flexwintitle for more details.

Functions

Here is a list of functions relating to floating windows.

Function Description
floatpos Used to control the size and position of floating windows
movemouse Move floating windows around using the mouse
moveorplace Move or place the window depending on whether it is floating or not
resizemouse Change the size of floating windows using the mouse
resizeorcfacts Resize the window depending on whether it if floating or not
rioresize Resize the current window using slop
unfloatvisible Makes all floating windows on the current workspace tiled
togglefloating Makes clients switch between tiled and floating mode
togglesticky Toggles the Sticky flag for the selected client

Functionality

Here is a list of functionality that is directly related to floating windows.

Functionality Description
SnapToWindows Allows a floating window to snap to other floating windows when moved

Flags

Here is a list of client flags relating to floating windows.

Flag Description
AlwaysOnTop Client window is intended to always display on top (even above floating windows)
Floating The client is floating (i.e. not tiled)
MoveResize Used internally to indicate that the client is being moved or resized
MovePlace Used internally to indicate that the client is being moved within stack

Shadow effect for floating windows using a compositor

Floating windows will get the _IS_FLOATING window property set to 1 which a compositor can take advantage of.

Here is an example configuration for picom which lets you have shadows for floating windows, but no shadow for tiled windows.

shadow-exclude = [
  "_IS_FLOATING@:32c = 0"
];

In practice the above is saying to exclude shadows where the _IS_FLOATING property is explicitly set to 0. One could also use "! _IS_FLOATING@:32c = 1", but the side effect of this is that it will remove shadows from context menus as well.


Also see the Tiled topic.

Back to Features.

⚠️ **GitHub.com Fallback** ⚠️