Commit graph

96 commits

Author SHA1 Message Date
Johan Malm
9c1c96f993 Add ResizeTo action
Fixes: #1261
2023-12-01 21:23:42 +00:00
Brandon Nason
bad8f334ea Add omnipresent flag for views 2023-11-28 21:41:30 +00:00
Johan Malm
29a228674b Add unfocus action
...to enable unfocusing currently focused window on desktop click.

Works with:

    <mouse>
      <default />
      <context name="Root">
        <mousebind button="Left" action="Press">
          <action name="Unfocus" />
        </mousebind>
      </context>
    </mouse>

Fixes: #1230
2023-11-07 21:16:33 +00:00
John Lindgren
0430f6f818 view: implement separate horizontal/vertical maximize
This is a useful (if lesser-known) feature of at least a few popular X11
window managers, for example Openbox and XFWM4. Typically right-click on
the maximize button toggles horizontal maximize, while middle-click
toggles vertical maximize.

Support in labwc uses the same configuration syntax as Openbox, where the
Maximize/ToggleMaximize actions have an optional "direction" argument:
horizontal, vertical, or both (default). The default mouse bindings match
the XFWM4 defaults (not sure what Openbox has by default).

Most of the external protocols still assume "maximized" is a Boolean,
which is no longer true internally. For the sake of the outside world,
a view is only "maximized" if maximized in both directions.

Internally, I've taken the following approach:

- SSD code decorates the view as "maximized" (i.e. hiding borders) only
  if maximized in both directions.

- Layout code (interactive move/resize, tiling, etc.) generally treats
  the view as "maximized" (with the restrictions that entails) if
  maximized in either direction. For example, moving a vertically-
  maximized view first restores the natural geometry (this differs from
  Openbox, which instead allows the view to move only horizontally.)

v2: use enum view_axis for view->maximized
v3:
  - update docs
  - allow resizing if partly maximized
  - add TODOs & corrections noted by Consolatis
2023-10-28 22:46:49 +02:00
Axel Burri
ced4ae46ec doc: Add GrowToEdge, ShrinkToEdge actions 2023-10-19 19:09:42 +01:00
Axel Burri
81af658c1f doc: Adapt MoveToEdge action 2023-10-19 19:09:42 +01:00
Arnaudv6
8920e546db Add MoveToCursor action 2023-10-15 20:36:37 +01:00
Consus
e864419194 workspaces: allow referencing the current workspace
This value allows a user to reference the currently visible workspace.
2023-10-01 14:17:29 +01:00
Consus
22e3be40e5 action: add If and ForEach actions
Add If and ForEach actions as described in OpenBox specification.

Limitations:

- If and ForEach cannot contain nested If and ForEach.
2023-10-01 14:17:29 +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
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
stefonarch
0eab7e082c Added missing closing tags 2023-07-16 11:26:23 +01:00
Consolatis
235a8ad9bc ToggleKeybinds per window 2023-07-06 06:02:28 +01:00
Ph42oN
ea623daaee action: add ResizeRelative 2023-06-27 20:59:33 +02:00
Ph42oN
e40159470b add MoveRelative to man page and use view->pending 2023-06-27 20:59:33 +02:00
Johan Malm
f6c3a3d7c3 action: add MoveTo 2023-06-26 06:04:07 +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
15cd093f2e action: add ToggleAlwaysOnBottom 2023-05-22 20:37:49 +01:00
Tomi Ollila
f2c3f83041 action: support {Go,Send}ToDesktop 'wrap' option
Make wrap 'true' by default for both GoToDesktop and SendToDesktop,
in order to default to the current behaviour, and to stay consistent
with Openbox behaviour.
2023-05-21 22:32:07 +02:00
Johan Malm
d0aafb684f action: add Maximize 2023-05-04 22:09:55 +01:00
Juliusz Chroboczek
753aef9d78 Implement action "Lower" 2023-03-27 20:27:00 +01:00
Johan Malm
33b98b19aa action: support SendToDesktop 'follow' option
Make follow 'true' by default as per Openbox 3.6 specification.
Note: this is an interface change.

