Skip to content
bakkeby edited this page Jul 13, 2021 · 50 revisions

The term Flag in the context of dusk and dawn refers to features that can be enabled on a per window basis via client rules.

The idea of flags stems from the many patches for that introduce new rule options, often storing a new value in the Client struct.

One example of this is the swallow patch which adds two new int values of isterminal and noswallow both to the rules list and the Client struct.

Instead of having multiple boolean values (iscentered, isfloating, isfakefullscreen, etc.) one could instead have a single unsigned long value that could hold up to 64 flags (one flag per bit). That is exactly what flags do and this makes it easier to set up rules.

Example rule combining Floating and SwitchWorkspace flags:

static const Rule clientrules[] = {
	...
	RULE(.class = "Gimp", .workspace = "5", .flags = Floating|SwitchWorkspace)
	...

Client flags can also be changed externally using the toggleflag function.

Below is the list of available flags:

Flag Description Topic
AttachMaster Attach at the top of the master area Attach
AttachAbove Attach the client before the currently selected client Attach
AttachBelow Attach the client after the currently selected client Attach
AttachAside Attach at the top of the stack area Attach
AttachBottom Attach at the bottom of the stack area Attach
Fixed Used when client has a fixed size where width equals height, fixed clients are always floating EWMH
IgnoreCfgReq Ignore all configure requests coming from the client EWMH
IgnoreCfgReqPos Ignore the x,y position details of configure requests coming from the client EWMH
IgnoreCfgReqSize Ignore the size details of configure requests coming from the client EWMH
IgnorePropTransientFor Ignore WM_TRANSIENT_FOR property notifications for buggy client windows (e.g. WebStorm) EWMH
IgnoreSizeHints Ignore size hints for clients (floating and tiled) EWMH
IgnoreMinimumSizeHints While respecting size hints in general ignore the minimum size restrictions to avoid overlapping windows EWMH
IgnoreDecorationHints Ignore decoration hints for client EWMH
RespectSizeHints Respect size hints for this client when ResizeHints is globally disabled EWMH
AlwaysOnTop Client window is intended to always display on top (even above floating windows) Floating
Floating The client is floating (i.e. not tiled) Floating
FullScreen Indicates that the client is in fullscreen mode Fullscreen
FakeFullScreen Indicates that the client is in fake fullscreen mode Fullscreen
ScratchpadStayOnMon Prevents the scratchpad from being moved to the active monitor when toggled Scratchpads
Terminal Indicates that the client is a terminal, used by swallow Swallow
NoSwallow Indicates that the client should never be swallowed if launched by a terminal Swallow
RioDrawNoMatchPID Do not match PID for this client when spawning via riospawn Spawn
Urgent Indicates that the client urgently needs attention Window
Centered Indicates that the client, if floating, should be centered on the screen on launch Window
Permanent If a client is permanent, then the client can't be killed Window
Hidden Indicates that the client is hidden Window
Sticky Makes the client sticky (currently unused) Window
OnlyModButtons Restricts button keybindings to those that involve modifiers Window
NoBorder Indicates that the client should not be drawn with a border around it Window
NoFocusOnNetActive Disables the FocusOnNetActive functionality for the client Window
SteamGame Indicates that this client is a Steam game Window
Unmanaged Indicates that the client is not to be managed by the window manager Window
Lower The window is to be placed below all other windows, only used in combinaton with Unmanaged Window
Raise The window is to be placed above all other windows, only used in combinaton with Unmanaged Window
SwitchWorkspace Automatically moves you to the workspace of the newly opened application Workspace
EnableWorkspace Enables the workspace of the newly opened application in addition to your existing viewed workspaces Workspace
RevertWorkspace If SwitchWorkspace or EnableWorkspace, closing that window reverts the view back to what it was previously Workspace

Internal flags are flags that are set by the window manager when certain actions are performed.

These are generally not intended to be manually set via client rules or otherwise.

Internal flags Description Topic
NeedResize Internal flag indicating that the client needs to be resized later EWMH
Transient Whether the client has the transient for hint EWMH
MoveResize Used internally to indicate that the client is being moved or resized Floating
MovePlace Used internally to indicate that the client is being moved within stack Floating
NeverFocus Indicates that the client should never receive focus Focus
Locked Used by setfullscreen, prevents state change Fullscreen
RestoreFakeFullScreen Internal flag that indicates that fake fullscreen should be restored when exiting actual fullscreen Fullscreen
Marked Indicates that the client has been marked for group action Marking
Invisible By default all clients are visible, used by scratchpads to hide clients Scratchpads
Ruled Indicates whether client was subject to client rules (used internally to determine default behaviour) System

Back to Features.

Clone this wiki locally