mirror of
https://github.com/kovidgoyal/kitty
synced 2026-07-23 16:58:09 +02:00
Cleanup previous PR
This commit is contained in:
@@ -233,11 +233,10 @@ def list_monitors(json_output: bool = False) -> None:
|
|||||||
|
|
||||||
if json_output:
|
if json_output:
|
||||||
if has_descriptions:
|
if has_descriptions:
|
||||||
monitors_list_of_dict = [{'name': name, 'desc': desc} for name, desc in monitor_names]
|
monitors_list_of_dict = [{'name': name, 'description': desc} for name, desc in monitor_names]
|
||||||
else:
|
else:
|
||||||
monitors_list_of_dict = [{'name': name} for name, _ in monitor_names]
|
monitors_list_of_dict = [{'name': name} for name, _ in monitor_names]
|
||||||
|
json.dump(monitors_list_of_dict, sys.stdout, indent=2, sort_keys=True)
|
||||||
json.dump(monitors_list_of_dict, sys.stdout)
|
|
||||||
print()
|
print()
|
||||||
return
|
return
|
||||||
|
|
||||||
@@ -255,9 +254,8 @@ def list_monitors(json_output: bool = False) -> None:
|
|||||||
def _run_app(opts: Options, args: CLIOptions, bad_lines: Sequence[BadLine] = (), talk_fd: int = -1) -> None:
|
def _run_app(opts: Options, args: CLIOptions, bad_lines: Sequence[BadLine] = (), talk_fd: int = -1) -> None:
|
||||||
global _is_panel_kitten
|
global _is_panel_kitten
|
||||||
_is_panel_kitten = run_app.cached_values_name == 'panel'
|
_is_panel_kitten = run_app.cached_values_name == 'panel'
|
||||||
if _is_panel_kitten and run_app.layer_shell_config and run_app.layer_shell_config.output_name in ['list', 'listjson']:
|
if _is_panel_kitten and run_app.layer_shell_config and run_app.layer_shell_config.output_name in ('list', 'listjson'):
|
||||||
is_json_output = run_app.layer_shell_config.output_name == 'listjson'
|
list_monitors(run_app.layer_shell_config.output_name == 'listjson')
|
||||||
list_monitors(is_json_output)
|
|
||||||
return
|
return
|
||||||
if is_macos:
|
if is_macos:
|
||||||
global_shortcuts = set_cocoa_global_shortcuts(opts)
|
global_shortcuts = set_cocoa_global_shortcuts(opts)
|
||||||
|
|||||||
Reference in New Issue
Block a user