Commit graph

166 commits

Author SHA1 Message Date
Johan Malm
df8e3d819c docs/: remove XML declarations in .xml files
...because we don't like them anymore and libxml2 does not consider them
mandatory.
2025-10-21 12:30:32 +09:00
Consolatis
364a1d5207 osd: allow window switcher to temporary unshade windows
This can be configured with a new unshade="yes|no"
argument for windowSwitcher in rc.xml

Fixes: #3111
2025-10-13 19:45:46 +02:00
tokyo4j
6cdfe32af0 rcxml: move <maximizedDecoration> from <core> to <theme> 2025-10-09 22:01:05 +01:00
Johan Malm
5765586636 config: add <core><promptCommand>
...to enable configuration of the action prompt command.

Also set some better defaults for labnag.

The new default command is:

    labnag \
        --message '%m' \
        --button-dismiss '%n' \
        --button-dismiss '%y' \
        --background '%b' \
        --text '%t' \
        --border '%t' \
        --border-bottom '%t' \
        --button-background '%b' \
        --button-text '%t' \
        --border-bottom-size 1 \
        --button-border-size 3 \
        --timeout 0

...where the conversion specifiers are defined as follows:

    %m: the `<prompt>` message option
    %n: _("No")
    %y: _("Yes")
    %b: osd.bg.color
    %t: osd.label.text.color

This config options also enables the use of a different dialog client, for
example like this:

    <core>
      <promptCommand>zenity --question --text="%m"</promptCommand>
    </core>
2025-09-24 20:13:51 +01:00
tokyo4j
24f39e3a41 default-bindings.h: set combine="yes" for SnapToEdge keybinds
Some checks failed
labwc.github.io / notify (push) Has been cancelled
2025-09-19 16:23:23 +09:00
Johan Malm
a9f927047a default-bindings.h: focus & raise on border press
...because it is probably what most people expect and it makes the
behavior consistent with that of Openbox.

Fixes: #3039
2025-09-04 15:54:37 +09:00
tokyo4j
02be24bf59 mousebind: support Border context
This new context includes `Top`...`BRCorner` and makes it easier to modify
the mousebinds bound to them.
2025-09-02 21:29:10 +01:00
tokyo4j
2e9292b7a3 osd: support window switcher with thumbnails
The new-style window switcher can be enabled with
<windowSwitcher style="thumbnail">.

New theme entries:

osd.window-switcher.style-thumbnail.width.max: 80%
osd.window-switcher.style-thumbnail.padding: 4
osd.window-switcher.style-thumbnail.item.width: 300
osd.window-switcher.style-thumbnail.item.height: 250
osd.window-switcher.style-thumbnail.item.padding: 10
osd.window-switcher.style-thumbnail.item.active.border.width: 2
osd.window-switcher.style-thumbnail.item.active.border.color: #589bda
osd.window-switcher.style-thumbnail.item.active.bg.color: #c7e2fc
osd.window-switcher.style-thumbnail.item.icon.size: 60
2025-08-29 20:42:01 +01:00
tokyo4j
888dbedeed ssd: allow hiding titlebar on maximization
<core disableMaximizedServerDecor="yes"> hides the titlebar when a window
is maximized.

Co-authored-by: @CosmicFusion
2025-08-24 12:41:41 +01:00
01micko
35ec696bd9 docs/rc.xml.all: clean up libinput section.
- add alternative accepted values for [yes|no]
- re #3006
2025-08-20 02:47:33 +09:00
tokyo4j
2f183cdcb6 interactive: allow snapping to corner edges
In addition to <snapping><range>, <snapping><cornerRange> configures the
distance from the screen corner to trigger quater window snapping.

Also, new values "up-left", "up-right", "down-left" and "down-right" are
allowed for <action name="(Toggle)SnapToEdge" direction="[value]"> and
<query tiled="[value]">.
2025-08-04 21:24:12 +01:00
tokyo4j
3aab0c3b91 Replace alacritty in default keybind with lab-sensible-terminal 2025-07-06 14:11:27 +01:00
tokyo4j
d7fd23e52d rcxml: revise drag-lock behavior and option names
This revises the changes done in 22d319c:
- Cancel defaulting to <dragLock>sticky<dragLock>. So labwc now disables
  drag-lock by default, as libinput does.
- Update the options from [yes|no|sticky] to [timeout|no|yes] to
  emphasize that the "sticky" mode (now "yes") is recommended when using
  drag-lock.
