Skip to content
bakkeby edited this page Jun 24, 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 via the dusk client, e.g. here toggling the Floating flag for the currently selected client:

$ duskc run_command q
l Floating

Below is the list of available flags:

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

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
Invisible By default all clients are visible, used by scratchpads to hide clients
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
NeedResize Internal flag indicating that the client needs to be resized later
Ruled Indicates whether client was subject to client rules (used internally to determine default behaviour)
Marked Indicates that the client has been marked for group action
NeverFocus Indicates that the client should never receive focus
Locked Used by setfullscreen, prevents state change
RestoreFakeFullScreen Internal flag that indicates that fake fullscreen should be restored when exiting actual fullscreen
Transient Whether the client has the transient for hint

Back to Features.

Clone this wiki locally