Commit graph

1690 commits

Author SHA1 Message Date
Johan Malm
17c6af8925 labwc-theme(5): describe color alpha value
...which has been supported for a long time but not been reflected in the
man page.  Colors can be parsed as `#rrggbb aaa` with aaa representing a
decimal alpha value. This could be used to hide a button, for example:

    window.active.button.menu.unpressed.image.color: #000000 0
    window.inactive.button.menu.unpressed.image.color: #000000 0
2023-08-05 04:13:25 +02:00
Consolatis
1ee8715d57 actions: use enum for _ToEdge actions
This also improves the config robustness as invalid edge names will now
prevent the action to be created in the first place and the user gets
notified about the issue.
2023-08-02 17:57:04 +01:00
Ph42oN
cb4afadd01 view: move MoveRelative code from action.c and restore natural geometry 2023-07-24 00:55:08 +02:00
Johan Malm
c6e2f667d3 keyboard: fallback on raw keysyms for bindings
When looking up keybinds, if the translated keysyms (based on the keymap
for the keyboard) do not match a defined keybind, try raw keysyms (as if
there were no modifier translation).

This allows a user to define for example keybind with "S-1" rather than
"S-exclam". It also supports "W-S-Tab".

Fixes: issues #163 #365 #992
2023-07-18 19:29:21 +01:00
Johan Malm
8686023b0f keyboard: combine nsyms and *syms in struct
...in preparation for handling raw keysyms

No functional change intended.
2023-07-18 19:29:21 +01:00
Johan Malm
aef5b45b5f theme: limit corner radius to the height of the titlebar 2023-07-17 20:12:14 +01:00
Johan Malm
318d881650 theme: fix rounded-corner bug
Make top left/right corner pieces with large border thickness pixel
perfect.

Fixes: issue #988
2023-07-17 20:12:14 +01:00
John Lindgren
b816c16701 Chase wlroots: Stop using wlr_xwayland_surface event data
Chases: 27edd024f83892f4af9c5084d47b73f26966aaf1
xwayland: pass NULL as event data
2023-07-17 08:35:46 -04:00
John Lindgren
216056a653 Chase wlroots: Add missing #include
Chases: 323f0b94db22877487bca073fca497cd033719e8
wlr_scene: Cleanup header includes
2023-07-17 08:35:46 -04:00
John Lindgren
423b569fdd xwayland: Fix segfault at exit (seen with wlroots master) 2023-07-17 10:22:28 +02:00
stefonarch
0eab7e082c Added missing closing tags 2023-07-16 11:26:23 +01:00
Johan Malm
6b83db34af build: bump version to 0.6.4 2023-07-14 20:44:38 +01:00
Johan Malm
c073c0e637 NEWS.md: add notes on 0.6.4 2023-07-14 20:41:42 +01:00
Johan Malm
598044aa6b dnd: fix focus at end of dnd operation
By default, leave keyboard-focus with the surface that originally had it
at the end of a dnd operation.  This is consistent with the default
behaviour of openbox and mutter.

If the 'focus/followMouse' option is enabled, then focus on the surface
under the cursor at the end of the dnd operation.

Fixes: issue #976
2023-07-10 17:17:59 +01:00
Consolatis
40aba9e542 Add support for ext_idle_notify_v1..
..and combine both idle variants into a standalone manager
2023-07-09 08:26:33 +01:00
Johan Malm
e06a8cfc7a find-banned: support reading multiple files from stdin 2023-07-06 18:04:55 +01:00
Johan Malm
684731200f find-banned: print filename with each unwanted token 2023-07-06 18:04:55 +01:00
Consolatis
309843c9c6 scripts/helper/find-idents.c: handle single line comment tokens 2023-07-06 18:04:55 +01:00
Johan Malm
29031a4c85 Add scripts/find-banned.sh 2023-07-06 18:04:55 +01:00
Consolatis
235a8ad9bc ToggleKeybinds per window 2023-07-06 06:02:28 +01:00
Johan Malm
b6dfffc782 osd: move get_osd_height() closer to where it is called from 2023-07-05 21:31:30 +01:00
Johan Malm
2c66fa279f osd: make item-border part of item-height 2023-07-05 21:31:30 +01:00
Consolatis
660127acb0 theme: add option osd.window-switcher.item.active.border.width
...and change default values for the variables below to keep the
window-switcher look the same as it was at the last release.

