Commit graph

140 commits

Author SHA1 Message Date
John Lindgren
07a83c19f0 config: Add support for font slant and weight 2022-09-15 21:48:05 +01:00
Johan Malm
4ba59f7074 rcxml.c: enable tap be default on non-touch devices
Some trackpads do not honour tap if we only enable it on touch-devices.
2022-09-11 21:26:32 +01:00
John Lindgren
ebd0a5d526 config: Redefine Title context to include blank areas of Titlebar
... and use Title for the Drag (Move) and DoubleClick (Maximize)
titlebar actions, which are unexpected when the cursor is over one
of the window buttons.
2022-09-09 15:23:13 -04:00
Consolatis
ea6007d34c src/config/rcxml.c: Add support for <devault /> mousebinds
This loads default mousebinds and provides a way to keep config files
simpler whilst allowing user specific binds.

Note that if no rc.xml is found, or if no <mouse><mousebind> entries
exist, the same default mousebinds will be loaded even if the <devault />
element is not provided.

Example usage (with a slight spelling error):

  <mouse>
    <default />
    <context name="Root">
      <mousebind button="Right" action="Press">
        <action name="ShowMenu" menu="desktop-menu" />
      </mousebind>
    </context>
  </mouse>

Co-Authored-By: @johanmalm

Fixes #416
2022-08-30 16:39:09 +01:00
Consolatis
3afd666cc4 src/config/rcxml.c: Replace earlier mousebinds by later ones 2022-08-30 16:39:09 +01:00
Consolatis
99237cc232 src/config/mousebind.c: Fix mousebind ordering 2022-08-30 16:39:09 +01:00
Consolatis
7b995788ee src/config/rcxml.c: Merge default mousebinds 2022-08-30 16:39:09 +01:00
Flrian
c1490b632d Add config option to disable preview outlines 2022-08-24 20:21:14 +01:00
Johan Malm
19dea7450b keybind: remove default alt-escape for Exit
...because too many have exited the compositor by mistake trying to get
out of alt-tab cycling or similar.
2022-08-12 22:50:56 +02:00
Consolatis
4dce894fda src/config/session.c: Handle allocation failures
Reported-by: @heroin-moose
2022-07-29 06:45:24 +01:00
Consolatis
d6ea0d68cf src/config/session.c: Update dbus / systemd activation environment
This allows xdg-desktop-portal-wlr to work out of the box for screen-recording.
If systemd or dbus is not available the environment update will fail gracefully.

This patch will set XDG_CURRENT_DESKTOP=wlroots but a user may change this by
either having the environment variable set before starting labwc or by having
a different value set in ~/.config/labwc/environment.

Based on PR #461 by @Joshua-Ashton
2022-07-29 06:45:24 +01:00
Consolatis
79b1630724 config/rcxml.c: Fix parsing of adaptiveSync setting 2022-07-14 01:01:10 +02:00
Consolatis
9b49f19a73 src/action.c: Convert action->arg to a list of action_arg
In preperation for Actions that require multiple arguments
2022-07-04 16:19:28 +01:00
Consolatis
c93d625938 workspaces: Add workspace actions 2022-06-15 22:26:21 +02:00
Consolatis
ae2fa1571b workspaces: Implement config parsing 2022-06-15 22:26:21 +02:00
Consolatis
39cdba36a8 src/config/keybind.c: fix keybind insertion order
This restores the intended behavior of keybinds set by `<default />`
to be overwritten by manually configured keybinds which come later in
the config.

In `src/keyboard.c`, `handle_keybinding()` is going backwards through
the list of keybindings and breaks after the first match.

`wl_list_insert(&list_node, item)` will insert the new item *after* the
list_node so if its called multiple times with the same list_node as
fist argument the result will be a reversed list. Using `list_node.prev`
instead will result in a non-reversed list.
2022-06-03 22:54:32 +01:00
Consolatis
519375a7f8 Revert "config: support <mouse><default />"
This reverts commit 3d337857b7.

Revert for now until we have some infrastructure in place to
selectively replace default {key,mouse}binds with custom ones.

Fixes #304
Reported-by: @01micko
2022-04-26 19:56:06 +02:00
Johan Malm
3d337857b7 config: support <mouse><default />
This loads default mousebinds and provides a way to keep config files
simpler whilst allowing user specific binds.

Note that if no rc.xml is found, or if no <mouse><mousebind> entries
exist, the same default mousebinds will be loaded even if the <default />
element is not provided.

Example usage:

  <mouse>
    <default />
    <context name="Root">
      <mousebind button="Right" action="Press">
        <action name="Execute" command="my-menu-application" />
      </mousebind>
    </context>
  </mouse>
