Add type annotations to rc protocol field definitions

This commit is contained in:
Kovid Goyal 2022-08-11 22:14:33 +05:30
parent 6be3ae9efc
commit f42d2c63a6
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C
35 changed files with 147 additions and 142 deletions

View File

@ -277,7 +277,7 @@ def write_remote_control_protocol_docs() -> None: # {{{
from kitty.rc.base import ( from kitty.rc.base import (
RemoteCommand, all_command_names, command_for_name RemoteCommand, all_command_names, command_for_name
) )
field_pat = re.compile(r'\s*([a-zA-Z0-9_+]+)\s*:\s*(.+)') field_pat = re.compile(r'\s*([a-zA-Z0-9_+/]+)\s*:\s*(.+)')
def format_cmd(p: Callable[..., None], name: str, cmd: RemoteCommand) -> None: def format_cmd(p: Callable[..., None], name: str, cmd: RemoteCommand) -> None:
p(name) p(name)
@ -289,7 +289,7 @@ def write_remote_control_protocol_docs() -> None: # {{{
if m is None: if m is None:
p(line) p(line)
else: else:
fields.append((m.group(1), m.group(2))) fields.append((m.group(1).split('/')[0], m.group(2)))
if fields: if fields:
p('\nFields are:\n') p('\nFields are:\n')
for (name, desc) in fields: for (name, desc) in fields:

View File

@ -16,8 +16,8 @@ if TYPE_CHECKING:
class CloseTab(RemoteCommand): class CloseTab(RemoteCommand):
''' '''
match: Which tab to close match/str: Which tab to close
self: Boolean indicating whether to close the tab of the window the command is run in self/bool: Boolean indicating whether to close the tab of the window the command is run in
''' '''
short_desc = 'Close the specified tabs' short_desc = 'Close the specified tabs'

View File

@ -15,8 +15,8 @@ if TYPE_CHECKING:
class CloseWindow(RemoteCommand): class CloseWindow(RemoteCommand):
''' '''
match: Which window to close match/str: Which window to close
self: Boolean indicating whether to close the window the command is run in self/bool: Boolean indicating whether to close the window the command is run in
''' '''
short_desc = 'Close the specified windows' short_desc = 'Close the specified windows'

View File

@ -17,9 +17,9 @@ if TYPE_CHECKING:
class CreateMarker(RemoteCommand): class CreateMarker(RemoteCommand):
''' '''
match: Which window to create the marker in match/str: Which window to create the marker in
self: Boolean indicating whether to create marker in the window the command is run in self/bool: Boolean indicating whether to create marker in the window the command is run in
marker_spec: A list or arguments that define the marker specification, for example: ['text', '1', 'ERROR'] marker_spec/list.str: A list or arguments that define the marker specification, for example: ['text', '1', 'ERROR']
''' '''
short_desc = 'Create a marker that highlights specified text' short_desc = 'Create a marker that highlights specified text'

View File

@ -15,9 +15,9 @@ if TYPE_CHECKING:
class DetachTab(RemoteCommand): class DetachTab(RemoteCommand):
''' '''
match: Which tab to detach match/str: Which tab to detach
target_tab: Which tab to move the detached tab to the OS window it is run in target_tab/str: Which tab to move the detached tab to the OS window it is run in
self: Boolean indicating whether to detach the tab the command is run in self/bool: Boolean indicating whether to detach the tab the command is run in
''' '''
short_desc = 'Detach the specified tabs and place them in a different/new OS window' short_desc = 'Detach the specified tabs and place them in a different/new OS window'

View File

@ -16,9 +16,9 @@ if TYPE_CHECKING:
class DetachWindow(RemoteCommand): class DetachWindow(RemoteCommand):
''' '''
match: Which window to detach match/str: Which window to detach
target_tab: Which tab to move the detached window to target_tab/str: Which tab to move the detached window to
self: Boolean indicating whether to detach the window the command is run in self/bool: Boolean indicating whether to detach the window the command is run in
''' '''
short_desc = 'Detach the specified windows and place them in a different/new tab' short_desc = 'Detach the specified windows and place them in a different/new tab'

