19 Commits

Author SHA1 Message Date
Mitchell Hashimoto
a389987ada cli: config structure supports tagged unions
The syntax of tagged unions is `tag:value`. This matches the tagged
union parsing syntax for keybindings (i.e. `new_split:right`).

I'm adding this now on its own without a user-facing feature because
I can see some places we might use this and I want to separate this out.
There is already a PR open now that can utilize this (#2231).
2024-09-16 15:53:59 -07:00
Jon Parise
9de940cbbf cli: boolean value support for packed structs
Allow standalone boolean values like "true" and "false" to turn on or
off all of the struct's fields.
2024-07-09 09:08:27 -04:00
Qwerasd
d4a7549222 feat(font): Non-integer point sizes
Allows for high dpi displays to get odd numbered pixel sizes, for
example, 13.5pt @ 2px/pt for 27px font. This implementation performs
all the sizing calculations with f32, rounding to the nearest pixel
size when it comes to rendering. In the future this can be enhanced
by adding fractional scaling to support fractional pixel sizes.
2024-05-09 00:03:40 -04:00
Mitchell Hashimoto
0c888af470 cli: arg parsing supports more int types 2024-03-22 20:27:31 -07:00
Mitchell Hashimoto
b48d24a546 update zig 2024-03-13 09:14:12 -07:00
Mitchell Hashimoto
0f133ae4a7 config: re-expand relative paths correctly when reloading config
Fixes #1366

When we use `loadTheme`, we "replay" the configuration so that the theme
is the base configuration and everything else can override everything
the theme sets. During this process, we were not properly re-expanding
all the relative paths.

This fix works by changing our input tracking from solely tracking args
to tracking operations such as expansion as well. When we "replay" the
configuration we also replay operations such as path expansion with the
correct base path.

This also removes the `_inputs` special mechanism `cli/args.zig` had
because we can already do that ourselves using `parseManuallyHook`.
2024-01-23 21:59:34 -08:00
Mitchell Hashimoto
c9371500c9 empty cli or config args reset the value to the default
Fixes #1367

We previously special-cased optionals but we should do better and have
this reset ANY type to the defined default value on the struct.
2024-01-23 18:57:33 -08:00
Mitchell Hashimoto
9369baac60 cli: empty field resets optionals to null 2024-01-20 12:50:11 -08:00
Mitchell Hashimoto
b438998fb8 cli: support --help and -h for actions 2024-01-20 09:29:26 -08:00
Gregory Anders
5fe2d03e96 cli: strip CR in line iterator 2024-01-05 09:37:55 -06:00
Jeffrey C. Ollie
4ef8d099a7 Make the abnormal runtime threshold configurable. 2023-12-30 22:52:47 -06:00
Krzysztof Wolicki
0750698b62 Update to latest master,
update libxev dependency,
change mach_glfw to an updated fork until upstream updates
2023-11-30 21:41:33 +01:00
Mitchell Hashimoto
0dc5516ac6 config: add "theme" config, track inputs 2023-11-22 21:08:39 -08:00
Mitchell Hashimoto
8cd3b65d0a config: packed struct of bools supported as config field 2023-11-07 15:59:56 -08:00
Mitchell Hashimoto
4104f78cba cli: handle "-e" as the command to execute 2023-10-27 15:57:20 -07:00
Mitchell Hashimoto
2b28106837 update zig 2023-10-02 08:18:35 -07:00
Mitchell Hashimoto
08954feb59 cli: args can parse unions 2023-09-26 08:45:20 -07:00
Mitchell Hashimoto
8214471e2c cli/list-fonts: dumb implementation 2023-09-23 22:59:22 -07:00
Mitchell Hashimoto
9421bec3a1 cli: move cli_args.zig to cli 2023-09-23 22:46:16 -07:00