8343 Commits

Author SHA1 Message Date
Kovid Goyal
2f8c392571 Cleanup reading of argv from files 2025-04-28 09:52:26 +05:30
Kovid Goyal
5c9c8aa424 Add unit testing for launcher code 2025-04-28 09:25:25 +05:30
Kovid Goyal
a484d6928e Avoid multiple CLI parses just to check subcommands 2025-04-28 09:20:11 +05:30
Kovid Goyal
459d2d8649 DRYer 2025-04-28 09:20:11 +05:30
Kovid Goyal
b0ae88ada9 Wire up the codegen C cli parser 2025-04-28 09:20:11 +05:30
Kovid Goyal
3dc85838c8 ... 2025-04-28 09:20:11 +05:30
Kovid Goyal
280baa224d Preserve original argv optionally 2025-04-28 09:20:11 +05:30
Kovid Goyal
1413d8fb85 Fix handling of --help and --version 2025-04-28 09:20:11 +05:30
Kovid Goyal
9961bdf6b5 Fix set_err 2025-04-28 09:20:11 +05:30
Kovid Goyal
e3f7948ee4 Convenience functions to use in launcher code 2025-04-28 09:20:10 +05:30
Kovid Goyal
27c5b6aac5 Generate option parser in C for kitty CLI 2025-04-28 09:20:10 +05:30
Kovid Goyal
0a288ad56c Fix memleak in CLISpec 2025-04-28 09:20:10 +05:30
Kovid Goyal
7c10ed92f7 DRYer 2025-04-28 09:20:10 +05:30
Kovid Goyal
40f0f3d3eb Use a simple arena allocator for CLISpec 2025-04-28 09:20:10 +05:30
Kovid Goyal
d548a6fcf4 rename typing module to avoid conflicts with stdlib typing 2025-04-28 09:20:10 +05:30
Kovid Goyal
e42d410ee4 Move cli spec parsing code into simple module 2025-04-28 09:20:10 +05:30
Kovid Goyal
62699f6799 Get basic C cli parsing working 2025-04-28 09:20:10 +05:30
Kovid Goyal
527f30ffcc Start work on moving full command line parsing to native code 2025-04-28 09:20:10 +05:30
Kovid Goyal
01415eb84c macOS: Fix text color in visual window select ignoring the color theme
Fixes #8579
2025-04-27 19:49:51 +05:30
Kovid Goyal
056e7532f6 ... 2025-04-27 10:46:06 +05:30
Kovid Goyal
65d97e2379 Use os_log to report get_argv failures on Apple 2025-04-27 10:42:43 +05:30
Kovid Goyal
9ff9e50936 Also handle EINTR for fclose 2025-04-27 10:21:15 +05:30
Kovid Goyal
41899aab14 Dont prevent kitty fro starting on failure to read macos-launch-services-cmdline
Fixes #8581
2025-04-27 10:16:40 +05:30
Kovid Goyal
45f4b8ec26 ... 2025-04-26 09:43:47 +05:30
Kovid Goyal
9b433a598d Add to help text indicating bool options can be explicity specified 2025-04-26 09:21:22 +05:30
Kovid Goyal
3f00dc1c9e Work on improving CLI parsing
Can now set bool values explicitly with =
Handle multi short flag args like -abc
Add unit tests for CLI parsing
Generate go code to serialize CLI options as a cmdline

TODO: Implement setting of bool vals in C and Go parsing code
TODO: Help/rst output should somehow indicate this feature
2025-04-26 09:01:54 +05:30
Kovid Goyal
2093fb1310 Fix handling of empty quoted string in shlex 2025-04-26 08:55:32 +05:30
Kovid Goyal
31b74e1c63 Use a timeout for ignoring initial quack access service event 2025-04-25 20:36:58 +05:30
Kovid Goyal
189d78283c Get the quake terminal working on macOS 2025-04-25 20:27:26 +05:30
Kovid Goyal
4631348016 ... 2025-04-25 14:48:53 +05:30
Kovid Goyal
7bd7709685 Move parsing of macos-launch-services-cmdline into native code
Avoids expensive re-exec and simplifies various things. Much faster
for single instance usage.
2025-04-25 14:39:36 +05:30
Kovid Goyal
639ad3e8a6 Make shlex code re-useable in launcher 2025-04-25 09:35:42 +05:30
Kovid Goyal
9f11782920 DRYer 2025-04-25 07:43:19 +05:30
Kovid Goyal
1f9a5647d4 Handle kitty code being imported into a non kitty python interpreter
Used by sphinx doc generation.
2025-04-25 07:29:42 +05:30
Kovid Goyal
5b1dfadd0b ... 2025-04-25 07:18:13 +05:30
Kovid Goyal
4e7418f2f1 Have makedirs operate on abspaths
clean() wont work with paths that use .. to go to
levels above the root of the passed in path.
2025-04-24 21:51:46 +05:30
Kovid Goyal
05f0839add Work on moving launch services handling into C
This will make it faster and also more robust, not recuring hacks like
re-execs.
2025-04-24 21:07:29 +05:30
Kovid Goyal
76ac66fc8c Implement various filesystem utility functions in C so they can be used in the launcher 2025-04-24 20:37:51 +05:30
Kovid Goyal
f49dbfaa7e Abort fast cmdline if help requested 2025-04-24 10:26:47 +05:30
Kovid Goyal
9ad8dfaf3f Infrastructure for hiding OS Window on focus lost 2025-04-24 09:29:34 +05:30
Kovid Goyal
c893440208 Wayland: Get rid of visibility change debounce since previous commit made it unnecessary 2025-04-24 09:08:28 +05:30
Kovid Goyal
06716b8b85 Wayland make hide and quick show of panel more robust by keeping on re-rendering till compositor sends a configure event 2025-04-24 09:05:20 +05:30
Kovid Goyal
3f115abb19 ... 2025-04-24 08:30:40 +05:30
Kovid Goyal
2aab8734d4 reopen before forking so that if reopening fails we get a decent failure message 2025-04-24 08:28:33 +05:30
Kovid Goyal
14b633d13e ... 2025-04-24 08:27:44 +05:30
Kovid Goyal
9296bc3060 Speed up --detach
Also DRYer as well as more robust since single instance cleanup, binding
etc. happen in single process.
2025-04-24 08:13:58 +05:30
Kovid Goyal
55aa1d20f7 Fix double slash when concatenating SI path 2025-04-24 07:48:00 +05:30
Kovid Goyal
867ec83bed Fix use of single instance with detach 2025-04-24 07:17:55 +05:30
Kovid Goyal
559e8449c5 Allow redirecting to a log file in --detach mode 2025-04-24 06:46:46 +05:30
Kovid Goyal
7a31dad770 Make mypy happy 2025-04-24 05:08:07 +05:30