View File

@ -16,10 +16,10 @@ if TYPE_CHECKING:
class DisableLigatures(RemoteCommand): class DisableLigatures(RemoteCommand):
''' '''
strategy+: One of :code:`never`, :code:`always` or :code:`cursor` strategy+/choices.never.always.cursor: One of :code:`never`, :code:`always` or :code:`cursor`
match_window: Window to change opacity in match_window/str: Window to change opacity in
match_tab: Tab to change opacity in match_tab/str: Tab to change opacity in
all: Boolean indicating operate on all windows all/bool: Boolean indicating operate on all windows
''' '''
short_desc = 'Control ligature rendering' short_desc = 'Control ligature rendering'

View File

@ -12,7 +12,7 @@ from .base import (
class Env(RemoteCommand): class Env(RemoteCommand):
''' '''
env+: Dictionary of environment variables to values. Empty values cause the variable to be removed. env+/dict.str: Dictionary of environment variables to values. Empty values cause the variable to be removed.
''' '''
short_desc = 'Change environment variables seen by future children' short_desc = 'Change environment variables seen by future children'

View File

@ -16,7 +16,7 @@ if TYPE_CHECKING:
class FocusTab(RemoteCommand): class FocusTab(RemoteCommand):
''' '''
match: The tab to focus match/str: The tab to focus
''' '''
short_desc = 'Focus the specified tab' short_desc = 'Focus the specified tab'

View File

@ -17,7 +17,7 @@ if TYPE_CHECKING:
class FocusWindow(RemoteCommand): class FocusWindow(RemoteCommand):
''' '''
match: The window to focus match/str: The window to focus
''' '''
short_desc = 'Focus the specified window' short_desc = 'Focus the specified window'

View File

@ -19,8 +19,8 @@ if TYPE_CHECKING:
class GetColors(RemoteCommand): class GetColors(RemoteCommand):
''' '''
match: The window to get the colors for match/str: The window to get the colors for
configured: Boolean indicating whether to get configured or current colors configured/bool: Boolean indicating whether to get configured or current colors
''' '''
short_desc = 'Get terminal colors' short_desc = 'Get terminal colors'

View File

@ -16,14 +16,15 @@ if TYPE_CHECKING:
class GetText(RemoteCommand): class GetText(RemoteCommand):
''' '''
match: The window to get text from match/str: The window to get text from
extent: One of :code:`screen`, :code:`first_cmd_output_on_screen`, :code:`last_cmd_output`, \ extent/choices.screen.first_cmd_output_on_screen.last_cmd_output.last_visited_cmd_output.all.selection: \
:code:`last_visited_cmd_output`, :code:`all`, or :code:`selection` One of :code:`screen`, :code:`first_cmd_output_on_screen`, :code:`last_cmd_output`, \
ansi: Boolean, if True send ANSI formatting codes :code:`last_visited_cmd_output`, :code:`all`, or :code:`selection`
cursor: Boolean, if True send cursor position/style as ANSI codes ansi/bool: Boolean, if True send ANSI formatting codes
wrap_markers: Boolean, if True add wrap markers to output cursor/bool: Boolean, if True send cursor position/style as ANSI codes
clear_selection: Boolean, if True clear the selection in the matched window wrap_markers/bool: Boolean, if True add wrap markers to output
self: Boolean, if True use window the command was run in clear_selection/bool: Boolean, if True clear the selection in the matched window
self/bool: Boolean, if True use window the command was run in
''' '''
short_desc = 'Get text from the specified window' short_desc = 'Get text from the specified window'

View File

@ -20,8 +20,8 @@ def layout_names() -> Iterable[str]:
class GotoLayout(RemoteCommand): class GotoLayout(RemoteCommand):
''' '''
layout+: The new layout name layout+/str: The new layout name
match: Which tab to change the layout of match/str: Which tab to change the layout of
''' '''
short_desc = 'Set the window layout' short_desc = 'Set the window layout'

View File

@ -15,9 +15,9 @@ if TYPE_CHECKING:
class Kitten(RemoteCommand): class Kitten(RemoteCommand):
''' '''
kitten+: The name of the kitten to run kitten+/str: The name of the kitten to run
args: Arguments to pass to the kitten as a list args/list.str: Arguments to pass to the kitten as a list
match: The window to run the kitten over match/str: The window to run the kitten over
''' '''
short_desc = 'Run a kitten' short_desc = 'Run a kitten'

View File

@ -15,8 +15,8 @@ if TYPE_CHECKING:
class LastUsedLayout(RemoteCommand): class LastUsedLayout(RemoteCommand):
''' '''
match: Which tab to change the layout of match/str: Which tab to change the layout of
all: Boolean to match all tabs all/bool: Boolean to match all tabs
''' '''
short_desc = 'Switch to the last used layout' short_desc = 'Switch to the last used layout'

View File

@ -22,29 +22,30 @@ if TYPE_CHECKING:
class Launch(RemoteCommand): class Launch(RemoteCommand):
''' '''
args+: The command line to run in the new window, as a list, use an empty list to run the default shell args+/list.str: The command line to run in the new window, as a list, use an empty list to run the default shell
match: The tab to open the new window in match/str: The tab to open the new window in
window_title: Title for the new window window_title/str: Title for the new window
cwd: Working directory for the new window cwd/str: Working directory for the new window
env: List of environment variables of the form NAME=VALUE env/list.str: List of environment variables of the form NAME=VALUE
tab_title: Title for the new tab tab_title/str: Title for the new tab
type: The type of window to open type/choices.window.tab.os-window.overlay.background.clipboard.primary: The type of window to open
keep_focus: Boolean indicating whether the current window should retain focus or not keep_focus/bool: Boolean indicating whether the current window should retain focus or not
copy_colors: Boolean indicating whether to copy the colors from the current window copy_colors/bool: Boolean indicating whether to copy the colors from the current window
copy_cmdline: Boolean indicating whether to copy the cmdline from the current window copy_cmdline/bool: Boolean indicating whether to copy the cmdline from the current window
copy_env: Boolean indicating whether to copy the environ from the current window copy_env/bool: Boolean indicating whether to copy the environ from the current window
hold: Boolean indicating whether to keep window open after cmd exits hold/bool: Boolean indicating whether to keep window open after cmd exits
location: Where in the tab to open the new window location/choices.first.after.before.neighbor.last.vsplit.hsplit.split.default: Where in the tab to open the new window
allow_remote_control: Boolean indicating whether to allow remote control from the new window allow_remote_control/bool: Boolean indicating whether to allow remote control from the new window
stdin_source: Where to get stdin for thew process from stdin_source/choices.none.@selection.@screen.@screen_scrollback.@alternate.@alternate_scrollback.\
stdin_add_formatting: Boolean indicating whether to add formatting codes to stdin @first_cmd_output_on_screen.@last_cmd_output.@last_visited_cmd_output: Where to get stdin for the process from
stdin_add_line_wrap_markers: Boolean indicating whether to add line wrap markers to stdin stdin_add_formatting/bool: Boolean indicating whether to add formatting codes to stdin
no_response: Boolean indicating whether to send back the window id stdin_add_line_wrap_markers/bool: Boolean indicating whether to add line wrap markers to stdin
marker: Specification for marker for new window, for example: "text 1 ERROR" no_response/bool: Boolean indicating whether to send back the window id
logo: Path to window logo marker/str: Specification for marker for new window, for example: "text 1 ERROR"
logo_position: Window logo position as string or empty string to use default logo/str: Path to window logo
logo_alpha: Window logo alpha or -1 to use default logo_position/str: Window logo position as string or empty string to use default
self: Boolean, if True use tab the command was run in logo_alpha/float: Window logo alpha or -1 to use default
self/bool: Boolean, if True use tab the command was run in
''' '''
short_desc = 'Run an arbitrary process in a new window/tab' short_desc = 'Run an arbitrary process in a new window/tab'

View File

@ -17,7 +17,7 @@ if TYPE_CHECKING:
class LS(RemoteCommand): class LS(RemoteCommand):
''' '''
all_env_vars: Whether to send all environment variables for every window rather than just differing ones all_env_vars/bool: Whether to send all environment variables for every window rather than just differing ones
''' '''
short_desc = 'List all tabs/windows' short_desc = 'List all tabs/windows'

View File

@ -15,15 +15,15 @@ if TYPE_CHECKING:
class NewWindow(RemoteCommand): class NewWindow(RemoteCommand):
''' '''
args+: The command line to run in the new window, as a list, use an empty list to run the default shell args+/list.str: The command line to run in the new window, as a list, use an empty list to run the default shell
match: The tab to open the new window in match/str: The tab to open the new window in
title: Title for the new window title/str: Title for the new window
cwd: Working directory for the new window cwd/str: Working directory for the new window
keep_focus: Boolean indicating whether the current window should retain focus or not keep_focus/bool: Boolean indicating whether the current window should retain focus or not
window_type: One of :code:`kitty` or :code:`os` window_type/choices.kitty.os: One of :code:`kitty` or :code:`os`
new_tab: Boolean indicating whether to open a new tab new_tab/bool: Boolean indicating whether to open a new tab
tab_title: Title for the new tab tab_title/str: Title for the new tab
no_response: Boolean indicating whether to send back the window id no_response/bool: Boolean indicating whether to send back the window id
''' '''
short_desc = 'Open new window' short_desc = 'Open new window'

View File

@ -16,8 +16,8 @@ if TYPE_CHECKING:
class RemoveMarker(RemoteCommand): class RemoveMarker(RemoteCommand):
''' '''
match: Which window to remove the marker from match/str: Which window to remove the marker from
self: Boolean indicating whether to detach the window the command is run in self/bool: Boolean indicating whether to detach the window the command is run in
''' '''
short_desc = 'Remove the currently set marker, if any.' short_desc = 'Remove the currently set marker, if any.'

View File

@ -14,13 +14,13 @@ if TYPE_CHECKING:
class ResizeOSWindow(RemoteCommand): class ResizeOSWindow(RemoteCommand):
''' '''
match: Which window to resize match/str: Which window to resize
self: Boolean indicating whether to close the window the command is run in self/bool: Boolean indicating whether to close the window the command is run in
incremental: Boolean indicating whether to adjust the size incrementally incremental/bool: Boolean indicating whether to adjust the size incrementally
action: One of :code:`resize, toggle-fullscreen` or :code:`toggle-maximized` action/choices.resize.toggle-fullscreen.toggle-maximized: One of :code:`resize, toggle-fullscreen` or :code:`toggle-maximized`
unit: One of :code:`cells` or :code:`pixels` unit/choices.cells.pixels: One of :code:`cells` or :code:`pixels`
width: Integer indicating desired window width width/int: Integer indicating desired window width
height: Integer indicating desired window height height/int: Integer indicating desired window height
''' '''
short_desc = 'Resize the specified OS Windows' short_desc = 'Resize the specified OS Windows'

View File

@ -14,10 +14,10 @@ if TYPE_CHECKING:
class ResizeWindow(RemoteCommand): class ResizeWindow(RemoteCommand):
''' '''
match: Which window to resize match/str: Which window to resize
self: Boolean indicating whether to resize the window the command is run in self/bool: Boolean indicating whether to resize the window the command is run in
increment: Integer specifying the resize increment increment/int: Integer specifying the resize increment
axis: One of :code:`horizontal, vertical` or :code:`reset` axis/choices.horizontal.vertical.reset: One of :code:`horizontal, vertical` or :code:`reset`
''' '''
short_desc = 'Resize the specified windows' short_desc = 'Resize the specified windows'

View File

@ -16,11 +16,11 @@ if TYPE_CHECKING:
class ScrollWindow(RemoteCommand): class ScrollWindow(RemoteCommand):
''' '''
amount+: The amount to scroll, a two item list with the first item being \ amount+/list.scroll_amount: The amount to scroll, a two item list with the first item being \
either a number or the keywords, start and end. \ either a number or the keywords, start and end. \
And the second item being either 'p' for pages or 'l' for lines or 'u' And the second item being either 'p' for pages or 'l' for lines or 'u'
for unscrolling by lines. for unscrolling by lines.
match: The window to scroll match/str: The window to scroll
''' '''
short_desc = 'Scroll the specified windows' short_desc = 'Scroll the specified windows'

View File

@ -18,11 +18,11 @@ if TYPE_CHECKING:
class SelectWindow(RemoteCommand): class SelectWindow(RemoteCommand):
''' '''
match: The tab to open the new window in match/str: The tab to open the new window in
self: Boolean, if True use tab the command was run in self/bool: Boolean, if True use tab the command was run in
title: A title for this selection title/str: A title for this selection
exclude_active: Exclude the currently active window from the list to pick exclude_active/bool: Exclude the currently active window from the list to pick
reactivate_prev_tab: Reactivate the previously activated tab when finished reactivate_prev_tab/bool: Reactivate the previously activated tab when finished
''' '''
short_desc = 'Visually select a window in the specified tab' short_desc = 'Visually select a window in the specified tab'

View File

@ -64,12 +64,12 @@ class FocusChangedSession(SessionAction):
class SendText(RemoteCommand): class SendText(RemoteCommand):
''' '''
data+: The data being sent. Can be either: text: followed by text or base64: followed by standard base64 encoded bytes data+/send_text: The data being sent. Can be either: text: followed by text or base64: followed by standard base64 encoded bytes
match: A string indicating the window to send text to match/str: A string indicating the window to send text to
match_tab: A string indicating the tab to send text to match_tab/str: A string indicating the tab to send text to
all: A boolean indicating all windows should be matched. all/bool: A boolean indicating all windows should be matched.
exclude_active: A boolean that prevents sending text to the active window exclude_active/bool: A boolean that prevents sending text to the active window
session_id: A string that identifies a "broadcast session" session_id/internal: A string that identifies a "broadcast session"
''' '''
short_desc = 'Send arbitrary text to specified windows' short_desc = 'Send arbitrary text to specified windows'
desc = ( desc = (

View File

@ -18,15 +18,18 @@ if TYPE_CHECKING:
from kitty.cli_stub import SetBackgroundImageRCOptions as CLIOptions from kitty.cli_stub import SetBackgroundImageRCOptions as CLIOptions
layout_choices = 'tiled,scaled,mirror-tiled,clamped,configured'
class SetBackgroundImage(RemoteCommand): class SetBackgroundImage(RemoteCommand):
''' f'''
data+: Chunk of at most 512 bytes of PNG data, base64 encoded. Must send an empty chunk to indicate end of image. \ data+/image_data: Chunk of at most 512 bytes of PNG data, base64 encoded. Must send an empty chunk to indicate end of image. \
Or the special value - to indicate image must be removed. Or the special value - to indicate image must be removed.
match: Window to change opacity in match/str: Window to change opacity in
layout: The image layout layout/choices.{layout_choices.replace(",", ".")}: The image layout
all: Boolean indicating operate on all windows all/bool: Boolean indicating operate on all windows
configured: Boolean indicating if the configured value should be changed configured/bool: Boolean indicating if the configured value should be changed
''' '''
short_desc = 'Set the background image' short_desc = 'Set the background image'
@ -35,7 +38,7 @@ class SetBackgroundImage(RemoteCommand):
' 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.'
) )
options_spec = '''\ options_spec = f'''\
--all -a --all -a
type=bool-set type=bool-set
By default, background image is only changed for the currently active OS window. This option will By default, background image is only changed for the currently active OS window. This option will
@ -49,7 +52,7 @@ Change the configured background image which is used for new OS windows.
--layout --layout
type=choices type=choices
choices=tiled,scaled,mirror-tiled,clamped,configured choices={layout_choices}
How the image should be displayed. A value of :code:`configured` will use the configured value. How the image should be displayed. A value of :code:`configured` will use the configured value.

View File

@ -17,10 +17,10 @@ if TYPE_CHECKING:
class SetBackgroundOpacity(RemoteCommand): class SetBackgroundOpacity(RemoteCommand):
''' '''
opacity+: A number between 0.1 and 1 opacity+/float: A number between 0.1 and 1
match_window: Window to change opacity in match_window/str: Window to change opacity in
match_tab: Tab to change opacity in match_tab/str: Tab to change opacity in
all: Boolean indicating operate on all windows all/bool: Boolean indicating operate on all windows
''' '''
short_desc = 'Set the background opacity' short_desc = 'Set the background opacity'

View File

@ -55,12 +55,12 @@ def parse_colors(args: Iterable[str]) -> Dict[str, Optional[int]]:
class SetColors(RemoteCommand): class SetColors(RemoteCommand):
''' '''
colors+: An object mapping names to colors as 24-bit RGB integers or null for nullable colors colors+/dict.colors: An object mapping names to colors as 24-bit RGB integers or null for nullable colors
match_window: Window to change colors in match_window/str: Window to change colors in
match_tab: Tab to change colors in match_tab/str: Tab to change colors in
all: Boolean indicating change colors everywhere or not all/bool: Boolean indicating change colors everywhere or not
configured: Boolean indicating whether to change the configured colors. Must be True if reset is True configured/bool: Boolean indicating whether to change the configured colors. Must be True if reset is True
reset: Boolean indicating colors should be reset to startup values reset/bool: Boolean indicating colors should be reset to startup values
''' '''
short_desc = 'Set terminal colors' short_desc = 'Set terminal colors'

View File

@ -23,9 +23,9 @@ def layout_names() -> Iterable[str]:
class SetEnabledLayouts(RemoteCommand): class SetEnabledLayouts(RemoteCommand):
''' '''
layouts+: The list of layout names layouts+/list.str: The list of layout names
match: Which tab to change the layout of match/str: Which tab to change the layout of
configured: Boolean indicating whether to change the configured value configured/bool: Boolean indicating whether to change the configured value
''' '''
short_desc = 'Set the enabled layouts in tabs' short_desc = 'Set the enabled layouts in tabs'

View File

@ -14,9 +14,9 @@ if TYPE_CHECKING:
class SetFontSize(RemoteCommand): class SetFontSize(RemoteCommand):
''' '''
size+: The new font size in pts (a positive number) size+/float: The new font size in pts (a positive number)
all: Boolean whether to change font size in the current window or all windows all/bool: Boolean whether to change font size in the current window or all windows
increment_op: The string ``+`` or ``-`` to interpret size as an increment increment_op/choices.+.-: The string ``+`` or ``-`` to interpret size as an increment
''' '''
short_desc = 'Set the font size in the active top-level OS window' short_desc = 'Set the font size in the active top-level OS window'

View File

@ -40,11 +40,11 @@ def patch_configured_edges(opts: 'Options', s: Dict[str, Optional[float]]) -> No
class SetSpacing(RemoteCommand): class SetSpacing(RemoteCommand):
''' '''
settings+: An object mapping margins/paddings using canonical form {'margin-top': 50, 'padding-left': null} etc settings+/dict.spacing: An object mapping margins/paddings using canonical form {'margin-top': 50, 'padding-left': null} etc
match_window: Window to change paddings and margins in match_window/str: Window to change paddings and margins in
match_tab: Tab to change paddings and margins in match_tab/str: Tab to change paddings and margins in
all: Boolean indicating change paddings and margins everywhere or not all/bool: Boolean indicating change paddings and margins everywhere or not
configured: Boolean indicating whether to change the configured paddings and margins. Must be True if reset is True configured/bool: Boolean indicating whether to change the configured paddings and margins. Must be True if reset is True
''' '''
short_desc = 'Set window paddings and margins' short_desc = 'Set window paddings and margins'

View File

@ -38,9 +38,9 @@ def parse_colors(args: ArgsType) -> Dict[str, Optional[int]]:
class SetTabColor(RemoteCommand): class SetTabColor(RemoteCommand):
''' '''
colors+: An object mapping names to colors as 24-bit RGB integers. A color value of null indicates it should be unset. colors+/dict.colors: An object mapping names to colors as 24-bit RGB integers. A color value of null indicates it should be unset.
match: Which tab to change the color of match/str: Which tab to change the color of
self: Boolean indicating whether to use the tab of the window the command is run in self/bool: Boolean indicating whether to use the tab of the window the command is run in
''' '''
short_desc = 'Change the color of the specified tabs in the tab bar' short_desc = 'Change the color of the specified tabs in the tab bar'

View File

@ -16,8 +16,8 @@ if TYPE_CHECKING:
class SetTabTitle(RemoteCommand): class SetTabTitle(RemoteCommand):
''' '''
title+: The new title title+/str: The new title
match: Which tab to change the title of match/str: Which tab to change the title of
''' '''
short_desc = 'Set the tab title' short_desc = 'Set the tab title'

View File

@ -21,12 +21,12 @@ if TYPE_CHECKING:
class SetWindowLogo(RemoteCommand): class SetWindowLogo(RemoteCommand):
''' '''
data+: Chunk of at most 512 bytes of PNG data, base64 encoded. Must send an empty chunk to indicate end of image. \ data+/image_data: Chunk of at most 512 bytes of PNG data, base64 encoded. Must send an empty chunk to indicate end of image. \
Or the special value :code:`-` to indicate image must be removed. Or the special value :code:`-` to indicate image must be removed.
position: The logo position as a string, empty string means default position/str: The logo position as a string, empty string means default
alpha: The logo alpha between :code:`0` and :code:`1`. :code:`-1` means use default alpha/float: The logo alpha between :code:`0` and :code:`1`. :code:`-1` means use default
match: Which window to change the logo in match/str: Which window to change the logo in
self: Boolean indicating whether to act on the window the command is run in self/bool: Boolean indicating whether to act on the window the command is run in
''' '''
short_desc = 'Set the window logo' short_desc = 'Set the window logo'

View File

@ -15,9 +15,9 @@ if TYPE_CHECKING:
class SetWindowTitle(RemoteCommand): class SetWindowTitle(RemoteCommand):
''' '''
title: The new title title/str: The new title
match: Which windows to change the title in match/str: Which windows to change the title in
temporary: Boolean indicating if the change is temporary or permanent temporary/bool: Boolean indicating if the change is temporary or permanent
''' '''
short_desc = 'Set the window title' short_desc = 'Set the window title'

View File

@ -15,8 +15,8 @@ if TYPE_CHECKING:
class SignalChild(RemoteCommand): class SignalChild(RemoteCommand):
''' '''
signals: The signals, a list of names, such as :code:`SIGTERM`, :code:`SIGKILL`, :code:`SIGUSR1`, etc. signals/list.str: The signals, a list of names, such as :code:`SIGTERM`, :code:`SIGKILL`, :code:`SIGUSR1`, etc.
match: Which windows to send the signals to match/str: Which windows to send the signals to
''' '''
short_desc = 'Send a signal to the foreground process in the specified windows' short_desc = 'Send a signal to the foreground process in the specified windows'