Commit graph

106 commits

Author SHA1 Message Date
Johan Malm
247d2b581c osd: optionally show windows on all workspaces
Also share common config option (rc.window_switcher.criteria) in osd.c and
desktop.c to make sure the window lists are always consistent.

Configure with `<windowSwitcher allWorkspaces="yes|no">`
2024-03-05 22:16:55 +01:00
Andrew J. Hesford
f90b7dca2a session: run shutdown script, clean up activation env before exit 2024-03-02 21:30:03 -05:00
Birger Schacht
1ea7e8b494 fix: typo in labwc-config.5.scd
specifc -> specific
2024-03-02 08:44:09 +01:00
Jens Peters
7110b7cf3e docs: add sendEventsMode to libinput snippet 2024-02-25 20:35:03 +01:00
Sachin Bhat
6fb06c54c2 config: support libinput sendEventsMode
This allows to enable / disable libinput devices.

Co-Authored-By: @Consolatis
2024-02-24 21:36:53 +01:00
Marvin Dostal
8be9c38460
Add click method libinput option (#1416)
<libinput>
  <device>
    <clickMethod>none|buttonAreas|clickfinger</clickMethod>
  </device>
</libinput>
2024-02-21 17:19:48 +00:00
Andrew J. Hesford
3162bbb3c2 xdg: add snapping.notifyClient option to control tiling events 2024-01-30 07:30:07 -05:00
Jens Peters
e547e29563 docs: extend touch section 2024-01-22 21:50:18 +00:00
Andrew J. Hesford
4181bb5335 resistance: support negative strengths to indicate attractive snapping 2024-01-21 16:10:50 -05:00
Andrew J. Hesford
57ea197e6c resistance: add window-edge resistance for interactive moves/resizes 2024-01-21 16:10:50 -05:00
Johan Malm
698c7ace07 config: support merging multiple config files
Add the -m|--merge-config command line option to iterate backwards over
XDG Base Dir paths and read config/theme files multiple times.

For example if both ~/.config/labwc/rc.xml and /etc/xdg/labwc/rc.xml
exist, the latter will be read first and then the former (if
--merge-config is enabled).

When $XDG_CONFIG_HOME is defined, make it replace (not augment)
$HOME/.config. Similarly, make $XDG_CONFIG_DIRS replace /etc/xdg when
defined.

XDG Base Dir Spec does not specify whether or not an application (or a
compositor!) should (a) define that only the file under the most important
base directory should be used, or (b) define rules for merging the
information from the different files.

ref: https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html

In the case of labwc there is a use-case for both positions, just to be
clear, the default behaviour, described by position (a) above, does NOT
change.

This change affects the following config/theme files:
  - rc.xml
  - menu.xml
  - autostart
  - environment
  - themerc
  - themerc-override
  - Theme buttons, for example max.xbm

Instead of caching global config/theme directories, create lists of paths
(e.g.  '/home/foo/.config/labwc/rc.xml', '/etc/xdg/labwc/rc.xml', etc).
This creates more common parsing logic and just reversing the direction
of iteration and breaks early if config-merge is not wanted.

Enable better fallback for themes. For example if a particular theme does
not exist in $HOME/.local/share/themes, it will be searched for in
~/.themes/ and so on. This also applies to theme buttons which now
fallback on an individual basis.

Avoid using stat() in most situations and just go straight to fopen().

Fixes #1406
2024-01-18 20:20:36 +00:00
Jens Peters
722a802de0 docs: add touch section 2024-01-13 22:18:20 +00:00
Tomi Ollila
42afdf9193 Fixed some typos, whitespace, periods, 80-column lines
- typos: LINGUAS manually, rest with help of aspell(1)
- whitespace: some trailing spaces/tabs, one utf-8 NBSP (#xC2 #xA0)
- made most text in docs/ fit in max 80-column wide lines
- consistent trailing periods in sentences in labwc-actions.5.scd and
  labwc-config.5.scd; labwc-theme.5.scd had different consistency,
  changed it follow these other files with sentence-ending periods
- and ", respectively" (comma often used to separate)
2024-01-13 19:05:50 +00:00
Jens Peters
52b9b4292f docs: fix element ending 2024-01-12 21:01:29 -05:00
Jens Peters
cc8f4f943a docs: extend tablet section
Also change order to be in line with the xml elements.
2024-01-10 21:10:11 +00:00
Ph42oN
bce0c6ce56
Add tearing support (#1390)
Co-authored-by: Andrew J. Hesford <ajh@sideband.org>
2024-01-08 20:58:58 +00:00
Jens Peters
72f3ce6b41 docs: extend supported mouse buttons 2024-01-06 19:37:41 +00:00
Jens Peters
c4d6695bf1 docs: add tablet section 2024-01-06 19:19:40 +00:00
Johan Malm
fbd6e49f8f labwc-config(5): update libinput section 2024-01-01 22:04:21 +00:00
Johan Malm
7f357a388b labwc-config(5): describe adaptive sync fullscreen option 2023-12-30 16:04:24 +00:00
Jared Baur
6faee17d20 Add touchpad device type
It is nice to have finer granularity for device types to allow for
configurations such as using `naturalScroll` on touchpads, but not on
regular pointer devices such as mice.
2023-12-29 08:08:32 +00:00
kyak
d2d469133f
osd: support full app_id in window switcher (#1309)
Support showing full application
identifier or the trimmed variant in window switcher OSD.

Regression notice: For anyone using ‘identifier’ in window-switcher field configuration, change it to ‘trimmed_identifier’.
2023-12-27 10:55:49 +00:00
Andrew J. Hesford
52aafcc054 feat: automatic window placement
With automatic placement, new top-level windows will be placed to
minimize overlap with other windows already on screen.
2023-12-26 19:20:06 +00:00
Andrew J. Hesford
ef62d47ad1 feat: under-cursor window placement
With under-cursor placement, new top-level windows will be centered
under the cursor rather than centered on the active view.
2023-12-26 19:20:06 +00:00
Johan Malm
59dc4b702a labwc-config(5): update <margin> description
...to include that it is a workaround which is usually not required.
2023-12-08 23:56:00 +01:00
Ludgie
b34d074063
feat: implement <font place="InactiveWindow"> (ref scope: 2.4.7) (#1292)
* feat: implement <font place="InactiveWindow"> (ref scope: 2.4.7)
* docs: add inactivewindow
2023-12-07 09:28:27 +01:00
Johan Malm
368ede7460 window-rules: add fixedPosition property
...to address regression introduced by 57075ce and enables panel/desktop
clients which rely on window rules to remain in the same position when
the usable-area changes (normally because an exclusive layer-shell
clients is started/finished).

Also disallows interactive move/resize, for example by alt +
mouse-press.

Fixes: #1235
2023-11-10 21:46:15 +01:00
Consolatis
984aeb0b0b keyboard: allow applying keyboard layout per window
Fixes #1076

It can be enabled with a config like

~/.config/labwc/rc.xml:
<keyboard layoutScope="window">

~/.config/labwc/environment:
XKB_DEFAULT_LAYOUT=de,us
XKB_DEFAULT_OPTIONS=grp:alt_shift_toggle,grp_led:scroll

With a configuration like this each window should now remember
the active keyboard layout when switching between windows.

By default, the keyboard layout keeps being a global state.
2023-11-04 07:58:43 +00:00
Johan Malm
7aa540b8ab docs/labwc-config.5.scd: describe <snapping> section 2023-10-19 21:32:32 +02:00
John Lindgren
ecad76560e keyboard: add option to enable Num Lock automatically (default=enabled)
Co-authored-by: @Consolatis
2023-10-09 20:48:03 +01:00
Consolatis
d00f76e562 docs: update supported keybind and mousebind modifiers 2023-10-09 20:31:59 +01:00
Johan Malm
881d788bee action: do not expand env vars in Exec action
...<command> argument (but still resolve tilde).

This makes it easier to write sh -c '' constructs without turning labwc
into a shell parser in order to expand environment variables, whilst
respecting single quotes and escaped characters as well as ignoring
subshells syntax like $(foo) and backticks.

Also, fix bug where buffer length+alloc get out-of-sync
2023-09-23 14:52:59 +01:00
redtide
143714f1c9 src/common/parse-bool.c: support on/off boolean values 2023-09-13 05:27:27 +01:00
Consolatis
c1c624daf0 keybinds: add optional layoutDependent argument
This allows to define keybinds as layout dependent. E.g. keybinds
only trigger if the configured key exists in the currently active
keyboard layout. The keybind will also only trigger on the physical
key that is mapped to the configured key in the active layout.

By default the new argument is false which means all keybinds by
default are layout agnostic. This optional argument can be used
to restore the earlier default behavior of having keys layout
dependent.
2023-09-11 15:41:19 +02:00
Standreas
8a67476ab3 docs: clarify keyboard modifiers can be used for mousebinds
Fixes: #1075
2023-09-10 19:36:24 +02:00
Consolatis
bb235337d8 window-rules: add ignoreFocusRequest property
This allows to reject focus requests from specific applications.
2023-09-10 13:31:15 +02:00
tokyo4j
3c3656f74e config: support <tapAndDrag> and <dragLock> 2023-09-07 22:55:50 +01:00
Johan Malm
206db43786 config: s/app_id/identifier/ for window-switcher field
...to be consistent with window rules.

The use of 'app_id' for window-switcher fields is hereby deprecated.
2023-08-20 20:49:27 +01:00
Consolatis
58b33fb0c9 Add window resize indicator 2023-08-19 18:37:16 +02:00
Consolatis
e39744f1d3 Add keepBorder <theme> option and enable it by default
With the new keepBorder option enabled, the
ToggleDecorations action now has 3 states:

- the first time only disables the titlebar
- the second time disables the whole SSD
- the third time enables the whole SSD again

When the keepBorder action is disabled, the old 2-state
behavior is restored, e.g. the ToggleDecorations action
only toggles between on and off.

Fixes #813
2023-08-10 16:09:20 +02:00
Johan Malm
41de529fff window-rules: support matchOnce attribute
...allowing a rule to be applied to only the first window matching a
particular criteria. For example, the following can be used to apply a
window rule to lxqt-panel but not its 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>
    </windowRules>
2023-06-26 06:04:07 +01:00
Johan Malm
4a531daef8 config: support <margin top="" bottom="" left="" right="" output="" /> 2023-06-26 06:04:07 +01:00
Sachin Bhat
629bc9c978 config: support <desktops number=> update documentation 2023-06-25 10:31:13 +01:00
Sachin Bhat
1e33734543 config: support <desktops number=>
Documentation updated at  and
2023-06-25 10:31:13 +01:00
Tomi Ollila
f817a9e56a docs: fix some typos
Between, output, rounded and focused.

Added one inconsistently missing trailing period.

Inserted newline before last word in one line in
labwc-actions.5.scd in order to keep that line from
passing 80-column boundary.
2023-05-27 14:12:22 +01:00
Johan Malm
a6f0fc9c62 window-rules: add skipTaskbar and skipWindowSwitcher 2023-05-22 20:37:49 +01:00
Johan Malm
2df13933ca labwc-config(5): describe element/attribute-agnostic XML parsing 2023-05-10 22:12:02 +01:00
Johan Malm
d37e705548 window-rules: support title criteria
Example config:

    <windowRules>
      <windowRule identifier="foot" title="max">
        <action name="Maximize"/>
      </windowRule>
    </windowRules>

Observe that:

- `foot -T foo` starts maximized
- `xterm -T foo` starts normal
2023-05-10 21:21:34 +01:00
Consolatis
9a9e20d2b0 followMouse: add followMouseRequiresMovement
This implements the same config option as `underMouse` in Openbox.

Fixes #862
2023-05-06 14:13:20 +01:00
Johan Malm
d609c9e3f9 Support window-rules
Two types of window rules are supported, actions and properties. They are
defined as shown below.

    <windowRules>

      <!-- Action -->
      <windowRule identifier="some-application">
        <action name="Maximize"/>
      </windowRule>

      <!-- Property -->
      <windowRule identifier="foo*" serverDecoration="yes|no"/>

    </windowRules>

Rules are applied if windows match the criteria defined by the
'identifier' attribute which relates to app_id for native Wayland windows
and WM_CLASS for XWayland clients.

Matching against patterns with '*' (wildcard) and '?' (joker) is
supported.

Add 'serverDecoration' property.
2023-05-04 22:09:55 +01:00