Fixes: issue #841
2023-03-26 19:52:50 +02:00
Consolatis
a0b5a80ce1 Add FocusOutput action
Fixes #806

Suggested-by: @EysseW
Tested-by: @EysseW
2023-03-06 21:58:11 +00:00
Consolatis
c33a404dc1 Add ToggleKeybinds action
This can be used to better control Virtual Machines, VNC clients, nested
compositors or similar. All keybinds other than ToggleKeybinds itself are
disabled when first called, a 2nd call will restore handling of all keybinds.

Fixes #738
Fixes #810
2023-03-04 13:24:59 +00:00
Flrian
df7c47b8d7 labwc-actions(5): update action format 2023-02-19 12:51:50 +01:00
Consolatis
111f48b485 SnapToRegion: Add documentation 2023-01-11 18:52:24 +01:00
bi4k8
7ad5490ff0 document Kill command 2022-12-08 19:33:09 +00:00
John Lindgren
b89f7bfc0d action: Allow explicit None action without warning 2022-09-16 22:06:29 +01:00
Consus
ca56357b5f workspaces: Allow switching/sending to the last used workspace
Actions GoToDesktop and SendToDesktop now support the new direction
called "last" that corresponds to the last used workspace (see Openbox
help[1] for reference).

[1]: http://openbox.org/wiki/Help:Actions#GoToDesktop
2022-06-18 18:34:58 +02:00
Consolatis
c93d625938 workspaces: Add workspace actions 2022-06-15 22:26:21 +02:00
Johan Malm
c8dd19caa3 man pages: minor language and style changes 2022-05-31 22:01:26 +01:00
Johan Malm
e2632e8587 labwc-action(5): remove incorrect <command>
<action name="Close"> does not support a <command> option
2022-05-06 21:57:13 +01:00
Johan Malm
5944813566 menu: support <action name="Execute"> option <execute>
<exectue> is a deprecated name for <command>.
See: http://openbox.org/wiki/Help:Actions#Action_syntax

But some openbox3 menu generators still use it, for example
https://wiki.archlinux.org/title/xdg-menu - so let's support it for
backward compatibility.
2022-05-06 21:55:46 +01:00
Consolatis
6b4d9b9383 Add ToggleAlwaysOnTop action 2022-04-09 17:18:39 +01:00
Consolatis
759b26b5c1 Add window menu 2022-01-26 06:17:41 +00:00
bi4k8
fd7f06a375 document Focus and Raise actions 2021-12-12 19:07:08 -05:00
bi4k8
114e6545d6 document Resize action 2021-12-12 19:05:01 -05:00
Johan Malm
9b99ff9042 labwc-action(5): add PreviousWindow 2021-12-06 21:13:21 +00:00
Johan Malm
12137ba446 labwc-action(5): add "Move" action 2021-11-26 18:30:11 +00:00
Johan Malm
40bd8f56d4 labwc-actions(5): add SnapToEdge "center" argument 2021-10-18 19:47:32 +01:00
Johan Malm
98b682379f labwc-actions(5): add SnapToEdge 2021-10-17 21:27:25 +01:00
Johan Malm
74e1d6e45c labwc-actions(5): add ToggleFullscreen, ToggleDecorations, Iconfiy 2021-09-20 22:01:47 +01:00
Johan Malm
93c9ec6683 Update man pages 2021-07-20 20:06:48 +01:00
Johan Malm
c668fd9b07 action: add "ToggleMaximize" 2021-07-13 21:54:22 +01:00
Johan Malm
eaed1a3cab action: add "Close" to close top-most view 2021-07-12 21:47:27 +01:00
Johan Malm
5a36fef547 Convert man pages from md to scd 2021-03-05 22:14:02 +00:00