From a39b7eb7dda4d0b67b595a90252f1a4a8690b4f4 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Tue, 13 May 2025 11:52:52 +0530 Subject: [PATCH] Quick access terminal: Allow configuring the monitor to display the panel on in Wayland/X11 Fixes #8630 --- docs/changelog.rst | 2 ++ kittens/quick_access_terminal/main.go | 3 +++ kittens/quick_access_terminal/main.py | 7 +++++++ 3 files changed, 12 insertions(+) diff --git a/docs/changelog.rst b/docs/changelog.rst index 1b4ee5e2d..88708f504 100644 --- a/docs/changelog.rst +++ b/docs/changelog.rst @@ -117,6 +117,8 @@ Detailed list of changes - Quick access terminal: Allow toggling the window to full screen and map using the standard kitty :sc:`toggle_fullscreen` shortcut (:iss:`8626`) +- Quick access terminal: Allow configuring the monitor to display the panel on in Wayland/X11 (:iss:`8630`) + - A new setting :opt:`remember_window_position` to optionally use the position of the last closed kitty OS Window as the position of the first kitty OS Window when running a new kitty instance (:pull:`8601`) diff --git a/kittens/quick_access_terminal/main.go b/kittens/quick_access_terminal/main.go index be9ba1727..4fe3329a9 100644 --- a/kittens/quick_access_terminal/main.go +++ b/kittens/quick_access_terminal/main.go @@ -66,6 +66,9 @@ func main(cmd *cli.Command, opts *Options, args []string) (rc int, err error) { argv = append(argv, fmt.Sprintf("--override=background_opacity=%f", conf.Background_opacity)) if runtime.GOOS != "darwin" { argv = append(argv, fmt.Sprintf("--app-id=%s", conf.App_id)) + if conf.Output_name != "" { + argv = append(argv, fmt.Sprintf("--output-name=%s", conf.Output_name)) + } } argv = append(argv, fmt.Sprintf("--focus-policy=%s", conf.Focus_policy)) if conf.Start_as_hidden { diff --git a/kittens/quick_access_terminal/main.py b/kittens/quick_access_terminal/main.py index 52052aa27..e1c4a11ba 100644 --- a/kittens/quick_access_terminal/main.py +++ b/kittens/quick_access_terminal/main.py @@ -69,6 +69,13 @@ opt('app_id', f'{appname}-quick-access', long_text='The Wayland APP_ID assigned to the quick access window (Linux only)') + +opt('output_name', '', long_text=''' +On Wayland or X11, the panel can only be displayed on a single monitor (output) at a time. This allows +you to specify which output is used, by name. If not specified the compositor will choose an +output automatically, typically the last output the user interacted with or the primary monitor. +''') + opt('start_as_hidden', 'no', option_type='to_bool', long_text='Whether to start the quick access terminal hidden. Useful if you are starting it as part of system startup.')