Restore the --watcher command line option for backwards compat

It is now deprecated but not removed. And it now applies to all windows
not just initially created ones.
This commit is contained in:
Kovid Goyal
2021-09-29 14:18:55 +05:30
parent 166ea9deb9
commit 8be0dd0d8e
4 changed files with 38 additions and 15 deletions

View File

@@ -339,6 +339,10 @@ def _main() -> None:
opts = create_opts(cli_opts, accumulate_bad_lines=bad_lines)
init_glfw(opts, cli_opts.debug_keyboard, cli_opts.debug_rendering)
setup_environment(opts, cli_opts)
if cli_opts.watcher:
from .window import global_watchers
global_watchers.set_extra(cli_opts.watcher)
log_error('The --watcher command line option has beed deprecated infavor of using the watcher option in kitty.conf')
try:
with setup_profiling(cli_opts):
# Avoid needing to launch threads to reap zombies