Commit Graph
12120 Commits
Author SHA1 Message Date
Kovid Goyal d059ddbb07 Only import resource module when actually running the test instead of at import time 2023-05-24 16:59:44 +05:30
Kovid Goyal 99243487fa Merge branch 'skip-crypto-test-if-memlock-too-low' of https://github.com/ogayot/kitty 2023-05-24 16:57:15 +05:30
Olivier Gayot 430768f38b Skip crypto test if RLIMIT_MEMLOCK is too low
On systems where the max locked memory (a.k.a., RLIMIT_MEMLOCK) is too
low, the crypto test fails with "Cannot allocate memory".

Distros such as Debian and Ubuntu run the test-suite as part of the
build process. This results in failed builds if the build machine itself
does not have a sufficiently high value for RLIMIT_MEMLOCK. That said,
the resulting builds would run perfectly fine when installed on machines
that meet the requirements.

On supported systems, we now check if the RLIMIT_MEMLOCK is high enough
and skip the crypto test if it is not.

Signed-off-by: Olivier Gayot <olivier.gayot@canonical.com>
2023-05-24 13:18:08 +02:00
Kovid Goyal 046eb86091 Only move graphics on resize if the actual num of content lines chages
Avoids spurious moves when the window is not full and therefore text
does not move on vertical resize
2023-05-24 15:40:41 +05:30
Kovid Goyal a720ef6917 Graphics: Move images up along with text when the window is shrunk vertically
Fixes #6278
2023-05-24 15:18:58 +05:30
Kovid Goyal b45d7ae21f Dont require restart to change text_fg_override_threshold from zero to non-zero 2023-05-24 13:50:19 +05:30
Kovid Goyal 53073f34d7 Cleanup previous PR 2023-05-24 13:31:29 +05:30
Kovid Goyal 7dd06cf134 Merge branch 'text-fg-override-contrast-threshold' of https://github.com/lmcnulty/kitty 2023-05-24 12:56:29 +05:30
Luna McNulty a15289c038 Don't override when colored_sprite 2023-05-21 10:43:04 -04:00
Luna McNulty 9bd97b090d Remove glsl if-else, add macro, separate new opt
This adds a config option called text_fg_override_threshold that
specifies a percentage difference luminance below which the
foreground color will be overridden. The foreground color is set
to white if the background is dark or black if the background is
light. The default is 0, and the computations will only be
performed if the option is set.

Many programs output colors that look good with the author's
terminal's color scheme but which are completely illegible with
other color schemes. This allows the user ensure that there is
always sufficient contrast to read the text on the screen.

I originally implemented this is as a parameter on
text_composition_strategy. For that to work, the option needed to
take _up to_ rather than _exactly_ the number of available
parameters. While it now has nothing to do with the new feature,
it seems like that change should be made anyway, so I'm leaving
it in for now.
2023-05-20 11:13:53 -04:00
Kovid Goyal 0ca94f8a88 Fix #6292 2023-05-20 15:45:08 +05:30
Kovid Goyal f0ab01ccc9 Merge branch 'fix-graphics-protocol-spec-typo' of https://github.com/AnonymouX47/kitty 2023-05-20 15:42:00 +05:30
AnonymouX47andGitHub de6da31f24 Correct typo in graphics protocol specification
Correct swapped row/column index in description of virtual placements
2023-05-20 10:36:07 +01:00
Kovid Goyal 5e67908b6f Clarify language describing num_window_groups
Fixes #6291
2023-05-20 12:39:46 +05:30
Luna McNulty 05d94e8256 Add foreground override contrast threshold
This adds a parameter to text_composition_strategy that specifies
a percentage difference luminance below which the foreground
color will be overridden. The foreground color is set to white if
the background is dark or black if the background is light.

Many programs output colors that look good with the author's
terminal's color scheme but which are completely illegible with
other color schemes. This allows the user ensure that there is
always sufficient contrast to read the text on the screen.

Since we want existing configs to continue working, this also
makes it so that rather than taking exactly two parameters,
text_composition_strategy takes one--three parameters, using the
default values for those not specified.
2023-05-18 11:28:33 -04:00
Kovid Goyal 9a0068e318 Also update ANSI color table for tab bar screen objects 2023-05-14 07:13:49 +05:30
Kovid Goyal dd63d35cf4 Merge branch 'awrit' of https://github.com/chase/kitty 2023-05-14 06:50:10 +05:30
Chase ColmanandChase Colman d569565fe6 Add awrit to keyboard-protocol 2023-05-13 23:44:18 +08:00
Chase ColmanandChase Colman 80de70f7f3 Add awrit to graphics-protocol 2023-05-13 23:44:18 +08:00
Kovid Goyal 491297ea1d When asking for permission to exec a shebang script also add options to view or edit the script 2023-05-12 16:02:47 +05:30
Kovid Goyal c101a6acb0 Implement a dedicated function for word matching rather than relying on a regex and being at the mercy of the vagaries of regex implementations 2023-05-12 15:43:56 +05:30
Kovid Goyal 65f8bb7397 hints kitten: Switch to using a regex engine that supports lookaround
Note that we loose unicode char matching for --type=word because of
https://github.com/dlclark/regexp2/issues/65 and of course user regexps
cant use \p{N} escapes any more. Hopefully regexp2 will add support for
these soon-ish. IMO lookaround is more important than \p.

