77 Commits

Author SHA1 Message Date
Mitchell Hashimoto
7dfad49e40 input: converting set entries to Entry from Action 2024-08-18 20:30:32 -07:00
Jeffrey C. Ollie
7de692c955 themes: don't use arena directly and cleanup debug code 2024-08-18 19:20:42 -07:00
Jeffrey C. Ollie
8c4cfc3bbb themes: finish refactor 2024-08-18 19:20:42 -07:00
Jeffrey C. Ollie
87791ed562 themes: add a switch that shows a small preview of each theme 2024-08-18 19:20:42 -07:00
Jeffrey C. Ollie
7a11b22c5f themes: allow loading from absolute paths and from user config dir 2024-08-18 19:20:42 -07:00
Mitchell Hashimoto
b65a804bb2 almost yeeted it all! 2024-08-16 14:42:32 -07:00
Mitchell Hashimoto
aee6857021 cli/list-keybinds: fix windows build 2024-08-06 15:03:38 -07:00
Mitchell Hashimoto
64c267a8c7 Merge pull request #2052 from rockorager/pretty-print
cli/list-keybinds: add pretty printing
2024-08-06 14:53:15 -07:00
Mitchell Hashimoto
d00ab8130a cli: note --plain 2024-08-06 14:53:00 -07:00
karei
85f19bcd12 cli/list-keybinds: align actions at the same column 2024-08-06 14:16:17 -05:00
Tim Culverhouse
8b834c1588 cli/list-keybinds: set default winsize for windows
When on windows, set some default terminal size. The actual size is not
very important to our use case here, but we do need one
2024-08-06 13:41:41 -05:00
Tim Culverhouse
e2a59ba77c cli/list-keybinds: set vaxis measurement state 2024-08-06 13:39:20 -05:00
Tim Culverhouse
b0ac75d5bc cli/list-keybinds: restore terminal after exit
Deinit the tty and vaxis to restore the terminal upon exiting the
command
2024-08-06 13:28:25 -05:00
Tim Culverhouse
1e91efbbe5 cli/list-keybinds: prevent ios, tvos, and watchos from pretty printing
These oses don't supply a tty layer, which prevents us from using the
libvaxis tty. Eventually we can add in using stdout as a writer. For
now, we just don't pretty print there.
2024-08-06 12:40:36 -05:00
Tim Culverhouse
59e226154c cli/list-keybinds: add pretty printing
Add pretty printing to the +list-keybinds command. This is done by
bringing in a dependency on libvaxis to handle the styling. Pretty
printing happens automatically when printing to a tty, and can be
disabled either by redirecting output or using the flag `--plain`
2024-08-06 12:19:39 -05:00
Łukasz Niemier
f9be02a20f chore: clean up typos 2024-08-05 13:56:57 +02:00
Mitchell Hashimoto
c5d03bbbd6 comment 2024-08-01 20:12:22 -07:00
Jeffrey C. Ollie
c5e9913def Add +list-actions CLI action to list keybind actions. 2024-08-01 18:57:37 -05:00
Mitchell Hashimoto
b3e1b2e02a some tweaks 2024-07-22 09:48:23 -07:00
Remi Gelinas
699fce0ee5 docs: add docstrings 2024-07-18 11:03:23 -04:00
Remi Gelinas
0197f6d15e fix: handle recursive config files 2024-07-17 17:27:31 -04:00
Remi Gelinas
a546da0417 feat: print every config error message 2024-07-17 17:03:09 -04:00
Remi Gelinas
368868f712 fix: handle relative paths in CLI 2024-07-17 16:51:16 -04:00
Remi Gelinas
3350e3c848 refactor: move config file loading into loadFile 2024-07-17 15:02:03 -04:00
Remi Gelinas
431c99313c feat(cli): add initial validate-config action 2024-07-17 12:27:12 -04: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
Gordon Cassie
c967a35abb Fix some basic build errors. 2024-06-24 15:16:24 -07: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
26c7215cf8 forgot commit to get #1363 building to new API 2024-01-26 09:04:32 -08:00
Mitchell Hashimoto
d50307c219 Merge pull request #1363 from jcollie/list-keybinds-docs
Add option to include docs when listing keybinds.
2024-01-26 09:02:49 -08: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
Jeffrey C. Ollie
d51b6d4799 Add option to include docs when listing keybinds. 2024-01-23 00:26:38 -06:00
Mitchell Hashimoto
3176ef86d9 cli: remove list-keybinds changes 2024-01-21 20:50:18 -08:00
Jeffrey C. Ollie
f41f70c977 Use keybind actions help strings in +list-keybinds. 2024-01-21 19:48:48 -06:00
Jeffrey C. Ollie
510f270c54 markdown-ify help strings 2024-01-21 15:07:37 -06:00
Mitchell Hashimoto
27453b64e6 cli/show-config: enable --help 2024-01-20 19:44:54 -08:00
Mitchell Hashimoto
ddd17eda06 cli: list-keybinds uses new config formatting API 2024-01-20 19:39:47 -08:00
Jeffrey C. Ollie
863c3933d3 use keybind struct's built-in capabity to format itself in +list-keybinds action 2024-01-20 19:38:12 -08:00
Mitchell Hashimoto
73a30ccd82 cli/show-config: add the changes-only and docs options 2024-01-20 19:37:48 -08:00
Jeffrey C. Ollie
de428d9fe9 add +show-config action to print out the config from the cli 2024-01-20 19:24:17 -08:00
Mitchell Hashimoto
9369baac60 cli: empty field resets optionals to null 2024-01-20 12:50:11 -08:00
Mitchell Hashimoto
1778905f53 cli: add help command 2024-01-20 09:49:17 -08:00
Mitchell Hashimoto
b438998fb8 cli: support --help and -h for actions 2024-01-20 09:29:26 -08:00
Mitchell Hashimoto
203b38fdac rewrite generate_help for personal style
- Output to stdin instead of a file
- Less nesting
- Utilize ranged for loops instead of while loops
- Eliminate unnecessary state tracking
- Put help in a struct
2024-01-20 09:05:25 -08:00
Jeffrey C. Ollie
f9ac37cdf7 Generate help strings from doc comments
Doc strings attached to fields of the Config struct and doc strings
attached to the run function of actions will be used to generate Zig
code that makes those doc strings available to be used at runtime.

Based on PR #853 by @Raiden1411
2024-01-19 21:19:09 -08:00
Mitchell Hashimoto
411c48af51 cli/list-colors: use unstable sort, sort in-place on arraylist 2024-01-11 07:56:25 -08:00
Jeffrey C. Ollie
5258554135 sort output from +list-colors 2024-01-11 00:30:48 -06:00