mirror of
https://github.com/kovidgoyal/kitty
synced 2026-07-27 10:41:58 +02:00
Allow running panel kitten without a cmdline to run
This commit is contained in:
@@ -76,7 +76,7 @@ disappears at a key press. To do so use the following command::
|
|||||||
kitty +kitten panel --edge=top --layer=overlay --lines=15 \
|
kitty +kitten panel --edge=top --layer=overlay --lines=15 \
|
||||||
--focus-policy=exclusive --exclusive-zone=0 --override-exclusive-zone \
|
--focus-policy=exclusive --exclusive-zone=0 --override-exclusive-zone \
|
||||||
-o background_opacity=0.8 --toggle-visibility --single-instance \
|
-o background_opacity=0.8 --toggle-visibility --single-instance \
|
||||||
--instance-group=quake kitten run-shell
|
--instance-group=quake
|
||||||
|
|
||||||
Run this command in a terminal, and a quick access kitty panel will show up at
|
Run this command in a terminal, and a quick access kitty panel will show up at
|
||||||
the top of your screen. Run it again, and the panel will be hidden.
|
the top of your screen. Run it again, and the panel will be hidden.
|
||||||
|
|||||||
@@ -80,14 +80,15 @@ default=top
|
|||||||
Which edge of the screen to place the panel on. Note that some window managers
|
Which edge of the screen to place the panel on. Note that some window managers
|
||||||
(such as i3) do not support placing docked windows on the left and right edges.
|
(such as i3) do not support placing docked windows on the left and right edges.
|
||||||
The value :code:`background` means make the panel the "desktop wallpaper". This
|
The value :code:`background` means make the panel the "desktop wallpaper". This
|
||||||
is only supported on Wayland, not X11 and note that when using sway if you set
|
is not supported on X11 and note that when using sway if you set
|
||||||
a background in your sway config it will cover the background drawn using this
|
a background in your sway config it will cover the background drawn using this
|
||||||
kitten.
|
kitten.
|
||||||
Additionally, there are two Wayland only values: :code:`center` and :code:`none`.
|
Additionally, there are two more values: :code:`center` and :code:`none`.
|
||||||
The value :code:`center` anchors the panel to all sides and covers the entire
|
The value :code:`center` anchors the panel to all sides and covers the entire
|
||||||
display by default. The panel can be shrunk using the margin parameters.
|
display (on macOS the part of the display not covered by titlebar and dock) by default.
|
||||||
|
The panel can be shrunk using the margin parameters.
|
||||||
The value :code:`none` anchors the panel to the top left corner and should be
|
The value :code:`none` anchors the panel to the top left corner and should be
|
||||||
placed using the margin parameters.
|
placed and sized using the margin parameters.
|
||||||
|
|
||||||
|
|
||||||
--layer
|
--layer
|
||||||
@@ -185,7 +186,7 @@ For internal debugging use.
|
|||||||
|
|
||||||
args = PanelCLIOptions()
|
args = PanelCLIOptions()
|
||||||
help_text = 'Use a command line program to draw a GPU accelerated panel on your X11 desktop'
|
help_text = 'Use a command line program to draw a GPU accelerated panel on your X11 desktop'
|
||||||
usage = 'program-to-run'
|
usage = '[cmdline-to-run ...]'
|
||||||
|
|
||||||
|
|
||||||
def parse_panel_args(args: list[str]) -> tuple[PanelCLIOptions, list[str]]:
|
def parse_panel_args(args: list[str]) -> tuple[PanelCLIOptions, list[str]]:
|
||||||
@@ -332,8 +333,6 @@ def handle_single_instance_command(boss: BossType, sys_args: Sequence[str], envi
|
|||||||
def main(sys_args: list[str]) -> None:
|
def main(sys_args: list[str]) -> None:
|
||||||
global args
|
global args
|
||||||
args, items = parse_panel_args(sys_args[1:])
|
args, items = parse_panel_args(sys_args[1:])
|
||||||
if not items:
|
|
||||||
raise SystemExit('You must specify the program to run')
|
|
||||||
sys.argv = ['kitty']
|
sys.argv = ['kitty']
|
||||||
if args.debug_rendering:
|
if args.debug_rendering:
|
||||||
sys.argv.append('--debug-rendering')
|
sys.argv.append('--debug-rendering')
|
||||||
|
|||||||
Reference in New Issue
Block a user