Interpret relative logo paths relative to conf dir
This commit is contained in:
parent
16201ac873
commit
3035ba08c3
@ -866,10 +866,11 @@ are undefined.
|
||||
opt('window_logo_path', 'none',
|
||||
option_type='config_or_absolute_path', ctype='!window_logo_path',
|
||||
long_text='''
|
||||
Path to a logo image. Must be in PNG format. The logo is displayed in a corner
|
||||
of every kitty window. The position is controlled by :opt:`window_logo_position`.
|
||||
Individual windows can be configured to have different logos either using
|
||||
the :doc:`launch` function or the :doc:`remote-control` facility.
|
||||
Path to a logo image. Must be in PNG format. Relative paths are interpreted
|
||||
relative to the kitty config directory. The logo is displayed in a corner of every
|
||||
kitty window. The position is controlled by :opt:`window_logo_position`.
|
||||
Individual windows can be configured to have different logos either using the
|
||||
:doc:`launch` function or the :doc:`remote-control` facility.
|
||||
''')
|
||||
|
||||
opt('window_logo_position', 'bottom-right',
|
||||
|
||||
@ -1091,6 +1091,8 @@ class Window:
|
||||
}
|
||||
|
||||
def set_logo(self, path: str, position: str = 'bottom-right', alpha: float = 0.5) -> None:
|
||||
from .options.utils import config_or_absolute_path
|
||||
path = config_or_absolute_path(path) or path
|
||||
set_window_logo(self.os_window_id, self.tab_id, self.id, path, position, alpha)
|
||||
|
||||
# actions {{{
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user