Skip to content
Scott Moreau edited this page Aug 24, 2024 · 9 revisions

Configuration options

Table of contents

Configuration format

Syntax

The syntax is fairly flexible and permissive; whitespaces are mostly ignored. The # characters begin comments to the end of line, blank lines are ignored.

The file consists of sections and variables. A section begins with the name of the section in square brackets and continues until the next section begins. Each variable must belong to some section, which means that there must be a section header before the first setting of a variable.

All the other lines (and the remainder of the line after the section header) are recognized as setting variables, in the form name = value.

If a value contains the # character it should be escaped using \.

Values

Values of many variables are treated as a simple string, but there are variables that take values of specific types and there are rules as to how to spell them.

boolean

When a variable is said to take a boolean value, true or false.

integer

The value for numbers.

double

The value for floating point numbers.

color

The value for a variable that takes a color is a tuple of four floating point numbers (between 0 and 1) in RGBA format.

key and button

The value represents a key combo, also called chord. A key combo is a key sequence in which the keys are pressed at the same time.

Keys are space-separated and can be:

  • Modifier
    • <shift>
    • <ctrl>
    • <alt>
    • <super>
  • Key
  • Button

See Keys for a complete reference of key and button names. The document is based on input-event-codes.h from the Linux kernel.

gesture

The value represents a touchscreen gesture, as follows:

pinch [in|out] <finger-count>
swipe [up|down|left|right] <finger-count>
edge-swipe [up|down|left|right] <finger-count>

Note: e.g. edge-swipe right means swiping from left to right.

Defined in:

Set input.gesture_sensitivity to change the sensitivity of the built-in gesture detection. Higher values mean that less finger movement is required to trigger the gesture. Default 1.0, min 0.1, max 5.0. Changing requires restart. Defined in:

hotspot

It is also possible to activate items by a "hot corner"

Example: hotspot top-left 100x10 1000

where 100x10 is the width x height of the corner

and the 1000 being the time the input (mouse or touch) needs to be inside that area.

activator

The value represents a group of bindings which can all be used for the same action.

The bindings can be keys, buttons and gestures, hotspots, separated by a |.

Example:

<super> KEY_E | <ctrl> <alt> BTN_EXTRA | pinch in 4

criteria

The value represents command criteria to affect certain windows, as follows:

title [is|contains] "<string>"
app_id [is|contains] "<string>"
type is ["toplevel"|"x-or"|"unmanaged"|"background"|"panel"|"overlay"|"unknown"]
focusable is [true|false]
role is ["TOPLEVEL"|"UNMANAGED"|"DESKTOP_ENVIRONMENT"]
fullscreen is [true|false]
activated is [true|false]
minimized is [true|false]
maximized is [true|false]
floating is [true|false]
tiled-left is [true|false]
tiled-right is [true|false]
tiled-top is [true|false]
tiled-bottom is [true|false]

These basic criteria can be combined arbitrarily with parenthesis (...) and logical operators !, &, |. Note that to chain three criteria together with a logical and, you need parenthesis because there is no order of the operators (so it will be ((critA & critB) & critC)). In addition, there are the special values all and none, which are always evaluated to true and false respectively.

Defined in:

Options

annotate

A plugin to draw on the output.

Defined in:

clear_workspace

Clear workspace.

Type: activator.

The default is <super> <alt> KEY_C.

draw

Begin drawing on workspace.

Type: button.

The default is <super> <alt> BTN_LEFT.

from_center

Draw shapes from center of drag point.

Type: bool.

The default is true.

line_width

Line width used for drawing.

Type: double.

The default is 3.0.

method

Method used for drawing.

The default is draw.

Possible values: draw, line, rectangle, circle.

stroke_color

Color used for drawing.

Type: color.

The default is 1 0 0 1.

autorotate-iio

A plugin to autorotate the current output.

Defined in:

lock_rotation

Lock rotation.

Type: bool.

The default is 0.

rotate_down

Rotate down.

Type: activator.

The default is <ctrl> <super> KEY_DOWN.

rotate-left

Rotate left.

Type: activator.

The default is <ctrl> <super> KEY_LEFT.

rotate_right

Rotate right.

Type: activator.

The default is <ctrl> <super> KEY_RIGHT.

rotate_up

Rotate up.

Type: activator.

The default is <ctrl> <super> KEY_UP.

background-view

Deprecated: Replaced by pin-view plugin to allow multiple views on different workspaces and other options.

inhibit-input

Discard any input that would normally be forwarded to the background layer.

Type: bool.

The default is true.

bench