2025-07-01 03:00:55 +09:00
Johan Malm
fda63058b2 config: use Super modifier instead of Alt for default mousebinds
...A-Left and A-Right (for move and resize) to avoid interfering with some
clients like CAD programs and games.
2025-06-22 20:43:30 +01:00
Johan Malm
e62f403f56 config: deprecate A-F3
...because A-F3 is too close to A-F4 and it is better to be agnostic to
choice of launcher.
2025-06-22 20:43:30 +01:00
Johan Malm
26a9c637d8 config: deprecate A-<arrow> keybinds
...because Alt- keybinds should be for clients to use and the A-<arrow>
default combination is a frequent user complaint because it prevents some
common usage patterns like alt-left/right in web browers.
2025-06-22 20:43:30 +01:00
Johan Malm
145de91932 config: add <core><primarySelection>
...to enable/disable primary selection clipboard support. This only works
on launch.

The reason it is useful to be able to disable this is that some clients
(like browsers) support middle-button-click to start scrolling up/down.

With some clients can be disabled via

   gsettings set org.gnome.desktop.interface gtk-enable-primary-paste false

...but for others (like chromium and electron based programs) a compositor
setting is required.

Fixes: #2815
2025-06-13 20:27:49 +01:00
may
e96b5af42d libinput: implement threeFingerDrag feature 2025-06-07 21:30:07 +09:00
tokyo4j
22d319cce8 libinput: support <dragLock>sticky<dragLock> and enable it by default
It is recommended by libinput:
https://lists.freedesktop.org/archives/wayland-devel/2024-November/043860.html
2025-06-07 12:46:53 +01:00
dd
c5b9e2665d
ssd: add configurable drop-shadows for tiled windows 2025-06-05 22:46:58 +02:00
Consolatis
fdab272bdc Add scroll method libinput option
<libinput>
  <device>
    <scrollMethod>none|twofinger|edge</scrollMethod>
  </device>
</libinput>

Fixes: #2766
2025-05-28 14:43:51 +09:00
tokyo4j
b299404811 config: drop xwayland persistence workaround for wlroots < 0.18.2
We enabled xwayland persistence for wlroots < 0.18.2 to prevent crashes,
but it's no longer needed since we now depend on wlroots 0.19.
2025-05-21 21:27:57 +09:00
Tomi Ollila
24c199aeef docs: rc.xml.all: Fix reference to labwc-config manpage. Unwefify.
There is no "labwc" manpage in section 5 (man 5 labwc may fail or
show e.g. labwc-action manpage).

Replaced one 'we' with passive form, to match the common style in docs/.
2025-04-21 07:57:29 +01:00
tokyo4j
44146487b2 osd: update the default window switcher layout
The default window switcher layout is updated from:

  <windowSwitcher>
    <fields>
      <field content="type" width="25%" />
      <field content="trimmed_identifier" width="25%" />
      <field content="title" width="50%" />
    </fields>
  </windowSwitcher>

to:

  <windowSwitcher>
    <fields>
      <field content="icon" width="5%" />
      <field content="desktop_entry_name" width="30%" />
      <field content="title" width="65%" />
    </fields>
  </windowSwitcher>

Only desktop entry name and title are shown when libsfdo is not linked.
2025-04-02 20:49:38 +01:00
Johan Malm
9ca0b111f4 config: increase default <snapping><range> to 10
...to make it easier to snap windows on the edge between two monitors.

Fixes: #2602
2025-03-08 22:36:53 +09:00
Tomi Ollila
92e4c5a606 docs: trailing space, 1 tab to spaces, labwc-theme.5.scd to fit 80 cols 2025-02-08 17:37:43 +01:00
Andrew J. Hesford
b2623ce1e3 docs/rc.xml.all: correct description of resize.cornerRange 2025-02-04 18:55:31 -05:00
Andrew J. Hesford
6b9cc5dd64 ssd: make sizes of invisible SSD extents configurable 2025-02-04 18:55:31 -05:00
tokyo4j
950337b895 ssd: fix resizing on border corners and add <resize><cornerRange>
Eliminate corner extents and instead use cursor position to map SSD
borders and extents to corner contexts, with a size configurable by the
<resize><cornerRange> parameter. This simplifies extent handling,
eliminates bugs in the detection of corner context, and allows users to
expand corner targets if they wish.

Co-authored-by: Andrew J. Hesford <ajh@sideband.org>
2025-02-04 11:13:32 -05:00
Consolatis
ed4553fc7e src/menu: add global config for menu.showIcons 2025-02-02 15:05:37 +00:00
tokyo4j
26064fb8f6 Add <theme><fallbackAppIcon>
This commit adds <theme><fallbackAppIcon> that configures the icon name
to be used when lookups for an application icon is failed. Its default
value is set as 'labwc' which shows our labwc logo.
2025-01-26 11:46:32 +01:00
tokyo4j
a93eb84335 Add default Alt-Shift-Tab keybind for PreviousWindow 2025-01-03 10:51:26 +09:00
John Lindgren
dc826fef81 rcxml: add core.autoEnableOutputs option
Currently, labwc automatically enables outputs at startup and when new
outputs are connected. Make this behavior optional (but still enabled by
default).

