Commit Graph

327 Commits

Author SHA1 Message Date
ad-chaos
c2acc2460b expose glfw{Get,Set}WindowPos to python 2024-01-18 22:21:39 +05:30
Kovid Goyal
858f0c1073 GNOME Wayland: Fix remembered window size smaller than actual size
Fixes #6946
2023-12-25 19:29:33 +05:30
Kovid Goyal
9e815212dc Implement modal keyboard handling 2023-11-30 19:44:41 +05:30
Kovid Goyal
3876d518bd Fix setting swap interval for newly created OS window not always working 2023-11-29 21:13:10 +05:30
Kovid Goyal
b4f88b4f81 A new option to control when hyperlinks are underlined
While kitty is never going to underline detected URLs as the performance
of that is absurd, underlining hyperlinks specifically is acceptable,
since they dont require detection.

See #6766
2023-11-03 08:51:58 +05:30
Kovid Goyal
1693107608 A new escape code to change the shape of the mouse pointer
Fixes #6711
2023-10-15 19:57:36 +05:30
Kovid Goyal
f73d32e15d A new option menu_map that allows adding entries to the global menubar on macOS 2023-10-09 19:47:25 +05:30
Kovid Goyal
e50ab57b8d Draw resizing text with semi-transparent background 2023-07-22 11:38:14 +05:30
Kovid Goyal
630101204b macOS: Disable OS window shadows for transparent windows as they cause rendering artifacts due to Cocoa bugs
Fixes #6439
2023-07-22 11:20:37 +05:30
Kovid Goyal
a00b6bd497 macOS: Fix a regression causing *burn-in* of text when resizing semi-transparent OS windows
Fixes #6439
2023-07-11 20:54:47 +05:30
Kovid Goyal
e244d9da92 Move individual OSWindow rendering code into a separate function
Allow it to be called from other places, probably will be needed
to fix live resizing on macOS
2023-07-11 11:15:41 +05:30
Kovid Goyal
5139793787 Fix one place where change_live_resize_state is not called 2023-07-11 09:47:50 +05:30
Kovid Goyal
0556faf2e7 Rename function 2023-07-04 12:06:56 +05:30
Kovid Goyal
d3f14ffbf4 macOS: Fix window shadows not being drawn for transparent windows
Re-organize the whole infrastructure for setting window chrome, doing it
in a single function that has access to all settings.

Fixes #2827
Fixes #6416
2023-07-04 11:59:50 +05:30
Kovid Goyal
7a1bdb4ff1 macOS: Implement background blurring
Uses a private API that allows us to control the amount of blurring.
While using a private API is obviously not ideal, it is used by both
iTerm.app and Apple's own Terminal.app, so hopefully it should stick
around. Fixes #6135
2023-06-27 08:48:16 +05:30
Kovid Goyal
63a921ff7b Dont show window size on creation 2023-06-23 16:47:13 +05:30
Kovid Goyal
248301f8b3 Cleanup a bunch of shader infrastructure
1) No longer us glScissor. It's an awful API and is not available in
   Vulkan. Instead the graphics drawing code ensures the graphic is
   drawn within the current viewport

2) Use generated code to automatically get the locations of uniforms
   from shaders. Greatly simplifies adding new uniforms to a shader.

3) Dont use a VAO for loading graphics vertices. Greatly simplifies
   a bunch of book keeping code.
2023-06-22 19:38:05 +05:30
Kovid Goyal
098a38a3a9 Remove rendering via framebuffer for transparent windows with images
There is no need for it with the current rendering pipeline. Images are
blended with premult blending.
2023-06-21 16:06:07 +05:30
Kovid Goyal
a4373ec8b4 Fix graphics being scaled during live resize 2023-06-21 06:17:35 +05:30
Kovid Goyal
c66e4ced56 Preserve text size during live resize 2023-06-20 19:41:57 +05:30
Kovid Goyal
cd56597e7e Remove the resize_draw_strategy option
Use scale + size as the fixed strategy. This is because static looks
bad with translucent windows (the cell area ends up a different opacity
than the newly exposed window area).
2023-06-07 15:36:05 +05:30
Kovid Goyal
89875af5e6 Fix jerky behavior when live resizing an OS window on platforms that report live resize being and end events
Also disable live resize begin/end events on Wayland since they are not
reliable.

On platforms that support live resize begin/end use a separately
configurable pause time before the screen is redrawn.