A plugin to display FPS on each output.

Defined in:

average_frames

How many frames to average to get the FPS value.

Type: int.

The default is 25.

position

Position of rendering.

Type: string.

The default is top_center.

Possible values: top_left, top_center, top_right, center_left, center, center_right, center_right, bottom_left, bottom_center, bottom_right.

crosshair

A plugin to render fullscreen mouse crosshair.

Defined in:

line_color

Color used for rendering crosshair.

Type: color.

The default is 1 0 0 1.

line_width

Line width of crosshair.

Type: int.

The default is 2.

focus-steal-prevent

A plug to prevent focus stealing.

Defined in:

cancel_keys

Cancel focus stealing prevention when any of these keys are pressed. The string consists of keycode names delimited by | character.

Type: string.

The default is KEY_ENTER.

deny_focus_views

Deny focus to views matching this criteria. If a view matches when mapped, focus is reset to the last view with focus.

Type: string.

The default is none.

timeout

A timer will be reset to the timeout (in ms) on every keystroke. If the timer is active when another window would normally gain focus, the focus is reset to the window that is accepting input.

Type: int.

The default is 1000.

follow-focus

A plugin to give focus to the view under the pointer.

Defined in:

change_output

When the mouse pointer is moved, the output focus changes to the output that the pointer is currently on.

Type: bool.

The default is true.

change_view

When the mouse pointer is moved, the view focus changes to the view under the pointer.

Type: bool.

The default is true.

focus_delay

The delay in ms before the plugin will trigger a focus change after the movement finished.</_long>

Type: int.

The default is 50.

raise_on_top

If disabled the focused view will only get keyboard focus, but will not be raised to the top.

Type: bool.

The default is true.

threshold

The distance (x+y) the cursor should be moved at least before the plugin gets activated.

Type: int.

The default is 10.

force-fullscreen

A plugin to force a view to be fullscreen.

Defined in:

constraint_area

If constrain_pointer is enabled, constrain to this area.

Type: string.

The default is view.

Possible values: view, output.

constrain_pointer

Whether to constrain the pointer.

Type: bool.

The default is false.

key_toggle_fullscreen

The key to toggle fullscreen.

Type: key.

The default is <super> <alt> KEY_F.

preserve_aspect

Whether to preserve aspect ratio.

Type: bool.

The default is true.

transparent_behind_views

When enabled, this option will make the desktop visible through semi-transparent views; otherwise, the plugin will render black behind semi-transparent views, not showing the desktop.

Type: bool.

The default is true.

x_skew

Skew view width by multiplying by this factor.

Type: double.

The default is 0.0.

y_skew

Skew view height by multiplying by this factor.

Type: double.

The default is 0.0.

ghost

A plugin to make windows click-through to what is beneath.

Defined in:

ghost_match

Automatically sets the matched windows to be ghosted.

Type: string

The default is nil.

ghost_toggle

Toggles ghost on the active window so clicks fall through to what is below.

Type: activator.

The default is nil.

hide-cursor

A plugin to toggle hiding of the mouse cursor.

Defined in:

hide_delay

The delay in ms before the plugin will hide the cursor. The cursor is shown again when cursor motion happens.

Type: int.

The default is 2000.

toggle

Toggles hide mouse cursor.

Type: activator.

The default is <super> <ctrl> KEY_H.

keycolor

A plugin to demonstrate rendering each window with a different shader. Currently, it affects all windows the same, but this can be changed in the code (or the code can be the basis for a new plugin).

Defined in:

color

Key color: the color of the pixels in the window to be replaced with alpha.

Type: color.

The default is 0 0 0 1.

opacity

How much alpha to use.

Type: double.

The default is 0.25.

threshold

How close a color must be to the key color for alpha to be applied.

Possible values: 0 to 1, where 0 means an exact pixel color match is required, and 1 means any color will match.

Type: double.

The default is 0.5.

mag

A plugin to provide magnification.

Defined in:

default_height

Default view height.

Type: int.

The default is 500.

toggle

Toggle plugin.

Type: activator.

The default is <super> <alt> KEY_M.

zoom_level

Zoom level.

Type: int.

The default is 75.

obs

A plugin to change the opacity, brightness and saturation of windows using ipc scripts.

Defined in:

options

There are no options for the opacity, brightness and saturation plugin. Instead, this plugin can be controlled by other plugins or via ipc script.

usage

The obs plugin applies a shader on views using values provided to it. The API is such that the caller can specify the opacity, brightness or saturation value, and a transition animation duration, for a specific view id. This allows writing scripts to achieve custom functionality. Enable the ipc, ipc-rules and obs plugins to use the scripts. ipc should be the first plugin in the config file core plugin list.

