Kovid Goyal
4c9efb6ff2
Fix bold/dim handling when wrapping
2023-03-27 07:53:56 +05:30
Kovid Goyal
4bc9cf84a3
Micro-optimization
2023-03-27 07:53:56 +05:30
Kovid Goyal
88bd3ee9ca
New SGR codes to turn off bold/dim independently
...
Allows for robust patching of formatting into already formatted
text. Without this it is not possible to turn off bold without
affecting existing dim and vice versa.
2023-03-27 07:53:55 +05:30
Kovid Goyal
c2e549b79c
Implement syntax highlighting
2023-03-27 07:53:55 +05:30
Kovid Goyal
924cd4cadd
Do not add a trailing newline when wrapping
2023-03-27 07:53:55 +05:30
Kovid Goyal
e42b4fd9a6
Decrease allocs when wrapping
2023-03-27 07:53:54 +05:30
Kovid Goyal
18b58c5cf9
Ensure wrapping never results in lines longer than the specified word
2023-03-27 07:53:54 +05:30
Kovid Goyal
648925e83a
More work on porting diff kitten
2023-03-27 07:53:54 +05:30
Kovid Goyal
1c7d1094d4
More work on porting diff kitten
2023-03-27 07:53:54 +05:30
Kovid Goyal
5d8b5ab720
More work on porting diff kitten
2023-03-27 07:53:54 +05:30
Kovid Goyal
e4d936b5ed
More work on porting the diff kitten
2023-03-27 07:53:54 +05:30
Kovid Goyal
293c0ab845
More work on porting the diff kitten
2023-03-27 07:53:54 +05:30
Kovid Goyal
bf1f0c00f4
Port full MIME type guessing to Go
2023-03-27 07:53:54 +05:30
Kovid Goyal
3c550bcd28
More work on porting diff kitten
2023-03-27 07:53:54 +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
e2fda5d1c4
...
2023-03-15 15:32:04 +05:30
Kovid Goyal
3803d7e3c2
Use maps package for generic keys/values functions
2023-03-14 22:49:40 +05:30
Kovid Goyal
7ce83e7fd0
Use the generic contains/index from slices instead of our custom one
2023-03-14 22:40:20 +05:30
Kovid Goyal
0c20a4d980
Fix sort with key implementations
2023-03-14 12:54:35 +05:30
Kovid Goyal
c4731771ac
Make style cache thread safe
2023-03-14 12:29:44 +05:30
Kovid Goyal
29dd2438c9
Port the subseq matcher to Go
2023-03-14 12:29:44 +05:30
Kovid Goyal
b088ab91cf
Make code to convert rune offsets to byte offsets re-useable
2023-03-14 12:29:44 +05:30
Kovid Goyal
74c5692b78
Default permission for atomicupdate should be 0644
2023-03-11 10:04:43 +05:30
Kovid Goyal
b76b0c61ed
Port custom processor for hints
2023-03-10 10:45:37 +05:30
Kovid Goyal
0e5ed29d83
Fix generation of url regex for Go
2023-03-09 19:00:56 +05:30
Kovid Goyal
09ceb3c0be
Start work on porting hints kitten to Go
2023-03-09 19:00:56 +05:30
Kovid Goyal
f42090766a
Use the new string scanner everywhere
2023-03-08 13:31:27 +05:30
Kovid Goyal
b8ce441453
A new string scanner thats faster than bufio.Scanner and has zero-allocation
2023-03-08 13:24:20 +05:30
Kovid Goyal
5c87d7f84f
Cleanup ring buffer implementation
2023-03-07 07:43:53 +05:30
Kovid Goyal
716a048e6c
...
2023-03-05 14:02:19 +05:30
Kovid Goyal
a0d30f4dd8
DRYer
2023-03-05 13:41:36 +05:30
Kovid Goyal
c88a171b28
Map should use same order of arguments as pythons map
2023-03-05 12:19:03 +05:30
Kovid Goyal
a2887bb9e0
get rid of utils.Cut since we can now rely on strings.Cut instead
2023-03-04 13:37:55 +05:30
Kovid Goyal
5b160ea599
Use Once for CachedHostname
2023-03-03 15:20:35 +05:30
Kovid Goyal
1bf911a81b
Generate the rowcol diacrticis for Go as well
2023-03-03 14:39:38 +05:30
Kovid Goyal
5b46d990a2
Add Read/Write to the MMap interface
2023-02-28 19:01:15 +05:30
Kovid Goyal
944e036611
DRYer
2023-02-28 15:48:04 +05:30
Kovid Goyal
1b2fe90ed1
Fix askpass.go on shm_syscall based systems
2023-02-28 14:11:27 +05:30
Kovid Goyal
ba1ce996bb
Fix WriteWithSize() on shm_syscall
2023-02-28 13:50:06 +05:30
Kovid Goyal
ce12fd3515
Fix ReadWithSizeAndUnlink on systems that have syscall based mmap
2023-02-28 13:44:09 +05:30
Kovid Goyal
3558d1c274
Finish porting support for color schemes to SSH kitten
2023-02-28 12:08:55 +05:30
Kovid Goyal
c877b2a5cb
Code to dump basic colors from a theme as escape codes
2023-02-27 08:02:22 +05:30
Kovid Goyal
0b09d18b36
Port theme loading code to Go
2023-02-26 20:40:59 +05:30
Kovid Goyal
c113ad6f56
Code to parse ISO8601 timestamps at least semi-robustly
2023-02-26 13:32:35 +05:30
Kovid Goyal
9870c94007
More work on porting the SSH kitten
2023-02-26 08:01:03 +05:30
Kovid Goyal
6b71b58997
Add write API to shm objects
2023-02-26 08:01:03 +05:30
Kovid Goyal
43bcb41a2a
Nicer Set constructor
2023-02-26 08:01:03 +05:30
Kovid Goyal
1df3ef648c
Clean up getting runtime dir on darwin
2023-02-26 08:01:03 +05:30
Kovid Goyal
4d8ccd8e94
...
2023-02-26 08:01:03 +05:30
Kovid Goyal
f40380b05a
More useful Set methods
2023-02-26 08:01:03 +05:30
Kovid Goyal
3703b4dbef
API to conveniently generate secure tokens
2023-02-26 08:01:03 +05:30
Kovid Goyal
0614c63966
Handle XDG_CONFIG_DIRS in Go as well
2023-02-26 08:01:03 +05:30
Kovid Goyal
a84b688038
Embed the data files needed for the ssh kitten into the Go binary
2023-02-26 08:01:03 +05:30
Kovid Goyal
b4b8943e64
Replace some more uses of sync.Once
2023-02-26 08:01:03 +05:30
Kovid Goyal
587d06b295
Replace use of sync.Once
2023-02-26 08:01:03 +05:30
Kovid Goyal
d656017f27
Move SSH askpass implementation into kitten
2023-02-26 08:01:02 +05:30
Kovid Goyal
6f4d89045a
A nicer implementation of sync.Once
...
Doesnt require storing the result of the function in a dedicated global
variable with a dedicated getter function
2023-02-26 08:01:02 +05:30
Kovid Goyal
fbaaca1be9
Function to create symlinks atomically
2023-02-26 08:01:02 +05:30
Kovid Goyal
88077fdbcd
Allow Stat() for MMap objects
2023-02-26 08:01:02 +05:30
Kovid Goyal
5a8d903a4d
Go SHM API to read simple data with size from SHM name
2023-02-26 08:01:02 +05:30
Kovid Goyal
06bfa671d9
Allow specifying the paths to search in Which()
2023-02-26 08:01:02 +05:30
Kovid Goyal
12c8af60dc
String repr for Set
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
Kovid Goyal
2b7d6d45df
Finish up config parser port
2023-02-26 08:01:01 +05:30
Kovid Goyal
747411be00
Finish implementation of config file parsing
...
Still needs tests
2023-02-26 08:01:01 +05:30
Kovid Goyal
5822bb23f0
Work on porting config file parsing to Go
2023-02-26 08:01:01 +05:30
Kovid Goyal
73a3366d53
Fix atomic write not working when file does not exist
2023-02-15 10:46:47 +05:30
Kovid Goyal
1aa9f1e62d
Allow faint as an alias for dim
2023-02-14 21:33:21 +05:30
Kovid Goyal
32e0a56a94
Some more useful generic slice utilities
2023-02-14 21:33:21 +05:30
Kovid Goyal
601a333b0e
Atomically update cached values file
2023-02-14 21:33:21 +05:30
Kovid Goyal
cc5107d0db
Convenient way to load/save JSON data
2023-02-14 21:33:20 +05:30
Kovid Goyal
befd5a65c3
A generic Set implementation
2023-02-09 18:00:04 +05:30
Kovid Goyal
8d0452d375
Allow specifying initial capacity when splitting lines
2023-02-09 12:59:40 +05:30
Kovid Goyal
bed4f33be8
Remove unused code
2023-02-03 09:51:54 +05:30
Kovid Goyal
7ea4270c88
...
2023-02-03 08:02:28 +05:30
Kovid Goyal
1d45cf4f91
Use crypto/rand rather than math/rand
...
Who knows how random math/rand actually is
2023-02-02 06:04:17 +05:30
Kovid Goyal
eb50fac8de
Add a test for creation of anonymous tempfiles
2023-01-26 11:51:02 +05:30
Kovid Goyal
4185e30d73
Code to more securely create anonymous temp files on Linux
2023-01-26 11:41:01 +05:30
Kovid Goyal
e3040a9c91
Make the various path finding functions thread safe and cache their results
2023-01-25 16:24:27 +05:30
Kovid Goyal
a01d68ed85
...
2023-01-25 16:12:47 +05:30
Kovid Goyal
f070b17fee
Also load ~/.config/kitty/mime.types in Go code
2023-01-25 16:08:12 +05:30
Kovid Goyal
cc1f0bc3fe
Function to drain controlling tty
2023-01-23 16:07:00 +05:30
Kovid Goyal
bd13238d9b
Should only return ENOTSUPP if SHM_DIR doesnt exist, not the fil we are trying to open
2023-01-21 17:46:37 +05:30
Kovid Goyal
dc0093cb51
SHM FS: Return a not supported error if SHM_DIR does not exist
2023-01-21 17:40:59 +05:30
Kovid Goyal
b1934ce267
kitten: When guessing MIME types use a builtin list as a fallback, generated from the MIME type definitions available on the build system
2023-01-21 17:35:41 +05:30
Kovid Goyal
821f52a748
...
2023-01-17 12:39:41 +05:30
Kovid Goyal
750f2fa4d0
Use go 1.20 facilities for unsafe string <-> bytes
2023-01-17 12:38:54 +05:30
Kovid Goyal
ce161e610f
...
2023-01-17 11:52:06 +05:30
Kovid Goyal
c317c934f3
More work on ImageMagick
2023-01-05 19:15:13 +05:30
Kovid Goyal
4d21be9eb5
Port python's shutil.which()
2023-01-05 19:15:13 +05:30
Kovid Goyal
7ebb281855
Allow controlling num of CPUs for images operations
2023-01-05 19:15:13 +05:30
Kovid Goyal
458adf967a
Dont use extra memory for mirror operations
2023-01-05 19:15:13 +05:30
Kovid Goyal
7c2317d301
Fix divide by zero
2023-01-05 19:15:12 +05:30
Kovid Goyal
4623f580b9
Get 24 bit RGB transmission working
2023-01-05 19:15:12 +05:30
Kovid Goyal
6291d0d400
Code to check if an image is Opaque
2023-01-05 19:15:12 +05:30
Kovid Goyal
f9feb4954a
Wire up pasting to RGB
2023-01-05 19:15:12 +05:30
Kovid Goyal
d192dcb0d7
Code to convert images to NRGB
2023-01-05 19:15:12 +05:30
Kovid Goyal
143fd6e4dd
Start work on transmitting RGB images
2023-01-05 19:15:12 +05:30
Kovid Goyal
df06578c2d
Implement --scale-up and --place
2023-01-05 19:15:12 +05:30
Kovid Goyal
1fa1a478d9
Get --background working
2023-01-05 19:15:12 +05:30