osd.window-switcher.padding = 4
osd.window-switcher.item.padding.y = 1
osd.window-switcher.item.active.border.width = 2
2023-07-05 21:31:30 +01:00
Johan Malm
55bf79c3fe theme: add option osd.window-switcher.padding
Fixes: issue #969
2023-07-05 21:31:30 +01:00
Consolatis
fe8cdd7f8b src/action.c: relax argument checks when running actions 2023-07-05 22:20:18 +02:00
Consolatis
65b441a0ba config: validate keybind, mousebind and menu actions 2023-07-05 22:20:18 +02:00
Consolatis
665d31c1c7 src/action.c: add action_is_valid() 2023-07-05 22:20:18 +02:00
Consolatis
b05b92bb27 src/action.c: enforce action arg->key being set 2023-07-05 22:20:18 +02:00
Johan Malm
d0b52139ed action.c: remove duplicate code 2023-07-04 06:01:47 +01:00
Johan Malm
49dfba1507 menu: support CDATA for <command> element
...in order to support obmenu-generator output such as this:

  <menu id="root-menu" label="Applications">
    <item label="File Manager"><action name="Execute"><command><![CDATA[xdg-open .]]></command></action></item>
    <item label="Terminal"><action name="Execute"><command><![CDATA[xterm]]></command></action></item>
    <item label="Web Browser"><action name="Execute"><command><![CDATA[xdg-open http://]]></command></action></item>
    <item label="Run command"><action name="Execute"><command><![CDATA[gmrun]]></command></action></item>
  </menu>

References:
- https://github.com/trizen/obmenu-generator
- https://aur.archlinux.org/packages/obmenu-generator
- https://trizenx.blogspot.com/2012/02/obmenu-generator.html

Fixes: issue #972
2023-07-04 06:01:47 +01:00
Johan Malm
2bbeea0fc2 checkpatch.pl: allow xmlFree in CamelCase format
...to avoid 'Avoid CamelCase' warning.
2023-07-04 06:01:47 +01:00
Johan Malm
0958e88c75 checkpatch.pl: remove 'spaces preferred around that...' warning
...because it gives a false positive for "xmlChar *foo" saying it should
be "xmlChar * foo".
2023-07-04 06:01:47 +01:00
Johan Malm
4a31972b6f menu: print menu.xml nodenames
...when LABWC_DEBUG_MENU_NODENAMES is set
2023-07-04 06:01:47 +01:00
Ph42oN
c0c40e1432 action: disable MoveRelative for fullscreen and unmaximize 2023-07-03 16:42:43 +01:00
Ph42oN
934bf1c5b3 view: resize_relative disable for fullscreen and maximized and set untiled 2023-07-03 16:42:43 +01:00
John Lindgren
370cdc80e0 view: add client_request flag to view->impl->unmap()
This makes explicit the subtle behavioral difference between
xwayland_view_unmap() and handle_unmap().

With this change, the XDG and XWayland versions of handle_map/unmap()
are now identical, which will make further refactoring possible.
2023-07-01 23:07:39 +02:00
Johan Malm
b200dd2e7b osd: use theme->osd_border_width for focused item 2023-06-29 19:14:08 +01:00
Johan Malm
df53c28a0f theme: add window-switcher width/padding
...and calculate item-height based on font-height

Add theme options
  - osd.window-switcher.width
  - osd.window-switcher.item.padding.x
  - osd.window-switcher.item.padding.y

Issue #879
2023-06-29 19:14:08 +01:00
Johan Malm
11ff820105 osd: use theme->osd_border_width consistently 2023-06-29 19:14:08 +01:00
stefonarch
04ccedbc7e Some formatting 2023-06-27 21:11:20 +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
Julius Yli-Suomu
c17bf68176 add MoveRelative 2023-06-26 19:37:58 +01:00
Johan Malm
f325335e16 session.c: unconstify build_path() return value 2023-06-26 06:30:33 +01:00
Johan Malm
f4f35a9dff common/string-helpers.c: add strdup_printf() 2023-06-26 06:30:33 +01: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
f6c3a3d7c3 action: add MoveTo 2023-06-26 06:04:07 +01:00
Johan Malm
3a6a04215c action: support arguments of int type 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
Johan Malm
3a9dcd54a7 Move border-struct to common/border.h for sharing 2023-06-26 06:04:07 +01:00