scripts

Defined in:

Required:

Install pywayfire with pip.

Usage: ./set-obs-effect.py <app-id> <effect> <value> <duration>

Example: cd ipc-scripts; ./set-obs-effect.py foot opacity 0.75 1000

The example sets opacity for any views matching foot app-id to 0.75 with an animation duration of 1 second.

Usage: ./trailfocus.py

Example: cd ipc-scripts; ./trailfocus.py

pin-view

A plugin to modify a view's layer and workspace.

Defined in:

options

There are no options for the pin-view plugin. Instead, this plugin can be controlled via ipc scripts.

usage

The pin-view plugin has two functions, pin-view(view-id: int, layer: string, resize: bool[, ws_x: int[, ws_y: int]]) and unpin-view(view-id: int).

The view-id argument can be found with wf-info or with a script selecting app-id to find view-id(s).

The layer argument can be one of the following:

"background"
"bottom"
"workspace"
"top"
"unmanaged"
"overlay"
"lock"

if layer is not found, view will be placed on top layer.

The resize argument tells the pin-view plugin to resize the view to the output size ("true") or do not resize at all ("false").

The ws_x and ws_y arguments are optional. If supplied, moves the view to the workspace x,y. Otherwise, the view is shown on all workspaces.

scripts

Defined in:

Required:

Install pywayfire with pip.

Usage: ./ipc-scripts/pin-view.py <view-id> <layer> <resize> [ws_x [ws_y]]

Examples:

./ipc-scripts/pin-view.py 15 "background" true

./ipc-scripts/pin-view.py 15 "background" true 1 0

./ipc-scripts/pin-view.py 15 "background" false

./ipc-scripts/unpin-view.py 15

showrepaint

A plugin to show repainted areas on the screen.

Defined in:

reduce_flicker

Reduce flicker by copying the client damage region from the last frame to the current frame. This means that only the the damage region for all surfaces of the frame are painted and the rest of the output is painted with the contents of the last frame.

Type: bool.

The default is true.

toggle

Toggles the plugin state.

Type: activator.

The default is <super> <alt> KEY_S.

view-shot

A plugin to captures the cursor focus view.

Defined in:

capture

Capture.

Type: activator.

The default is <super> <alt> BTN_MIDDLE.

command

Runs the command after the capturing. %f is replaced with the file name.

Type: string

The default is notify-send "The view under cursor was captured to %f".

filename

C date format specifiers are repleaced by the time/date/etc. For example, %Y is replaced by the current year.

Type: string.

The default is /tmp/snapshot-%F-%T.png.

water

A plugin to provide a water effect.

Defined in:

activate

Activates water effect.

Type: button.

The default is <ctrl> <super> BTN_LEFT.

winzoom

A plugin to zoom windows.

Defined in:

dec_x_binding

Decrement X.

Type: activator.

The default is <ctrl> <super> KEY_LEFT.

dec_y_binding

Decrement Y.

Type: activator.

The default is <ctrl> <super> KEY_UP.

inc_x_binding

Increment X.

Type: activator.

The default is <ctrl> <super> KEY_RIGHT.

inc_y_binding

Increment Y.

Type: activator.

The default is <ctrl> <super> KEY_DOWN.

nearest_filtering

Use GL_NEAREST instead of GL_LINEAR.

Type: bool.

The default is false.

modifier

When the modifier key is held down, you can scroll down and up to adjust the zoom of the window.

Type: key.

The default is <ctrl> <super>.

preserve_aspect

Preserve the aspect ratio of the view.

Type: bool.

The default is true.

zoom_step

Sets the zoom increment per binding action.

Type: double.

The default is 0.1.

workspace-names

A plugin to name workspaces.

Defined in:

background_color

Background color for text.

Type: color.

The default is 0.2 0.2 0.2 0.7.

background_radius

Radius for the corners of the background.

Type: double.

The default is 30.

display_duration

How long the name is displayed.

Type: int.

The default is 500.

font

Font used for text rendering.

Type: string.

The default is sans-serif.

margin

Distance from edge of screen to indicator.

Type: int.

The default is 0.

position

Position of rendering.

Type: string.

The default is center.

Possible values: top_left, top_center, top_right, center_left, center, center_right, bottom_left, bottom_center, bottom_right

show_option_names

Display option names on screen for convenience.

Type: bool.

The default is false.

text_color

Text color.

Type: color.

The default is 1 1 1 1.