mirror of
https://github.com/kovidgoyal/kitty.git
synced 2026-07-11 02:03:22 +00:00
Add clipboard_control to query_terminal
This commit is contained in:
parent
6d45a94125
commit
31da01d4df
1 changed files with 11 additions and 1 deletions
|
|
@ -87,7 +87,7 @@ class TerminalVersion(Query):
|
|||
@query
|
||||
class AllowHyperlinks(Query):
|
||||
name: str = 'allow_hyperlinks'
|
||||
help_text: str = 'yes, no or ask'
|
||||
help_text: str = 'The :opt:`setting <allow_hyperlinks>` for allowing hyperlinks can be yes, no or ask'
|
||||
|
||||
@staticmethod
|
||||
def get_result(opts: Options) -> str:
|
||||
|
|
@ -152,6 +152,16 @@ class FontSize(Query):
|
|||
return f'{opts.font_size:g}'
|
||||
|
||||
|
||||
@query
|
||||
class ClipboardControl(Query):
|
||||
name: str = 'clipboard_control'
|
||||
help_text: str = 'The :opt:`setting <clipboard_control>` for allowing reads/writes to/from the clipboard'
|
||||
|
||||
@staticmethod
|
||||
def get_result(opts: Options) -> str:
|
||||
return ' '.join(opts.clipboard_control)
|
||||
|
||||
|
||||
def get_result(name: str) -> Optional[str]:
|
||||
from kitty.fast_data_types import get_options
|
||||
q = all_queries.get(name)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue