mirror of
https://github.com/kovidgoyal/kitty.git
synced 2026-08-04 06:36:24 +00:00
Replace the second_transparent_bg option
This is backwards incompatible, but only for a feature released 3 weeks ago.
This commit is contained in:
parent
e78e86572e
commit
6ca187c42c
4 changed files with 15 additions and 9 deletions
|
|
@ -136,7 +136,7 @@ Detailed list of changes
|
|||
|
||||
- launch command: A new :option:`launch --bias` option to adjust the size of newly created windows declaratively (:iss:`7634`)
|
||||
|
||||
- A new option :opt:`second_transparent_bg` to make a second background color semi-transparent via :opt:`background_opacity`. Useful for things like cursor line highlight in editors (:iss:`7646`)
|
||||
- A new option :opt:`transparent_background_colors` to make a second background color semi-transparent via :opt:`background_opacity`. Useful for things like cursor line highlight in editors (:iss:`7646`)
|
||||
|
||||
- A new :doc:`notify </kittens/notify>` kitten to show desktop notifications
|
||||
from the command line with support for icons, buttons and more.
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@
|
|||
layout(std140) uniform CellRenderData {
|
||||
float xstart, ystart, dx, dy, sprite_dx, sprite_dy, use_cell_bg_for_selection_fg, use_cell_fg_for_selection_fg, use_cell_for_selection_bg;
|
||||
|
||||
uint default_fg, highlight_fg, highlight_bg, cursor_fg, cursor_bg, url_color, url_style, inverted, second_transparent_bg;
|
||||
uint default_fg, highlight_fg, highlight_bg, cursor_fg, cursor_bg, url_color, url_style, inverted;
|
||||
|
||||
uint xnum, ynum, cursor_fg_sprite_idx;
|
||||
float cursor_x, cursor_y, cursor_w, cursor_opacity;
|
||||
|
|
|
|||
|
|
@ -1527,16 +1527,22 @@ opt('background_image_linear', 'no',
|
|||
long_text='When background image is scaled, whether linear interpolation should be used.'
|
||||
)
|
||||
|
||||
opt('transparent_background_colors', '', option_type='transparent_background_colors', ctype='!transparent_background_colors')
|
||||
opt('transparent_background_colors', '', option_type='transparent_background_colors', ctype='!transparent_background_colors', long_text='''
|
||||
A space separated list of upto 7 colors, with opacity. When the background color of a cell matches one of these colors,
|
||||
it is rendered semi-transparent using the specified opacity.
|
||||
|
||||
opt('second_transparent_bg', 'none', option_type='to_color_or_none', long_text='''
|
||||
When the background color matches this color, :opt:`background_opacity` is applied to it
|
||||
to render it as semi-transparent, just as for colors matching the main :opt:`background` color.
|
||||
Useful in more complex UIs like editors where you could want more than a single background color
|
||||
to be rendered as transparent, for instance, for a cursor highlight line background.
|
||||
to be rendered as transparent, for instance, for a cursor highlight line background or a highlighted block.
|
||||
Terminal applications can set this color using :ref:`The kitty color control <color_control>`
|
||||
escape code.
|
||||
''')
|
||||
|
||||
The syntax for specifiying colors is: :code:`color@opacity`, where the :code:`@opacity`
|
||||
part is optional. When unspecified, the value of :opt:`background_opacity` is used. For example::
|
||||
|
||||
transparent_background_colors red@0.5 #00ff00@0.3
|
||||
|
||||
'''
|
||||
)
|
||||
|
||||
opt('dynamic_background_opacity', 'no',
|
||||
option_type='to_bool', ctype='bool',
|
||||
|
|
|
|||
|
|
@ -295,7 +295,7 @@ cell_update_uniform_block(ssize_t vao_idx, Screen *screen, int uniform_buffer, c
|
|||
struct GPUCellRenderData {
|
||||
GLfloat xstart, ystart, dx, dy, sprite_dx, sprite_dy, use_cell_bg_for_selection_fg, use_cell_fg_for_selection_color, use_cell_for_selection_bg;
|
||||
|
||||
GLuint default_fg, highlight_fg, highlight_bg, cursor_fg, cursor_bg, url_color, url_style, inverted, second_transparent_bg;
|
||||
GLuint default_fg, highlight_fg, highlight_bg, cursor_fg, cursor_bg, url_color, url_style, inverted;
|
||||
|
||||
GLuint xnum, ynum, cursor_fg_sprite_idx;
|
||||
GLfloat cursor_x, cursor_y, cursor_w, cursor_opacity;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue