kitten-@-launch(1) | kitten Manual | kitten-@-launch(1) |
kitten-@-launch - Run an arbitrary process in a new window/tab
kitten @ launch [CMD ...] |
Prints out the id of the newly opened window. Any command line arguments are assumed to be the command line used to run in the new window, if none are provided, the default shell is run. For example::
kitten @ launch --title=Email mutt
The special value all matches all tabs.
For numeric fields: id, index, window_id, pid and recent, the expression is interpreted as a number, not a regular expression. Negative values for id/window_id match from the highest id number down, in particular, -1 is the most recently created tab/window.
When using title or id, first a matching tab is looked for, and if not found a matching window is looked for, and the tab for that window is used.
You can also use window_id and window_title to match the tab that contains the window with the specified id or title.
The index number is used to match the nth tab in the currently active OS window. The recent number matches recently active tabs in the currently active OS window, with zero being the currently active tab, one the previously active tab and so on.
When using the env field to match on environment variables, you can specify only the environment variable name or a name and value, for example, env:MY_ENV_VAR=2. Tabs containing any window with the specified environment variables are matched. Similarly, var matches tabs containing any window with the specified user variable.
The field state matches on the state of the tab. Supported states are: active, focused, needs_attention, parent_active and parent_focused. Active tabs are the tabs that are active in their parent OS window. There is only one focused tab and it is the tab to which keyboard events are delivered. If no tab is focused, the last focused tab is matched.
Note that you can use the kitten @ ls command to get a list of tabs.
window
A new kitty window in the current tab
tab
A new tab in the current OS window
os-window
A new operating system window
overlay
An overlay window covering the current active kitty window
overlay-main
An overlay window covering the current active kitty window. Unlike a
plain overlay window, this window is considered as a main window which
means it is used as the active window for getting the current working
directory, the input text for kittens, launch commands, etc. Useful if
this overlay is intended to run for a long time as a primary window.
background
The process will be run in the background, without a kitty window. Note
that if --allow-remote-control is specified the
KITTY_LISTEN_ON environment variable will be set to a dedicated
socket pair file descriptor that the process can use for remote
control.
clipboard, primary
These two are meant to work with --stdin-source to copy data to the
system clipboard or primary selection.
Choices: window, background, clipboard, os-window, overlay, overlay-main, primary, tab
Choices: default, after, before, first, hsplit, last, neighbor, split, vsplit
* Splits layout: The bias is interpreted as a percentage between 0 and 100. When splitting a window into two, the new window will take up the specified fraction of the space alloted to the original window and the original window will take up the remainder of the space.
* Vertical/horizontal layout: The bias is interpreted as adding/subtracting from the normal size of the window. It should be a number between -90 and 90. This number is the percentage of the OS Window size that should be added to the window size. So for example, if a window would normally have been size 50 in the layout inside an OS Window that is size 80 high and --bias -10 is used it will become *approximately* size 42 high. Note that sizes are approximations, you cannot use this method to create windows of fixed sizes.
* Tall layout: If the window being created is the *first* window in a column, then the bias is interpreted as a percentage, as for the splits layout, splitting the OS Window width between columns. If the window is a second or subsequent window in a column the bias is interpreted as adding/subtracting from the window size as for the vertical layout above.
* Fat layout: Same as tall layout except it goes by rows instead of columns.
* Grid layout: The bias is interpreted the same way as for the Vertical and Horizontal layouts, as something to be added/subtracted to the normal size. However, the since in a grid layout there are rows *and* columns, the bias on the first window in a column operates on the columns. Any later windows in that column operate on the row. So, for example, if you bias the first window in a grid layout it will change the width of the first column, the second window, the width of the second column, the third window, the height of the second row and so on.
The bias option was introduced in kitty version 0.36.0.
--remote-control-password '"my passphrase" get-*
set-colors'
This password will be in effect for this window only. Note that any passwords you have defined for remote_control_password in kitty.conf are also in effect. You can override them by using the same password here. You can also disable all remote_control_password global passwords for this window, by using::
--remote-control-password '!'
This option only takes effect if --allow-remote-control is also specified. Can be specified multiple times to create multiple passwords. This option was added to kitty in version 0.26.0
@selection
is the currently selected text.
@screen
is the contents of the currently active window.
@screen_scrollback
is the same as @screen, but includes the scrollback buffer as well.
@alternate
is the secondary screen of the current active window. For example if you
run a full screen terminal application, the secondary screen will be the
screen you return to when quitting the application.
@first_cmd_output_on_screen
is the output from the first command run in the shell on screen.
@last_cmd_output
is the output from the last command run in the shell.
@last_visited_cmd_output
is the first output below the last scrolled position via
scroll_to_prompt, this needs shell integration to work.
Choices: none, @alternate, @alternate_scrollback, @first_cmd_output_on_screen, @last_cmd_output, @last_visited_cmd_output, @screen, @screen_scrollback, @selection
Choices: normal, fullscreen, maximized, minimized
--color background=white --color foreground=red
Choices: if-available, always, never
January 18, 2025 | 0.39.0 |