With autoEnableOutputs disabled, tools such as kanshi can be used to
give finer-grained control of which outputs are enabled and when.
2024-12-31 16:32:42 +00:00
Johan Malm
a5973c3b48 keyboard: do not set numlock by default
Only force on|off if users specifically requests it in the config file.

Related-to: #2463
2024-12-31 16:23:47 +00:00
Johan Malm
bb982dc0af keyboard: set numlock to off by default
...to avoid surprises on Acer Aspire One laptops where the numeric
keyboard does not physically exist but "overlaps" the qwerty keyboard.

Reported-by: staryvyr on IRC

Note: We do not like changing defaults, but feel that there is a good
reason for this one.
2024-12-29 21:34:41 +00:00
Johan Malm
2d312cd28b config: temporarily set xwaylandPersistence to 'yes' by default (#2414)
...to avoid a bug that is present in wlroots <0.18.2 and which has the
potential to crash the compositor when performing a drag-and-drop action
at the same time as the XWayland server is shutting down.

This will be reverted when wlroots-0.18.2 can be linked with.

Related-to: #2371
2024-12-08 21:18:38 +00:00
Johan Malm
8e3d5784a3 docs: simplify description of shell wildcard patterns
...to align with glob(7) language

Reported-by: @vyivel
2024-12-01 20:17:04 +01:00
tokyo4j
22eefa32a2 placement: set default placement policy to cascade 2024-11-14 09:21:01 +01:00
Simon Long
45a9bd95e7
Add mouse emulation for touch devices (#2277) 2024-10-29 19:22:01 +00:00
tokyo4j
a745f91169 ssd: support window icons
The default `titleLayout` is updated to `icon:iconify,max,close` which
replaces the window menu button with the window icon.

When the icon file is not found or could not be loaded, the window menu
icon as before is shown.

The icon theme can be selected with `<theme><icon>`.

This commit adds libsfdo as an optional dependency. `-Dicon=disabled` can
be passsed to `meson setup` command in order to disable window icon, in
which case the window icon is always replaced with a window menu button.
2024-09-25 18:04:09 +09:00
Johan Malm
cc26ac29b9
theme: finish titleLayout implementation (#2150)
Change Openbox style WLIMC syntax to `menu:iconify,max,close` as was
agreed when PR #2088 was merged.

    <titlebar>
      <layout>menu:iconify,max,close</layout>
      <showTitle>yes|on</showTitle>
    </titlebar>

Ref:
- https://github.com/labwc/labwc/pull/2088#issuecomment-2295730704
2024-09-23 19:17:12 +01:00
tokyo4j
14f4d8c361 docs/rc.xml.all: add missing atCursor="no" 2024-09-21 14:15:16 +01:00
Droc
4f11dad45b client list combined menu examples 2024-09-19 06:33:17 +01:00
tokyo4j
1f1bdad087 interactive: allow moving horizontally/vertically maximized window
Applies drag resistance unidirectionally for horizontally/vertically
maximized windows, allowing them to be dragged without being untiled
immediately. When the distance of cursor movement orthogonal to the
maximized direction exceeds <resistance><unMaximizeThreshold>.

While dragging a horizontally/vertically maximized window, edge/region
snapping is disabled to prevent unintentional snapping and overlays.

This commit also includes some refactoring to simplify the logic.
2024-08-26 20:30:22 +02:00
Andrew J. Hesford
1bcaf8255f action: rename "omnipresent" button options for Openbox compatibility
- Mouse context "Omnipresent" -> "AllDesktops"
- Theme elements "window.*.button.omnipresent" -> "window.*.button.desk"
- Update documentation accordingly
2024-08-25 07:22:23 +02:00
Standreas
f2b6661db4 Fix typo in rc.xml.all 2024-08-24 10:16:42 -04:00
Andrew J. Hesford
b7bccc8026 ssd: add optional omnipresent button 2024-08-24 05:42:38 +02:00
Andrew J. Hesford
186a07be9b ssd: add optional shade button 2024-08-24 05:42:38 +02:00
tokyo4j
b667107d1a input: move <scrollFactor> to <libinput> section
This allows per-device configuration of scroll factor (e.g. setting
different scroll factors for mice and touchpads).
2024-08-23 16:20:56 +09:00
Johan Malm
228a74ca48
Merge pull request #2088 from xi/titlelayout
theme: implement titleLayout
2024-08-21 19:20:34 +01:00