Fixes #6265
2023-05-12 12:24:59 +05:30
Kovid Goyal 5b8b91b6a3 Add support for OSC 1337 SetUserVar
See https://github.com/kovidgoyal/kitty/discussions/6229
2023-05-11 17:57:45 +05:30
Kovid Goyal 6a2edfa847 Merge branch 'pr-fix-shade' of https://github.com/MithicSpirit/kitty 2023-05-10 09:56:59 +05:30
MithicSpirit 28b84a2d5b Add support for 0x1fb90
Allocation in box_glyph_id is larger than necessary to account for the
addition of 0x1fb8c ... 0x1fb94 eventually, which are quite similar but
will require more work to add. Note that 0x1fb93 is not present in the
standard yet, but it is easy to guess what it will likely be from
context, so it should be kept in the allocation imo.
2023-05-09 22:19:03 -04:00
MithicSpirit c247fe2336 Revert "Improve shade character appearance"
This reverts commit c883a024ba.

To maximize compatibility with the appearance in the standard.
2023-05-09 22:06:05 -04:00
MithicSpirit c883a024ba Improve shade character appearance
I was really unhappy with the previous checkerboard appearance, so I
changed it to supersampled diagonal lines. The fill ratios are still the
same, so it should still be compliant with the standard if I understood
it correctly.

Feel free to revert (or tell me to revert) this commit if you want the
previous look.
2023-05-09 16:08:02 -04:00
Kovid Goyal 0cc38e1086 ... 2023-05-09 09:50:11 +05:30
Kovid Goyal 1777b87c45 Improve docs for reset the terminal 2023-05-09 09:44:05 +05:30
Kovid Goyal e72975cc98 A new escape code that moves the current contents of the screen into the scrollback before clearing it 2023-05-09 09:32:39 +05:30
Kovid Goyal 8f15654985 Ensure kitty is rebuilt after publishing the nightly 2023-05-09 08:54:29 +05:30
Kovid Goyal 2408ccb635 ... 2023-05-09 08:48:37 +05:30
Kovid Goyal a0cf4214df ... 2023-05-09 08:44:51 +05:30
Kovid Goyal 07203c67ca Add a note about why kitty terminfo does not have E3
See #6255
2023-05-09 08:28:54 +05:30
MithicSpirit a36fe45181 Fix shade characters to follow unicode standard
- Light shade: 25% fill
- Medium shade: 50% fill
- Dark shade: 75% fill (implemented as inverse of light shade)
2023-05-08 18:46:24 -04:00
Kovid Goyal 061c444f20 ... 2023-05-08 16:36:47 +05:30
Kovid Goyal a1d791083b ssh_kitten: Proper exit code for termination by SIGINT 2023-05-08 16:27:07 +05:30
Kovid Goyal 454acd4f5c ssh kitten: Fix a regression in 0.28.0 that caused interrupt during setup to not be handled gracefully
Fixes #6254
2023-05-08 16:18:05 +05:30
Kovid Goyal 71189aee9f Correct the type signature for callback 2023-05-08 16:03:27 +05:30
Kovid Goyal 23d7494e3a Fix #6251 2023-05-08 08:04:20 +05:30
Kovid Goyal 404f83a277 Add a link to awrit in the integrations page 2023-05-07 10:06:37 +05:30
Kovid Goyal 474244268c edit-in-kitty: Fix running edit-in-kitty with elevated privileges to edit a restricted file not working 2023-05-07 09:36:16 +05:30
Kovid Goyal 79cd6f38fe ... 2023-05-07 09:24:30 +05:30
Kovid Goyal b7c3946f8f ... 2023-05-07 08:13:57 +05:30
Kovid Goyal 537cabca71 kitty +open: Ask for permission before executing script files that are not marked as executable
This prevents accidental execution of script files via MIME type
association from programs that unconditionally "open"
attachments/downloaded files via MIME type associations.
2023-05-07 08:11:39 +05:30
Kovid Goyal 79c19562b5 When publishing stash untracked files as well 2023-05-07 07:42:25 +05:30
Kovid Goyal 52afc79476 Fix re-using an image id for an animated image for a still image causing a crash
Fixes #6244
2023-05-06 09:37:55 +05:30
Kovid Goyal 877d8d7008 ... 2023-05-04 10:36:02 +05:30
Kovid Goyal ce70320a62 ... 2023-05-04 10:26:18 +05:30
Kovid Goyal 3eb18a416a Entry point for parsing theme metadata 2023-05-04 10:14:58 +05:30