Fixes #6341
2023-06-07 14:31:39 +05:30
Kovid Goyal
d3fc8a2897 Remove a bunch of option processing code and directly define the threshold in the shader 2023-05-24 21:23:39 +05:30
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
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
fda2646dd3 Cleanup previous PR 2023-03-19 10:37:37 +05:30
Campbell Jones
55fd885491 Add option to set XDG sound theme on Linux 2023-03-18 16:38:29 -04:00
pagedown
ba83ce7b10 macOS: Display the newly created OS window in specified state
Fix the maximized window can't occupy full screen space when window
decoration or title bar is hidden.
Fix resize_in_steps being applied even when window is maximized.
Allows to specify `os_window_state` in startup session file.
2023-02-18 14:02:19 +08:00
Kovid Goyal
c73c165be1 Cleanup change_os_window_state 2023-02-16 16:10:19 +05:30
Martin Wernstål
3676e6651d feat: additional contrast on text as a function of luminance difference 2023-02-02 10:18:15 +01:00
Kovid Goyal
f4ac03b791 Show the target of terminal hyperlinks when hovering over them with the mouse
Fixes #5830
2022-12-29 16:43:45 +05:30
pagedown
1023084eb9 macOS: Allow to customize Hide, Minimize, and Quit global menu shortcuts
All previously hard-coded shortcuts under macOS can be configured now.
2022-12-20 21:08:26 +08:00
Kovid Goyal
7a348d6ef1 Store updated tab bar edge colors on every tab bar redraw 2022-12-04 14:38:56 +05:30
pagedown
08d74a6c56 Add an option to control background image tinting for window gaps 2022-11-21 12:21:06 +08:00
Kovid Goyal
dcf2152a7a Wayland: Generate a XDG_ACTIVATION_TOKEN when opening URLs or running programs in the background via the launch action 2022-09-11 14:25:49 +05:30
Kovid Goyal
58a3baaf0f Wayland: Use XDG_ACTIVATION_TOKEN when present at launch 2022-09-11 13:43:52 +05:30
Kovid Goyal
23d73ec933 ... 2022-09-10 12:52:27 +05:30
Kovid Goyal
b60d9f73ce Wayland: Fix remembering window size not accurate when client side decorations are present 2022-09-04 14:25:04 +05:30
Kovid Goyal
32588939ae Deprecate the adjust_baseline adjust_line_height and adjust_column_width options in favor of modify_font
Unifies handling and allow using pt units for those adjustments.
Note that the behavior of percentage sizes for adjust baseline is
backwards incompatible. It now uses the baseline value as the base
rather than the cell height.
2022-07-15 15:29:42 +05:30
Kovid Goyal
03df0c3cca Actually implement modify_font 2022-07-15 12:27:42 +05:30
Kovid Goyal
1aa50b73a1 Allow pixel based adjustments as well 2022-07-15 11:45:43 +05:30
Kovid Goyal
14f4a8d28e Make modify_font available to C code 2022-07-15 11:06:24 +05:30
Kovid Goyal
60d33f2847 Wayland: Reduce flicker at startup by not using render frames immediately after a resize
Fixes #5235
2022-06-28 11:29:57 +05:30
Konrad Gräfe
8c41cc8d3e Add option select_by_word_characters_forward
This adds an option to select separate characters for forward and
backward word extension on double click. If it is empty the old behavior
is preserved. This is the default.

If it is not empty, select_by_word_characters_forward will be used for
extending the selection in forward direction (right) and
select_by_word_characters will be used for extending in backward
direction (left).

Signed-off-by: Konrad Gräfe <kgraefe@paktolos.net>
2022-05-16 11:09:36 +02:00
Kovid Goyal
6d6d9cc26b macOS: Add the macos_colorspace option to control what color space colors are rendered in
Fixed #4686
2022-04-26 11:14:01 +05:30
pagedown
e919857dfc macOS: Make the global menu shortcut to open kitty website configurable
This allows remapping the key combination shift+cmd+/
2022-04-23 13:22:27 +08:00
Kovid Goyal
8fcd5e40d4 Proper fix for reporting button in drag events to children 2022-04-21 11:41:57 +05:30
pagedown
6c628bc594 Wayland: Fix IME is not enabled after switching the focus 2022-03-21 18:36:25 +08:00
pagedown
7007f2e7fc macOS: Allow to customize global menu full screen shortcut 2022-02-17 16:31:46 +08:00
pagedown
d2f522277c Add wheel_scroll_min_lines to set the minimum scrolling lines 2022-02-14 21:53:02 +08:00