kitten-@-focus-window(1)
π kitten-@-focus-window π
welcome to the kitten-@-focus-window(1) page from the kitten Manual β itβs giving remote-control realness, and weβre gonna walk through every little flag together. π«Ά
β¨ NAME β¨
kitten-@-focus-window β focuses the specified window, bestie. Thatβs the whole vibe. π
π USAGE π
run it like this, no cap:
kitten @ focus-window
π¦ DESCRIPTION π¦
It focuses the specified window. If no window is specified, it focuses the window this command is run inside. Simple as that, icon. π
π OPTIONS π
okay so hereβs the option menu, and yes, weβre covering every single one:
--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
allmatches all windows. - For numeric fields:
id,pid,numandrecent, the expression is interpreted as a number, not a regular expression. Negative values foridmatch from the highest id number down, in particular,-1is the most recently created window. - The field
numrefers 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 thekitten @ lscommand). - The window id of the current window is available as the
KITTY_WINDOW_IDenvironment variable. - The field
recentrefers 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. - The field
neighborrefers to a neighbor of the active window in the specified direction, which can be:left,right,toporbottom. - The field
sessionmatches 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. - When using the
envfield 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
varfield matches on user variables set on the window. You can specify name or name and value as with theenvfield. - The field
statematches 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 valuefocused_os_windowmatches all windows in the currently focused OS window. The valueselfmatches the window in which the remote control command is run. The valueoverlay_parentmatches the window that is under theselfwindow, when theselfwindow is an overlay. - Note that you can use the
kitten @ lscommand to get a list of windows.
- The special value
--no-response [=no]β donβt wait for a response from kitty. This means that even if no matching window is found, the command will exit with a success code. so chill of it. π--help,-h [=no]β show help for this command. the classic βhelp me help youβ moment. β
π GLOBAL OPTIONS π
these are the global-options bits, bestie β connection and password business, all here:
--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 energy, honestly. π--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. the default is literally right there. π--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. env-var girlies rise. π--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.- Choices:
if-available,always,never. pick your fighter. π
- Choices:
this page is from the kitten Manual, version 0.49.2, dated Oct 01, 2026 β bye bestie, ily! π
π¦ 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