2022-04-22 17:52:01 +01:00
Johan Malm
edc5338af4 Add command line option -C to specify config directory
Also expand usage message to explain what each option means
2022-04-22 17:00:36 +01:00
Johan Malm
5b34c81768 Fix trivial coding style breaches 2022-04-04 20:53:36 +01:00
Consolatis
b7b1e8064f Add WindowMenu button 2022-01-26 06:17:41 +00:00
Consolatis
759b26b5c1 Add window menu 2022-01-26 06:17:41 +00:00
Liam Middlebrook
875b258602 output: Add option to preview the contents of the current cycle_view
Add the 'cycleViewPreview.core' option to rc.xml to enable previews of
the selected view when cycling between windows. Default this option to
be disabled to match current behavior.
2022-01-23 16:02:54 +00:00
Consolatis
c484ab252e config/rcxml: Prevent overwriting action argument 2022-01-23 10:44:51 -05:00
Consolatis
f0a3f365e5 Centralize freeing of action lists
Reduces some code duplication and makes it easier to extend struct action
2022-01-23 10:36:04 -05:00
Consolatis
d9cef42721 CodeStyle 2022-01-09 06:37:39 +00:00
Consolatis
87f4a60e38 Allow mouse movements to trigger SnapToEdge 2022-01-08 10:30:03 +00:00
ARDiDo
a893607a0e mousebindings: change default focus and raise to press from drag.
This raises the window without having to drag it.
2022-01-07 22:05:07 +00:00
ARDiDo
5935a78fb4 mouse: add support for drag mouse event 2022-01-07 22:05:07 +00:00
Consolatis
2b82bdcdb7 More robust rc.xml parsing 2022-01-06 19:44:00 +00:00
Consolatis
0b45cce648 Rewrite action handling to allow multiple actions at once 2022-01-05 16:22:41 +00:00
Consolatis
f28319be54 config/keybind.c: Don't overwrite the stack 2022-01-03 08:27:22 +00:00
Johan Malm
c797dbe189 config: de-couple <FollowMouse> and <raiseOnFocus>
Set these two variables indepently of each other as this is cleaner and
more explicit.

In openbox <raiseOnFocus> only applies if <followMouse> is set, but there
is no need to immitate this.
2021-12-29 14:04:41 +00:00
bi4k8
26d3d13a82 move edge resizing from hard-coded to configuration 2021-12-26 21:31:11 +00:00
bi4k8
5ee4baee7a implement corner/edge mouse contexts 2021-12-26 21:31:11 +00:00
Consolatis
fa18f347e5 config/rcxml: Allow multiple <action>s inside of a <mousebind>
Issue arises when using the default config from docs/rc.xml.all.
Without this patch only the last action defined inside a <mousebind>
will have an effect.

Without a config or when defining the same <mousebind> multiple times
with each containing only a single <action> the issue does not exist.
2021-12-23 09:53:11 -05:00
bi4k8
a3796fa6f3 implement libinput tapButtonMap setting
this is a standard libinput setting that was not previously exposed
2021-12-12 19:00:58 -05:00
ARDiDo
859495a8be Config: add OSD font configuration 2021-12-06 17:44:28 -05:00
Johan Malm
3df4ade615 rcxml.c: set default Client Right/Middle Press
Raise+Focus, just as for Left Press
2021-12-03 22:11:09 +00:00
Johan Malm
04d69d8711 rcxml.c: add Alt-Left/Right to default mousebinds 2021-12-03 22:02:38 +00:00
bi4k8
a9f11c5fc7 move window raise/focus on click from hard-coded logic to default mouse binding 2021-12-03 06:46:43 +00:00
bi4k8
11512d30af implement root menu display as a default mouse binding 2021-12-03 06:46:43 +00:00
bi4k8
6b3320bcc1 do not add mouse bindings with no set context 2021-12-02 17:58:31 +00:00
bi4k8
b008917895 implement handling for Client, Frame, and Root/Desktop (conflated for now) mouse contexts 2021-12-02 17:58:31 +00:00
bi4k8
4f6297d1ad parse menu names from Menu mouse-bindings 2021-12-01 23:17:19 +00:00
bi4k8
8eab1e8132 parse and respect modifiers for mouse bindings 2021-12-01 15:11:21 -05:00
bi4k8
c34a2fc976 make parse_modifiers public 2021-12-01 15:11:21 -05:00
Johan Malm
d50c2f2eac Fix minor style violations 2021-11-26 19:27:50 +00:00
John Lindgren
c01d1f124c Basic support for Move action
- Add Move as a default mouse binding for a Titlebar Press action
- Remove the hard-coded handling in cursor_button()

Example config snippet:

    <mouse>
      <context name="Titlebar">
        <mousebind button="Left" action="Press">
          <action name="Focus"/>
          <action name="Raise"/>
          <action name="Move"/>
        </mousebind>
      </context>
    </mouse>
2021-11-26 18:25:04 +00:00
ARDiDo
6b948c7106 mousebind: add support for more contexts and mouse events 2021-11-02 18:14:50 +00:00