mirror of
https://github.com/kovidgoyal/kitty
synced 2026-07-10 22:24:24 +02:00
ssh kitten: Allow changing terminal colors when connecting
This commit is contained in:
@@ -103,6 +103,15 @@ value are expanded. The default is empty so no changing is done, which
|
||||
usually means the home directory is used.
|
||||
''')
|
||||
|
||||
opt('color_scheme', '', long_text='''
|
||||
Specify a color scheme to use when connecting to the remote host. If the
|
||||
color_scheme ends with :code:`.conf` it is assumed to be the name of a config
|
||||
file to load from the kitty config directory, otherwise it is assumed to be the
|
||||
name of a color theme to load via the themes kitten. Note that only colors
|
||||
applying to the text/background are changed, other config settings in the .conf
|
||||
files/themes are ignored.
|
||||
''')
|
||||
|
||||
opt('remote_kitty', 'if-needed', choices=('if-needed', 'no', 'yes'), long_text='''
|
||||
Make kitty available on the remote server. Useful to run kittens such as the
|
||||
icat kitten to display images or the transfer file kitten to transfer files.
|
||||
|
||||
@@ -15,6 +15,9 @@ class Parser:
|
||||
|
||||
choices_for_askpass = frozenset(('unless-set', 'ssh', 'native'))
|
||||
|
||||
def color_scheme(self, val: str, ans: typing.Dict[str, typing.Any]) -> None:
|
||||
ans['color_scheme'] = str(val)
|
||||
|
||||
def copy(self, val: str, ans: typing.Dict[str, typing.Any]) -> None:
|
||||
for k, v in copy(val, ans["copy"]):
|
||||
ans["copy"][k] = v
|
||||
|
||||
@@ -12,6 +12,7 @@ else:
|
||||
|
||||
option_names = ( # {{{
|
||||
'askpass',
|
||||
'color_scheme',
|
||||
'copy',
|
||||
'cwd',
|
||||
'env',
|
||||
@@ -26,6 +27,7 @@ option_names = ( # {{{
|
||||
|
||||
class Options:
|
||||
askpass: choices_for_askpass = 'unless-set'
|
||||
color_scheme: str = ''
|
||||
cwd: str = ''
|
||||
hostname: str = '*'
|
||||
interpreter: str = 'sh'
|
||||
|
||||
Reference in New Issue
Block a user