John Lindgren
216056a653
Chase wlroots: Add missing #include
...
Chases: 323f0b94db22877487bca073fca497cd033719e8
wlr_scene: Cleanup header includes
2023-07-17 08:35:46 -04:00
Johan Malm
b200dd2e7b
osd: use theme->osd_border_width for focused item
2023-06-29 19:14:08 +01:00
Johan Malm
f4f35a9dff
common/string-helpers.c: add strdup_printf()
2023-06-26 06:30:33 +01:00
Johan Malm
bdd3849138
match.c: fix g_utf8_casefold() memory leak
...
Reported-by: @jlindgren90
2023-05-06 12:08:31 +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
Johan Malm
71f5ac8323
Add common/match.c with match_glob() from theme.c
...
...and make it fully case-insensitive in preparation for window-rules.
2023-05-04 22:09:55 +01:00
Johan Malm
ac1899ada5
parse-bool.c: add helpers to set bool/int iff valid boolean
2023-04-28 20:48:39 +01:00
Johan Malm
fa50149525
common/parse-bool.c: make parse_bool() generic
...
...to avoid multiple versions of a boolean-parser.
- Optionally take a default value
- Return -1 on error
- Rename get-bool.c to parse-bool.c
2023-04-26 15:11:31 +01:00
Johan Malm
bdf6e13881
Move get_bool() to src/common/
...
...in preparation for sharing it more widely
2023-03-26 19:52:50 +02:00
Consolatis
82e9e866ec
Enable more compiler warnings
2023-02-01 10:42:22 +01:00
Consolatis
1995a33df9
CodeStyle: prevent space in code indents
2023-01-31 21:22:40 +00:00
Consolatis
d00327bc32
menu: Dynamically adjust menu width based on widest item
...
Adds two new theme vars:
- menu.width.min (menu will never be smaller than this)
- menu.width.max (menu will never be wider than this + padding)
A fixed menu width can be achieved by setting
menu.width.min == menu.width.max.
2022-12-06 21:08:43 +00:00
Johan Malm
e45e2c7e60
Fix coding style
2022-11-03 23:01:52 +01:00
Johan Malm
d424514e24
Fix minor coding-style violations
...
...based on https://github.com/johanmalm/checkpatch.pl
2022-09-22 22:39:44 +01:00
John Lindgren
a54d378e6c
common: Add znew/znew_n() macros
2022-09-18 15:25:19 -04:00
John Lindgren
cb40cdc36c
common: Add additional memory utilities (xzalloc() etc.)
2022-09-17 10:57:30 -04:00
John Lindgren
07a83c19f0
config: Add support for font slant and weight
2022-09-15 21:48:05 +01:00
Consolatis
15a5b710db
alt-tab preview: restore functionality after move to scene-graph
2022-08-28 20:40:36 +02:00
Consolatis
127a9c7be4
src/{common/font,theme}.c: Switch to cairo helpers
2022-08-26 06:54:12 +01:00
Consolatis
fb36463c34
common/graphic-helpers: Add cairo helpers
2022-08-20 22:16:52 +01:00
Consolatis
8c8583ef94
common/graphic-helpers: Add multi_rect
2022-08-20 22:16:52 +01:00
Johan Malm
a610aff946
scaled_font_buffer.c: simplify calls to zfree()
...
There is no need to check foo != NULL before zfree(foo)
2022-08-12 11:16:17 +02:00
Johan Malm
429df42a8f
menu: render submenu arrows
2022-08-12 11:16:17 +02:00
Johan Malm
6a750d465e
font: remove unused font_buffer_update()
2022-08-12 11:16:17 +02:00
Joshua Ashton
722aa042b7
main: Increase FD limit
...
This defaults to 1024, which is tiny, but is a requirement
for processes using the deprecated `select` function.
We must reset this back whenever we fork to start a new process,
as this is inherited, and breaks applications using `select` otherwise.
Signed-off-by: Joshua Ashton <joshua@froggi.es>
2022-07-17 00:59:23 +00:00
Joshua Ashton
6c2bbb42ea
common: Add helpers for raising/lowering FD limit
...
Signed-off-by: Joshua Ashton <joshua@froggi.es>
2022-07-17 00:59:23 +00:00
Johan Malm
fd7ec0ab95
buf.c: fix bug in environment variable expansion
...
Allow underscore in environment variable names.
Closes issue #439
Helped-by: @Consolatis
...who both found the bug and told us how to fix it :)
2022-07-15 21:51:28 +02:00
Consolatis
d309df6f87
src/common/font.c: Add font_width()
2022-06-15 16:14:02 +01:00
Consolatis
5d79911244
Add scaled_font_buffer implementation
2022-06-14 22:03:08 +01:00
Consolatis
c3f07aacf0
Add abstract scaled_scene_buffer implementation
2022-06-14 22:03:08 +01:00
Consolatis
f3a685155d
common/font: Add scale argument
2022-06-14 22:03:08 +01:00
Consolatis
efd9155513
Chase wlroots: children are now only availabe in tree nodes
...
Chases wlroots 71f8a48d380701de1e3331d53d470bd76f5f643b
wlr_scene: Move children list from wlr_scene_node to wlr_scene_tree
2022-06-07 07:13:37 +01:00
Consolatis
bda48da68d
Deal with font_buffer_create() failures
2022-05-26 22:19:56 +01:00
Consolatis
163179dda1
Chase wlroots: wlr_scene_surface
...
To update the wlroots subproject use
meson subprojects update wlroots
2022-05-26 06:48:00 +01:00
Johan Malm
b94f3b1af0
src/common/dirs.c: add missing slash
...
Change "opt/share/themes" to "/opt/share/themes"
2022-04-26 21:50:24 +01:00
Johan Malm
5b34c81768
Fix trivial coding style breaches
2022-04-04 20:53:36 +01:00
Consolatis
5862b65f89
Convert SSD to scene nodes
2022-02-23 21:47:01 +00:00
Consolatis
044388a5cd
Prepare to move from wlr_texture to lab_data_buffer
2022-02-23 21:47:01 +00:00
Consolatis
d9cef42721
CodeStyle
2022-01-09 06:37:39 +00:00
Johan Malm
e227de1346
Add SPDX identifiers
2021-11-13 21:56:53 +00:00
Johan Malm
2d4ca16db8
buf.c: handle variables with curly braces
...
In buf_expand_shell_variables(), corrently resolve ${foo}
rather than just $foo
2021-10-11 22:31:38 +01:00
Johan Malm
aa4668c792
buf.c: correctly handle unset environment variables
2021-10-11 22:28:17 +01:00
Johan Malm
b967592289
Fix coding style
2021-09-24 22:14:04 +01:00
Johan Malm
ebb632419b
*.c: add SPDX-License-Identifier
2021-09-24 21:45:48 +01:00
Johan Malm
a668f6f73d
font: font_texture_create() support font size argument
2021-08-20 20:20:49 +01:00
Johan Malm
5ecf0e1e7e
Make font_texture_create() more generic
...
Move font_texture_create() to font.c so it can be used for purposes other
than rendering the menu, for example server side decoration.
Refactor menu.c and menu.h to use this more generic font_texture_create()
2021-08-07 08:35:46 +01:00
Johan Malm
82e47ac1f5
Remove src/common/log.c
...
Use wlr_log() instead
2021-07-23 21:15:55 +01:00
Johan Malm
20fd8f59a7
Remove info() and die()
2021-07-22 21:30:17 +01:00
Johan Malm
afe666fd6e
action: expand shell variables before execvp()
...
Expanding shell variables, including tilde, enables the following type
of keybind:
<keyboard>
<keybind key="XF86AudioMute">
<action name="Execute">
<command>bash ~/mute-script.sh</command>
</action>
</keybind>
</keyboard>
Fixes issue #32
2021-06-30 19:56:31 +01:00
Johan Malm
9f61a819fc
Add zfree
2021-02-21 21:59:53 +00:00