kitten-@-detach-window(1)
๐ kitten-@-detach-window โจ
okay so you're reading the kitten manual page for kitten-@-detach-window, and honestly? iconic choice. this one's all about yeeting windows around like they're furniture in a room makeover ๐๏ธโจ
๐ธ NAME ๐ธ
kitten-@-detach-window โ detach the specified windows and place them in a different/new tab. that's it. that's the vibe. ๐ซถ
๐ USAGE ๐
kitten @ detach-window
periodt. that's the whole synopsis, bestie ๐
๐ฆ DESCRIPTION ๐ฆ
okay so here's the tea โ โ this little cutie detaches the windows you specify and then either:
- moves them into a new tab ๐
- moves them into a new OS window ๐ช
- or adds them to the specified tab ๐ฏ
use the special value new for --target-tab to move to a new tab. and listen โ if you don't specify a target tab at all, the windows get moved to a new OS window. no cap. that's the default behavior and she does not ask first ๐
โจ OPTIONS โจ
--match,-mโ The window to match. Match specifications are of the form:field:query. Wherefieldcan be one of:id,title,pid,cwd,cmdline,num,env,var,state,neighbor,sessionandrecent.queryis the expression to match. Expressions can be either a number or a regular expression, and can be combined using Boolean operators.
The special value all matches all windows. ๐
For numeric fields: id, pid, num and recent, the expression is interpreted as a number, not a regular expression. Negative values for id match from the highest id number down โ in particular, -1 is the most recently created window. so -1 is literally the baby of the family ๐ผ
The field num refers to the window position in the current tab, starting from zero and counting clockwise (this is the same as the order in which the windows are reported by the kitten @ ls command). clockwise!! like a clock!! ๐
The window id of the current window is available as the KITTY_WINDOW_ID environment variable.
The field recent refers to recently active windows in the currently active tab, with zero being the currently active window, one being the previously active window and so on. it's giving "recently viewed" but for windows ๐
The field neighbor refers to a neighbor of the active window in the specified direction, which can be: left, right, top or bottom. ๐งญ
The field session matches windows that were created in the specified session. Use the expression ^$ to match windows that were not created in a session and . to match the currently active session and ~ to match either the currently active session or the last active session when no session is active. tiny regex, big power ๐ซ
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.
Similarly, the var field matches on user variables set on the window. You can specify name or name and value as with the env field.
The field state matches on the state of the window. Supported states are: active, focused, needs_attention, parent_active, parent_focused, focused_os_window, self, overlay_parent. Active windows are the windows that are active in their parent tab. There is only one focused window and it is the window to which keyboard events are delivered. If no window is focused, the last focused window is matched. The value focused_os_window matches all windows in the currently focused OS window. The value self matches the window in which the remote control command is run. The value overlay_parent matches the window that is under the self window, when the self window is an overlay. main character energy for real ๐
Note that you can use the kitten @ ls command to get a list of windows. v handy, save that one ๐ซถ
--target-tab,-tโ The tab to match. Match specifications are of the form:field:query. Wherefieldcan be one of:id,index,title,window_id,window_title,pid,cwd,cmdlineenv,var,state,sessionandrecent.queryis the expression to match. Expressions can be either a number or a regular expression, and can be combined using Boolean operators.
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. fallback queen ๐ธ
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.
The field session matches tabs that were created in the specified session. Use the expression ^$ to match windows that were not created in a session and . to match the currently active session and ~ to match either the currently active session or the last active session when no session is active.
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, parent_focused and focused_os_window. 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. The value focused_os_window matches all tabs in the currently focused OS window.
Note that you can use the kitten @ ls command to get a list of tabs. Use the special value new to move to a new tab. ๐โจ
--self [=no]โ Detach the window this command is run in, rather than the active window. it's giving "me, myself and i" ๐--stay-in-tab [=no]โ Keep the focus on a window in the currently focused tab after moving the specified windows. so you don't get left behind after the move, bestie ๐ ๐ซถ--help,-h [=no]โ Show help for this command. the classic. the icon. ๐
๐ GLOBAL OPTIONS ๐
--toโ An address for the kitty instance to control. Corresponds to the address given to the kitty instance via the--listen-onoption or thelisten_onsetting inkitty.conf. If not specified, the environment variableKITTY_LISTEN_ONis checked. If that is also not found, messages are sent to the controlling terminal for this process, i.e. they will only work if this process is run within a kitty window. iykyk ๐ฎ--passwordโ A password to use when contacting kitty. This will cause kitty to ask the user for permission to perform the specified action, unless the password has been accepted before or is pre-configured inkitty.conf. To use a blank password specify--use-passwordasalways. ๐ (permission slip era)--password-file [=rc-pass]โ A file from which to read the password. Trailing whitespace is ignored. Relative paths are resolved from the kitty configuration directory. Use-to read from STDIN. Usefd:numto read from the file descriptornum. Used if no--passwordis supplied. Defaults to checking for therc-passfile in the kitty configuration directory.--password-env [=KITTY_RC_PASSWORD]โ The name of an environment variable to read the password from. Used if no--password-fileis supplied. Defaults to checking the environment variableKITTY_RC_PASSWORD. ๐ฑ--use-password [=if-available]โ If no password is available, kitty will usually just send the remote control command without a password. This option can be used to force it to always or never use the supplied password. If set toalwaysand no password is provided, the blank password is used. โ ๏ธ lowkey important, read it twice
Choices: if-available, always, never
๐ real talk before you go:--target-tabwith no value means new OS window, andnewis the special value that means new tab. don't mix them up, or your windows will end up somewhere you didn't plan. ๐
๐ธ that's the whole page, bestie โ you ate that. ๐ธ
this cutie is from kitten manual, version 0.49.2, dated Oct 01, 2026. slay, go detach some windows ๐
โจ๐ซถ
๐ฆ where this page comes from
- arch rolling: kitty 0.49.2-1 ยท GPL-3.0-only
- nixpkgs unstable: kitty-bin 0.49.2
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms