kitten-@-screenshot(1)
okay bestie, this is the manual for kitten-@-screenshot(1), and yes the manual name is long but the energy is immaculate. π
πΈ NAME πΈ
kitten-@-screenshot β take a screenshot of a kitty OS window, tab or window. No cap.
π USAGE π
kitten @ screenshot [OUTPUT_FILE]
β¨ DESCRIPTION β¨
okay so this kitten takes a screenshot, as a PNG image, of an entire kitty OS window. Wanna restrict it to a single kitty window or tab? Use --match/--match-tab.
π¨ visibility check, bestie: the specified window/tab must be currently visible β it has to be in the active tab of its OS window, and for a window, it must not be hidden behind another window by the layout. If that's not the case, this command will fail. π
By default, the PNG image data is written to STDOUT. If you specify a file path instead, kitty itself (not this kitten process) saves the screenshot to that path. Since kitty and the kitten are typically running on the same computer, this avoids copying the (potentially large) image data over the possibly slow remote control transport. That's the whole flex. π₯
π OPTIONS π
--match,-mβ the window to match. This is your window-matching moment: match specifications are of the formfield:query, wherefieldcan be one ofid,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. periodt. - 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 beleft,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,.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 exampleenv: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 areactive,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. iykyk. π«Ά
- the special value
--match-tab,-tβ the tab to match. Match specifications are of the formfield:query, wherefieldcan be one ofid,index,title,window_id,window_title,pid,cwd,cmdline,env,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
allmatches all tabs. - for numeric fields
id,index,window_id,pidandrecent, the expression is interpreted as a number, not a regular expression. Negative values forid/window_idmatch from the highest id number down; in particular,-1is the most recently created tab/window. - when using
titleorid, 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_idandwindow_titleto match the tab that contains the window with the specified id or title. - the
indexnumber is used to match the nth tab in the currently active OS window. Therecentnumber 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
sessionmatches 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. - when using the
envfield to match on environment variables, you can specify only the environment variable name or a name and value, for exampleenv:MY_ENV_VAR=2. Tabs containing any window with the specified environment variables are matched. Similarly,varmatches tabs containing any window with the specified user variable. - the field
statematches on the state of the tab. Supported states areactive,focused,needs_attention,parent_active,parent_focusedandfocused_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 valuefocused_os_windowmatches all tabs in the currently focused OS window. - note that you can use the
kitten @ lscommand to get a list of tabs.
- the special value
--help,-h [=no]β show help for this command. simple as that. π
π GLOBAL OPTIONS π
--toβ an address for the kitty instance to control. This 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.--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.--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 toalwaysorneveruse the supplied password. If set toalwaysand no password is provided, the blank password is used.- choices:
if-available,always,never.
- choices:
with all the love from the kitten manual, version 0.49.2, dated Oct 01, 2026 β you're welcome, bestie ππ¦β¨
π¦ 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