kitten-@-close-window(1)
π kitten-@-close-window(1) β the kitten Manual, bestie edition β¨
okay so this is a page from the kitten manual, and it's about yeeting windows into the void. no cap, it's a tiny page but the --match option is doing the absolute most, so let's get into it π
β¨ Name β¨
kitten-@-close-window β closes the windows you tell it to close π
π¦ Usage π¦
kitten @ close-window
that's it. that's the whole mood π«Ά
πΈ Description πΈ
Close the specified windows π (yes, plural β you can absolutely catch more than one at a time, iykyk)
π Options π
--match,-mβ which window(s) you're matching, bestie. match specs go like this:field:query. the field can be one of:id,title,pid,cwd,cmdline,num,env,var,state,neighbor,sessionandrecent. the query is the expression you match against β expressions can be a number or a regular expression, and (iconic) you can combine them with Boolean operators π₯
the special value all matches all windows. every single one. no survivors, periodt.
for the numeric fields β id, pid, num and recent β the expression is read as a number, not a regular expression. negative values for id match from the highest id number down, and specifically -1 is the most recently created window π
the field num is the window's position in the current tab, starting from zero and counting clockwise (same order the windows get reported by kitten @ ls, so you know it's legit).
the window id of the current window is hanging out in the KITTY_WINDOW_ID environment variable, in case you need it π
the field recent is about recently active windows in the currently active tab: 0 is the currently active window, 1 is the previously active window, and so on down the line π°οΈ
the field neighbor is a neighbor of the active window in whatever direction you specify, 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, . 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 you're using the env field to match on environment variables, you can give just the environment variable name, or a name and value, like for example env:MY_ENV_VAR=2 π
same energy for the var field, except it matches on user variables set on the window β you can specify name, or name and value, exactly like with the env field π
the field state matches on the state of the window. the supported states are: active, focused, needs_attention, parent_active, parent_focused, focused_os_window, self, overlay_parent. so: active windows are the windows that are active in their parent tab. there's only one focused window and it's the window that keyboard events get delivered to β if no window is focused, the last focused window is what gets matched. the value focused_os_window matches all windows in the currently focused OS window. the value self matches the window the remote control command is run in. and the value overlay_parent matches the window that's under the self window, when the self window is an overlay π
little tip from the manpage itself: you can use the kitten @ ls command to get a list of windows π
--no-response [=no]β don't wait for a response saying whether the action worked. lowkey be careful here β using this option means you will not be notified of failures π--self [=no]β close the window this command is run in, instead of the active window πͺβ¨--ignore-no-match [=no]β don't return an error if nothing matched, so no windows get closed and nobody throws a fit π--help,-h [=no]β show help for this command π«Ά
π Global options π
these ones are shared across the remote control commands, so they show up everywhere π«
--toβ an address for the kitty instance you want to control. it corresponds to the address given to the kitty instance via the--listen-onoption or thelisten_onsetting inkitty.conf. if you don't specify it, the environment variableKITTY_LISTEN_ONgets checked. if that's not found either, messages get sent to the controlling terminal for this process β meaning they'll only work if this process is run inside a kitty window π±--passwordβ a password to use when contacting kitty. this makes kitty ask the user for permission to perform the specified action, unless the password was already accepted before or is pre-configured inkitty.conf. to use a blank password, specify--use-passwordasalwaysπ--password-file [=rc-pass]β a file to read the password from. trailing whitespace is ignored. relative paths are resolved from the kitty configuration directory. use-to read from STDIN. usefd:numto read from the file descriptor num. this is 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 forces it to always or never use the supplied password. if set toalwaysand no password is provided, the blank password gets used π«
choices: if-available, always, never
and that's the whole page, bestie β you ate that π version 0.49.2, dated Oct 01, 2026, straight from the kitten Manual. go close some windows, you absolute icon ππ
π¦ 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