kitten-@-focus-tab(1)

🎯 NAME

kitten-@-focus-tab β€” the kitten remote-control move that focuses the tab you tell it to, bestie πŸ’…

(this is a page from the kitten manual, in case the header didn't already give that away 🫢)


✨ USAGE ✨

kitten @ focus-tab

πŸ’– DESCRIPTION πŸ’–

Okay so here's the tea: the active window inside the tab you specify gets focused. That's it. That's the whole vibe. The tab you point at becomes the one your keyboard is talking to. πŸ’«


πŸŽ€ OPTIONS πŸŽ€

  • --match, -m β€” the tab to match, obvi. Match specs look like field:query where field can be one of: id, index, title, window_id, window_title, pid, cwd, cmdline, env, var, state, session and recent. And query is the expression you're matching on. Expressions can be a number or a regular expression, and yes you can combine them with Boolean operators, go off πŸ”₯

The special value all matches all tabs. all of them. every single one.

For the 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, and in particular, -1 is the most recently created tab/window. Counting backwards is iconic, ngl.

When you use title or id, first a matching tab is looked for, and if that's not found a matching window is looked for, and then the tab for that window is used. Two-step search, she's thorough πŸ’…

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 matches the *n*th tab in the currently active OS window. The recent number matches recently active tabs in the currently active OS window β€” zero is the currently active tab, one is the previously active tab, and so on down the line. LIFO energy fr fr.

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, . to match the currently active session, and ~ to match either the currently active session or the last active session when no session is active. Cute little trio, honestly 🌸

When you're using the env field to match on environment variables, you can specify just the environment variable name, or a name and value, like for example env:MY_ENV_VAR=2. Tabs containing any window with the specified environment variables get matched. Similarly, var matches tabs containing any window with the specified user variable. 🧚

The field state matches on the state of the tab. The 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 ever one focused tab and it's the tab that keyboard events get delivered to. If no tab is focused, the last focused tab is matched. And the value focused_os_window matches all tabs in the currently focused OS window. πŸ‘‘

Little note from the original: you can use the kitten @ ls command to get a list of tabs. Very handy, highly recommend, no cap.
  • --no-response [=no] β€” don't wait for a response telling you whether the action succeeded. ⚠️ Heads up though: using this option means you will not be notified of failures. You're basically saying "idc just do it" and walking away. Bold. πŸ’€
  • --help, -h [=no] β€” show help for this command. The classic. 🫢

🌈 GLOBAL OPTIONS 🌈

  • --to β€” an address for the kitty instance to control. It corresponds to the address given to the kitty instance via the --listen-on option or the listen_on setting in kitty.conf. If it's not specified, the environment variable KITTY_LISTEN_ON gets checked. And if that's also not found, messages are sent to the controlling terminal for this process β€” meaning they'll only work if this process is run within a kitty window. Chain of custody, basically. πŸ”—
  • --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 already been accepted before or is pre-configured in kitty.conf. And to use a blank password, specify --use-password as always. Respect the gatekeeping πŸ’…
  • --password-file [=rc-pass] β€” a file to read the password from. Trailing whitespace gets ignored (she doesn't care about your messy edges). Relative paths are resolved from the kitty configuration directory. Use - to read from STDIN. Use fd:num to read from the file descriptor num. This gets used if no --password is supplied. Defaults to checking for the rc-pass file 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-file is supplied. Defaults to checking the environment variable KITTY_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 it's set to always and no password is provided, the blank password is used. 😌

Choices: if-available, always, never


okay that's the whole page, you're officially a focus-tab girlie now, go forth and focus 🌟

πŸ’œ signed off from kitten version 0.49.2, dated Oct 01, 2026 β€” mwah, love u, see u in the group chat πŸŽ€
πŸ“¦ where this page comes from