<labwc_config>

  <core>
    <decoration>server</decoration>
    <gap>0</gap>
    <adaptiveSync>no</adaptiveSync>
    <allowTearing>no</allowTearing>
    <autoEnableOutputs>yes</autoEnableOutputs>
    <reuseOutputMode>no</reuseOutputMode>
    <xwaylandPersistence>no</xwaylandPersistence>
    <primarySelection>yes</primarySelection>
    
  </core>

  <placement>
    <policy>cascade</policy>
    
  </placement>

  <theme>

    <fallbackAppIcon>labwc</fallbackAppIcon>
    <titlebar>
      <layout>icon:iconify,max,close</layout>
      <showTitle>yes</showTitle>
    </titlebar>
    <cornerRadius>8</cornerRadius>
    <keepBorder>yes</keepBorder>
    <maximizedDecoration>titlebar</maximizedDecoration>
    <dropShadows>no</dropShadows>
    <dropShadowsOnTiled>no</dropShadowsOnTiled>
    
      <name>sans</name>
      <size>10</size>
      <slant>normal</slant>
      <weight>normal</weight>

      <name>sans</name>
      <size>10</size>
      <slant>normal</slant>
      <weight>normal</weight>

      <name>sans</name>
      <size>10</size>
      <slant>normal</slant>
      <weight>normal</weight>

      <name>sans</name>
      <size>10</size>
      <slant>normal</slant>
      <weight>normal</weight>

      <name>sans</name>
      <size>10</size>
      <slant>normal</slant>
      <weight>normal</weight>
    
  </theme>

  <windowSwitcher preview="yes" outlines="yes" allWorkspaces="no" unshade="yes">
    <osd show="yes" style="classic" output="all" thumbnailLabelFormat="%T" />
    <fields>
      <field content="icon" width="5%" />
      <field content="desktop_entry_name" width="30%" />
      <field content="title" width="65%" />
      <!--
        Just as for window-rules, you can use 'identifier' or
        'trimmed_identifier' to show the app_id for native wayland clients or
        WM_CLASS for XWayland clients.

        <field content="trimmed_identifier" width="65%" />
      -->
    </fields>
  </windowSwitcher>

  <!--
    Many other kinds of content are supported in the window switcher like below.
    Some contents are fixed-length and others are variable-length.
    See "man 5 labwc-config" for details.

    <windowSwitcher preview="no" outlines="no" allWorkspaces="yes">
      <osd show="yes" />
      <fields>
        <field content="workspace" width="5%" />
        <field content="state" width="3%" />
        <field content="type_short" width="3%" />
        <field content="output" width="9%" />
        <field content="identifier" width="30%" />
        <field content="title" width="50%" />
      </fields>
    </windowSwitcher>

    custom format - (introduced in 0.7.2)
    It allows one to replace all the above "fields" with one line, using a
    printf style format. For field explanations, see "man 5 labwc-config".

    The example below would print "foobar", then type of window (wayland, X),
    then state of window (M/m/F), then output (shows if more than 1 active),
    then workspace name, then identifier/app-id, then the window title.
    It uses 100% of OSD window width.

    <windowSwitcher preview="no" outlines="no" allWorkspaces="yes">
      <osd show="yes" />
      <fields>
        <field content="custom" format="foobar %b %3s %-10o %-20W %-10i %t" width="100%" />
      </fields>
    </windowSwitcher>
  -->

  
  <resistance>
    <screenEdgeStrength>20</screenEdgeStrength>
    <windowEdgeStrength>20</windowEdgeStrength>
    
    <unSnapThreshold>20</unSnapThreshold>
    
    <unMaximizeThreshold>150</unMaximizeThreshold>
  </resistance>

  <resize>
    
    <popupShow>Never</popupShow>
    
    <drawContents>yes</drawContents>
    
    <minimumArea>8</minimumArea>

    <!--
      Set cornerRange to a positive value to increase the size of corner
      regions for mouse actions and diagonal window resizing. When omitted,
      the default size of the corner region is half of the titlebar height.

      <cornerRange>8</cornerRange>
    -->
  </resize>

  <focus>
    <followMouse>no</followMouse>
    <followMouseRequiresMovement>yes</followMouseRequiresMovement>
    <raiseOnFocus>no</raiseOnFocus>
  </focus>

  <snapping>
    
    <range inner="10" outer="10" />
    <cornerRange>50</cornerRange>
    <overlay enabled="yes">
      <delay inner="500" outer="500" />
    </overlay>
    <topMaximize>yes</topMaximize>
    <notifyClient>always</notifyClient>
  </snapping>

  <!--
    Workspaces can be configured like this:
    <desktops>
      <popupTime>1000</popupTime>
      <names>
        <name>Workspace 1</name>
        <name>Workspace 2</name>
        <name>Workspace 3</name>
        <name>Workspace 4</name>
      </names>
    </desktops>

    Or it can also be configured like this:
    <desktops number="4" />

    Or like this:
    <desktops>
      <popupTime>500</popupTime>
      <number>5</number>
      <prefix>ws</prefix>
    </desktops>

    Or:
    <desktops number="4" popupTime="500" prefix="ws" />

    popupTime defaults to 1000 so could be left out.
    Set to 0 to completely disable the workspace OSD.

    prefix defaults to "Workspace" when using number instead of names.

    Use GoToDesktop left | right to switch workspaces.
    Use SendToDesktop left | right to move windows.
    See man labwc-actions for further information.
  -->
  <desktops>
    <popupTime>1000</popupTime>
    <names>
      <name>Default</name>
    </names>
  </desktops>

  <!--
    <margin> can be used to reserve space where new/maximized/tiled
    windows will not be placed. Clients using layer-shell protocol reserve
    space automatically, so <margin> is only intended for other, specialist
    cases.

    If 'output' is not provided, the margin will be applied to all outputs.

    <margin top="10" bottom="10" left="10" right="10" output="HDMI-A-1" />
  -->

  
  

  <!--
    Keybind actions are specified in labwc-actions(5)
    The following keybind modifiers are supported:
      W - window/super/logo
      A - alt
      C - ctrl
      S - shift

    Use <keyboard><default /> to load all the default keybinds (those listed
    below). If the default keybinds are largely what you want, a sensible
    approach could be to start the <keyboard> section with a <default />
    element, and then (re-)define any special binds you need such as launching
    your favourite terminal or application launcher. See rc.xml for an example.
  -->
  <keyboard>
    
    <layoutScope>global</layoutScope>
    <repeatRate>25</repeatRate>
    <repeatDelay>600</repeatDelay>
    <keybind key="A-Tab">
      <action name="NextWindow" />
    </keybind>
    <keybind key="A-S-Tab">
      <action name="PreviousWindow" />
    </keybind>
    <keybind key="W-Return">
      <action name="Execute" command="lab-sensible-terminal" />
    </keybind>
    <keybind key="A-F4">
      <action name="Close" />
    </keybind>
    <keybind key="W-a">
      <action name="ToggleMaximize" />
    </keybind>
    <keybind key="W-Left">
      <action name="SnapToEdge" direction="left" combine="yes" />
    </keybind>
    <keybind key="W-Right">
      <action name="SnapToEdge" direction="right" combine="yes" />
    </keybind>
    <keybind key="W-Up">
      <action name="SnapToEdge" direction="up" combine="yes" />
    </keybind>
    <keybind key="W-Down">
      <action name="SnapToEdge" direction="down" combine="yes" />
    </keybind>
    <keybind key="A-Space">
      <action name="ShowMenu" menu="client-menu" atCursor="no" />
    </keybind>
    <keybind key="XF86_AudioLowerVolume">
      <action name="Execute" command="amixer sset Master 5%-" />
    </keybind>
    <keybind key="XF86_AudioRaiseVolume">
      <action name="Execute" command="amixer sset Master 5%+" />
    </keybind>
    <keybind key="XF86_AudioMute">
      <action name="Execute" command="amixer sset Master toggle" />
    </keybind>
    <keybind key="XF86_MonBrightnessUp">
      <action name="Execute" command="brightnessctl set +10%" />
    </keybind>
    <keybind key="XF86_MonBrightnessDown">
      <action name="Execute" command="brightnessctl set 10%-" />
    </keybind>
  
  
  
  
  </keyboard>

  <!--
    Multiple <mousebind> can exist within one <context>
    Multiple <actions> can exist within one <mousebind>

    Use <mouse><default /> to load all the default mousebinds (those listed
    below). If the default mousebinds are largely what you want, a sensible
    approach could be to start the <mouse> section with a <default />
    element, and then (re-)define any special binds you need such as launching
    a custom menu when right-clicking on your desktop. See rc.xml for an
    example.
  -->
  <mouse>

    <!-- time is in ms -->
    <doubleClickTime>500</doubleClickTime>

    <context name="Frame">
      <mousebind button="W-Left" action="Press">
        <action name="Focus" />
        <action name="Raise" />
      </mousebind>
      <mousebind button="W-Left" action="Drag">
        <action name="Move" />
      </mousebind>
      <mousebind button="W-Right" action="Press">
        <action name="Focus" />
        <action name="Raise" />
      </mousebind>
      <mousebind button="W-Right" action="Drag">
        <action name="Resize" />
      </mousebind>
    </context>

    <context name="Border">
      <mousebind button="Left" action="Press">
        <action name="Focus" />
        <action name="Raise" />
      </mousebind>
      <mousebind button="Left" action="Drag">
        <action name="Resize" />
      </mousebind>
    </context>

    <context name="TitleBar">
      <mousebind button="Left" action="Press">
        <action name="Focus" />
        <action name="Raise" />
      </mousebind>
      <mousebind button="Right" action="Click">
        <action name="Focus" />
        <action name="Raise" />
      </mousebind>
      <mousebind direction="Up" action="Scroll">
        <action name="Unshade" />
        <action name="Focus" />
      </mousebind>
      <mousebind direction="Down" action="Scroll">
        <action name="Unfocus" />
        <action name="Shade" />
      </mousebind>
    </context>

    <context name="Title">
      <mousebind button="Left" action="Drag">
        <action name="Move" />
      </mousebind>
      <mousebind button="Left" action="DoubleClick">
        <action name="ToggleMaximize" />
      </mousebind>
      <mousebind button="Right" action="Click">
        <action name="ShowMenu" menu="client-menu" />
      </mousebind>
    </context>

    <context name="Maximize">
      <mousebind button="Left" action="Click">
        <action name="ToggleMaximize" />
      </mousebind>
      <mousebind button="Right" action="Click">
        <action name="ToggleMaximize" direction="horizontal" />
      </mousebind>
      <mousebind button="Middle" action="Click">
        <action name="ToggleMaximize" direction="vertical" />
      </mousebind>
    </context>

    <context name="WindowMenu">
      <mousebind button="Left" action="Click">
        <action name="ShowMenu" menu="client-menu" atCursor="no" />
      </mousebind>
      <mousebind button="Right" action="Click">
        <action name="ShowMenu" menu="client-menu" atCursor="no" />
      </mousebind>
    </context>

    <context name="Icon">
      <mousebind button="Left" action="Click">
        <action name="ShowMenu" menu="client-menu" atCursor="no" />
      </mousebind>
      <mousebind button="Right" action="Click">
        <action name="ShowMenu" menu="client-menu" atCursor="no" />
      </mousebind>
    </context>

    <context name="Shade">
      <mousebind button="Left" action="Click">
        <action name="ToggleShade" />
      </mousebind>
    </context>

    <context name="AllDesktops">
      <mousebind button="Left" action="Click">
        <action name="ToggleOmnipresent" />
      </mousebind>
    </context>

    <context name="Iconify">
      <mousebind button="Left" action="Click">
        <action name="Iconify" />
      </mousebind>
    </context>

    <context name="Close">
      <mousebind button="Left" action="Click">
        <action name="Close" />
      </mousebind>
    </context>

    <context name="Client">
      <mousebind button="Left" action="Press">
        <action name="Focus" />
        <action name="Raise" />
      </mousebind>
      <mousebind button="Middle" action="Press">
        <action name="Focus" />
        <action name="Raise" />
      </mousebind>
      <mousebind button="Right" action="Press">
        <action name="Focus" />
        <action name="Raise" />
      </mousebind>
    </context>

    <context name="Root">
      <mousebind button="Left" action="Press">
        <action name="ShowMenu" menu="root-menu" />
      </mousebind>
      <mousebind button="Right" action="Press">
        <action name="ShowMenu" menu="root-menu" />
      </mousebind>
      <mousebind button="Middle" action="Press">
        <action name="ShowMenu" menu="root-menu" />
        <!-- openbox default, swap with above line to activate -->
        <!-- <action name="ShowMenu" menu="client-list-combined-menu" /> -->
      </mousebind>
      <mousebind direction="Up" action="Scroll">
        <action name="GoToDesktop" to="left" wrap="yes" />
      </mousebind>
      <mousebind direction="Down" action="Scroll">
        <action name="GoToDesktop" to="right" wrap="yes" />
      </mousebind>
    </context>

  </mouse>

  <!--
    A touch configuration can be bound to a specific device. If device
    name is left empty, the touch configuration applies to all touch
    devices or functions as a fallback. Multiple touch configurations
    can exist.
    See the libinput device section for obtaining the device names.

    Direct cursor movement to a specified output. If the compositor is
    running in nested mode, this does not take effect.

    If mouseEmulation is enabled, all touch up/down/motion events are
    translated to mouse button and motion events.
  -->
  <touch>
    
    
    <mouseEmulation>no</mouseEmulation>
  </touch>

  <!--
    The tablet cursor movement can be restricted to a single output.
    If output is left empty or the output does not exists, the tablet
    will span all outputs.

    The tablet orientation can be changed in 90 degree steps, thus
    *rotate* can be set to [0|90|180|270]. Rotation will be applied
    after applying tablet area transformation.

    The active tablet area can be specified by setting the *top*/*left*
    coordinate (in mm) and/or *width*/*height* (in mm). If width or
    height are omitted or default (0.0), width/height will be set to
    the remaining width/height seen from top/left.

    The tablet can be forced to always use mouse emulation. This prevents
    tablet specific restrictions, e.g. no support for drag&drop, but also
    omits tablet specific features like reporting pen pressure.

    Pen buttons emulate regular mouse buttons. The pen *button* can be any
    of [Stylus|Stylus2|Stylus3] and can be mapped to mouse buttons
    [Right|Middle|Side]. Tablet pad buttons [Pad|Pad2|Pad3|..|Pad9] also
    emulate regular mouse buttons and can be mapped to any mouse button.
    When using mouse emulation, the pen tip [tip] and the stylus buttons
    can be set to any available mouse button [Left|Right|Middle|..|Task].
  -->
  <tablet rotate="0" mouseEmulation="no">

  </tablet>

  <tabletTool motion="absolute" relativeMotionSensitivity="1.0" />

  <!--
    The *category* attribute is optional and can be set to touch, touchpad,
    non-touch, default or the name of a device. You can obtain device names by
    running *libinput list-devices* as root or member of the input group.

    Tap is set to *yes* by default. All others are left blank in order to use
    device defaults.

    All values are [yes|no] except for:
      - pointerSpeed [-1.0 to 1.0]
      - accelProfile [flat|adaptive]
      - tapButtonMap [lrm|lmr]
      - clickMethod [none|buttonAreas|clickfinger]
      - scrollMethod [twoFinger|edge|none]
      - sendEventsMode [yes|no|disabledOnExternalMouse]
      - calibrationMatrix [six float values split by space]
      - scrollFactor [float]

    The following <libinput>...</libinput> block may not be complete for
    your requirements. Default values are device specific. Only set an option
    if you require to override the default. Valid values must be inserted.

  -->

  <libinput>
    <device category="default">
      
      
      
      
      <tap>yes</tap>
      
      
      
      
      
      
      
      
      
      
      <scrollFactor>1.0</scrollFactor>
    </device>
  </libinput>

  <!--
    # Window Rules
    #   - Criteria can consist of 'identifier', 'title', 'sandboxEngine' or
    #     'sandboxAppId'. AND logic is used when multiple options are specified.
    #   - 'identifier' relates to app_id for native Wayland windows and
    #     WM_CLASS for XWayland clients.
    #   - Criteria can also contain `matchOnce="true"` meaning that the rule
    #     must only apply to the first instance of the window with that
    #     particular 'identifier' or 'title'.
    #   - Matching is case-insensitive and is performed using shell wildcard
    #     patterns (see glob(7)) so '\*' (not between brackets) matches any
    #     string and '?' matches any single character.

    <windowRules>
      <windowRule identifier="*"><action name="Maximize"/></windowRule>
      <windowRule identifier="foo" serverDecoration="yes"/>
      <windowRule title="bar" serverDecoration="yes"/>
      <windowRule identifier="baz" title="quax" serverDecoration="yes"/>
    </windowRules>

    # Example below for `lxqt-panel` and `pcmanfm-qt \-\-desktop`
    # where 'matchOnce' is used to avoid applying rule to the panel
    # configuration window with the same 'app_id'.

    <windowRules>
      <windowRule identifier="lxqt-panel" matchOnce="true">
        <skipTaskbar>yes</skipTaskbar>
        <action name="MoveTo" x="0" y="0" />
        <action name="ToggleAlwaysOnTop"/>
      </windowRule>
      <windowRule title="pcmanfm-desktop*">
        <skipTaskbar>yes</skipTaskbar>
        <skipWindowSwitcher>yes</skipWindowSwitcher>
        <fixedPosition>yes</fixedPosition>
        <action name="MoveTo" x="0" y="0" />
        <action name="ToggleAlwaysOnBottom"/>
      </windowRule>
      <windowRule identifier="org.qutebrowser.qutebrowser">
        <action name="ResizeTo" width="1024" height="800" />
        <action name="AutoPlace"/>
      </windowRule>
    </windowRules>
  -->

    <ignoreButtonReleasePeriod>250</ignoreButtonReleasePeriod>
    <showIcons>yes</showIcons>

  <magnifier>
    <width>400</width>
    <height>400</height>
    <initScale>2.0</initScale>
    <increment>0.2</increment>
    <useFilter>yes</useFilter>
  </magnifier>

</labwc_config>
