Commit graph

36 commits

Author SHA1 Message Date
Kovid Goyal
341df0dccb
More CodeQL fixes 2025-04-20 22:13:45 +05:30
Kovid Goyal
237bb35ee9
More CodeQL fixes 2025-04-20 21:53:11 +05:30
Kovid Goyal
1eeea70c7a
Allow dynamically generating configuration by running an arbitrary program using the new geninclude directive 2025-01-06 19:00:01 +05:30
Kovid Goyal
795bf7fb52
Dont use a global var for mocking 2025-01-05 20:58:33 +05:30
Kovid Goyal
86a6685446
Add mock for failing test 2025-01-05 20:36:32 +05:30
Kovid Goyal
2d02ff1c5f
Implement using effective kitty config options for kittens
Also centralise reading of kitty options
2025-01-05 20:16:43 +05:30
Kovid Goyal
8b7cd98a0e
When running a kitten that modifies the kitty config file if no config file exists create a commented out default config file and then modify it
Fixes #7991
2024-10-28 14:01:42 +05:30
Kovid Goyal
e74188fcf0
Switch to using ps to get all processes
The Go process module is very slow to get Exe() on non-Linux systems
without CGO as it works by calling lsof on the pid. So we anyway have to
filter by command line first. So might as well just use ps in that case.
2024-08-19 20:54:54 +05:30
Kovid Goyal
9708959438
When reloading in all kitty instances, only use readlink on processes that contain "kitty" in the image name
Apparently there are some machines where a few hundred/thousand readlink calls
take 30 seconds! See #7744
2024-08-19 19:18:37 +05:30
Kovid Goyal
c906314974
change the atomic write functions to work with readers 2024-07-22 15:01:19 +05:30
Kovid Goyal
da9a36d918
Fix reload of kitty config not working if kitty launched via symlink not named kitty 2024-07-04 19:07:15 +05:30
Kovid Goyal
f15eebec02
Refactor config patching code to make it re-useable 2024-06-24 07:54:17 +05:30
Kovid Goyal
405f5ce148
Use stdlib maps/slices 2024-06-24 07:54:13 +05:30
Kovid Goyal
2b751f56bd
Port test 2023-11-22 10:50:05 +05:30
Kovid Goyal
882d471c90
Make config line parsing in Go use same algorithm as in python 2023-11-22 10:01:45 +05:30
Kovid Goyal
fc64ef41b3
when parsing conf files in go accept both space and tab as key separators 2023-11-22 09:49:33 +05:30
Kovid Goyal
1a32e62ebf
More linter fixes 2023-09-18 21:07:39 +05:30
Kovid Goyal
4ffb22199b
Cleanup previous PR 2023-09-03 18:59:37 +05:30
Jake Stewart
8754d80832 add tests for go config parser 2023-09-03 16:39:27 +08:00
Jake Stewart
0aa4c850ba add line break syntax to go config parser 2023-09-03 16:39:13 +08:00
Kovid Goyal
4f72bb9894
Replace utils.Once with stdlib sync.OnceValue 2023-08-09 12:08:42 +05:30
Kovid Goyal
49ea26968c
Bump go version to 1.21
Allows us to use the much faster builtin min/max functions
for two variable min/max
2023-08-09 11:58:16 +05:30
Kovid Goyal
e59e42a6c2
simplify API of utils.Once 2023-05-26 22:42:07 +05:30
Kovid Goyal
7803b07e7f
Ignore leading and trailing space around values when parsing config lines 2023-04-06 10:45:34 +05:30
Kovid Goyal
912aa17594
... 2023-04-05 08:08:54 +05:30
Kovid Goyal
708267d229
Fix parsing of actions in map directives in Go 2023-04-05 07:55:18 +05:30
Kovid Goyal
3ee77a3a57
Fix #6154 2023-04-04 21:18:27 +05:30
Kovid Goyal
14b58ba015
Fix overrides not being parsed correctly 2023-03-27 07:53:56 +05:30
Kovid Goyal
425ab4f6d8
Start implementing shortcut handling 2023-03-27 07:53:55 +05:30
Kovid Goyal
d208670172
Abstract typical config file loading with path and cli overrides 2023-03-27 07:53:54 +05:30
Kovid Goyal
5329546f21
Implement parsing of map 2023-03-27 07:53:54 +05:30
Kovid Goyal
da38cb3254
Add support for more option types to Go conf file parsing 2023-03-15 15:17:38 +05:30
Kovid Goyal
f42090766a
Use the new string scanner everywhere 2023-03-08 13:31:27 +05:30
Kovid Goyal
7ce64fcde0
Support include when loading themes from dirs 2023-02-26 21:16:29 +05:30
Kovid Goyal
07f4adbab5
Also add tests for bad lines 2023-02-26 08:01:02 +05:30
Kovid Goyal
7b4738125b
Move config code into its own package 2023-02-26 08:01:02 +05:30