mirror of
https://github.com/kovidgoyal/kitty
synced 2026-07-21 16:05:02 +02:00
Update docs of remote control commands to note that they support more image formats than just PNG
This commit is contained in:
@@ -82,6 +82,7 @@ PayloadGetType = PayloadGetter
|
|||||||
ArgsType = List[str]
|
ArgsType = List[str]
|
||||||
ImageCompletion = CompletionSpec.from_string('type:file group:"Images"')
|
ImageCompletion = CompletionSpec.from_string('type:file group:"Images"')
|
||||||
ImageCompletion.extensions = 'png', 'jpg', 'jpeg', 'webp', 'gif', 'bmp', 'tiff'
|
ImageCompletion.extensions = 'png', 'jpg', 'jpeg', 'webp', 'gif', 'bmp', 'tiff'
|
||||||
|
SUPPORTED_IMAGE_FORMATS = tuple(x.upper() for x in ImageCompletion.extensions if x != 'jpg')
|
||||||
|
|
||||||
|
|
||||||
MATCH_WINDOW_OPTION = '''\
|
MATCH_WINDOW_OPTION = '''\
|
||||||
|
|||||||
@@ -11,6 +11,7 @@ from kitty.utils import is_png
|
|||||||
|
|
||||||
from .base import (
|
from .base import (
|
||||||
MATCH_WINDOW_OPTION,
|
MATCH_WINDOW_OPTION,
|
||||||
|
SUPPORTED_IMAGE_FORMATS,
|
||||||
ArgsType,
|
ArgsType,
|
||||||
Boss,
|
Boss,
|
||||||
CmdGenerator,
|
CmdGenerator,
|
||||||
@@ -43,10 +44,10 @@ class SetBackgroundImage(RemoteCommand):
|
|||||||
|
|
||||||
short_desc = 'Set the background image'
|
short_desc = 'Set the background image'
|
||||||
desc = (
|
desc = (
|
||||||
'Set the background image for the specified OS windows. You must specify the path to a PNG image that'
|
'Set the background image for the specified OS windows. You must specify the path to an image that'
|
||||||
' will be used as the background. If you specify the special value :code:`none` then any existing image will'
|
' will be used as the background. If you specify the special value :code:`none` then any existing image will'
|
||||||
' be removed.'
|
' be removed. Supported image formats are: '
|
||||||
)
|
) + ', '.join(SUPPORTED_IMAGE_FORMATS)
|
||||||
options_spec = f'''\
|
options_spec = f'''\
|
||||||
--all -a
|
--all -a
|
||||||
type=bool-set
|
type=bool-set
|
||||||
|
|||||||
@@ -11,6 +11,7 @@ from kitty.utils import is_png
|
|||||||
|
|
||||||
from .base import (
|
from .base import (
|
||||||
MATCH_WINDOW_OPTION,
|
MATCH_WINDOW_OPTION,
|
||||||
|
SUPPORTED_IMAGE_FORMATS,
|
||||||
ArgsType,
|
ArgsType,
|
||||||
Boss,
|
Boss,
|
||||||
CmdGenerator,
|
CmdGenerator,
|
||||||
@@ -39,10 +40,10 @@ class SetWindowLogo(RemoteCommand):
|
|||||||
|
|
||||||
short_desc = 'Set the window logo'
|
short_desc = 'Set the window logo'
|
||||||
desc = (
|
desc = (
|
||||||
'Set the logo image for the specified windows. You must specify the path to a PNG image that'
|
'Set the logo image for the specified windows. You must specify the path to an image that'
|
||||||
' will be used as the logo. If you specify the special value :code:`none` then any existing logo will'
|
' will be used as the logo. If you specify the special value :code:`none` then any existing logo will'
|
||||||
' be removed.'
|
' be removed. Supported image formats are: '
|
||||||
)
|
) + ', '.join(SUPPORTED_IMAGE_FORMATS)
|
||||||
|
|
||||||
options_spec = MATCH_WINDOW_OPTION + '''\n
|
options_spec = MATCH_WINDOW_OPTION + '''\n
|
||||||
--self
|
--self
|
||||||
|
|||||||
Reference in New Issue
Block a user