.\" Man page generated from reStructuredText .\" by the Docutils 0.22.4 manpage writer. . . .nr rst2man-indent-level 0 . .de1 rstReportMargin \\$1 \\n[an-margin] level \\n[rst2man-indent-level] level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] - \\n[rst2man-indent0] \\n[rst2man-indent1] \\n[rst2man-indent2] .. .de1 INDENT .\" .rstReportMargin pre: . RS \\$1 . nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin] . nr rst2man-indent-level +1 .\" .rstReportMargin post: .. .de UNINDENT . RE .\" indent \\n[an-margin] .\" old: \\n[rst2man-indent\\n[rst2man-indent-level]] .nr rst2man-indent-level -1 .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] .in \\n[rst2man-indent\\n[rst2man-indent-level]]u .. .TH "kitten-dnd" 1 "May 28, 2026" "0.47.1" "kitty" .SH Name kitten-dnd \- Perform drag and drop operations, even over SSH .SH Overview .sp \fIDrag and drop of files from the shell\fP .sp The \fBdnd\fP kitten can be used to drag and drop files between the shell and arbitrary GUI programs, it even works over SSH, so you can easily and seamlessly transfer files from one computer to another, simply by dragging from one kitty window to another. Using it is as simple as: .INDENT 0.0 .INDENT 3.5 .sp .EX kitten dnd file\-to\-drag.xyz .EE .UNINDENT .UNINDENT .sp Then, start dragging with the mouse inside the window, and \fBfile\-to\-drag.xyz\fP will be dragged and you can drop it onto a GUI file manager or another window running this kitten. You can specify directories as well to drag entire trees. .sp Similarly, dropping works by running the kitten: .INDENT 0.0 .INDENT 3.5 .sp .EX kitten dnd .EE .UNINDENT .UNINDENT .sp Then, drag some files from a GUI file manager or another window running the dnd kitten and drop them onto this window. The files will be copied or moved (depending on which area you drop them) into the current working directory. .sp The best part is this works even over SSH. So if you just want to quickly transfer some files from one computer to another all you need to so is ssh into the remote computer: .INDENT 0.0 .INDENT 3.5 .sp .EX kitten ssh remote\-computer\-name .EE .UNINDENT .UNINDENT .sp Then, run the dnd kitten on the remote computer: .INDENT 0.0 .INDENT 3.5 .sp .EX kitten dnd files\-or\-dirs\-to\-drag .EE .UNINDENT .UNINDENT .sp That\(aqs it, you can now drag form or drop to the remote computer. See below for customising the behavior of the kitten via command line flags. .sp This kitten uses a new protocol developed by kitty to function, for details, see The Drag and Drop protocol \%<>\&. .SH Source code for dnd .sp The source code for this kitten is available on GitHub \%\&. .SH Command line interface .INDENT 0.0 .INDENT 3.5 .sp .EX kitten dnd [options] [files to drag] .EE .UNINDENT .UNINDENT .sp Perform drag and drop operations, even over SSH. .sp Any arguments on the command line are assumed to be files and directories to drag. They will be dragged as the text/uri\-list MIME type which can then be dropped into any file manager or similar program to copy the files. .sp If the text/uri\-list MIME type is dropped onto this window, the files and directories in it are copied into the current working directory. When dragging from this window, if a move operation is performed when dropping and the drop is to a remote machine, the files and directories to drag and deleted. .sp If data is present on STDIN it is set as text/plain when dragging, unless text/plain is specified via \-\-drag. Any text/plain data that is dropped onto this window is output to STDOUT, if STDOUT is connected to a file, otherwise it is discarded. .sp Press the Esc or Ctrl+C keys to quit the kitten at any time, cancelling any in progress drag. .SS Options .INDENT 0.0 .TP .B \-\-drag When starting a drag, use the specified file as the data source for the specified MIME type. Syntax is: mime\-type:path/to/file. For example image/jpeg:mypic.jpg Can be specified multiple times to drag multiple MIME types. .UNINDENT .INDENT 0.0 .TP .B \-\-drop When receiving a drop, use the specified file as the data destination for the specified MIME type. Syntax is: mime\-type:path/to/file. For example image/jpeg:mypic.jpg Can be specified multiple times to enable receiving multiple MIME types. If no path is specified, it will prevent that MIME type being dropped, useful to disable accepting text/plain and text/uri\-list. .UNINDENT .INDENT 0.0 .TP .B \-\-drop\-dest Path to the directory in which dropped data is saved. Defaults to the current working directory. .UNINDENT .INDENT 0.0 .TP .B \-\-confirm\-drop\-overwrite [=no] Ask for confirmation when dropping text/uri\-list data if the drop will cause any existing files to be overwritten. Note that confirmation is asked only for actual file conflicts, non conflicting files are automatically created. .UNINDENT .INDENT 0.0 .TP .B \-\-drop\-anywhere Allow dropping anywhere, not just on the Copy or Move drop regions. Dropping anywhere will perform the specified action. Default: \fBdisallowed\fP Choices: \fBcopy\fP, \fBdisallowed\fP, \fBmove\fP .UNINDENT .INDENT 0.0 .TP .B \-\-drag\-thumbnail Path to an image to use as the drag icon when starting a drag. Must be in PNG/JPEG/GIF/WEBP formats. Other formats will require the presence of ImageMagick on the system to load the image. If not specified, an image is derived based on the data being dragged. .UNINDENT .INDENT 0.0 .TP .B \-\-drag\-thumbnail\-size The thumbnail size for the image used as the drag icon. Images larger than this size are downscaled. Note that the terminal may reject the drag if the image is too large. Default: \fB512\fP .UNINDENT .INDENT 0.0 .TP .B \-\-exit\-on A comma separated list of events to exit on. Possible events are \fBdrag\-finish\fP, \fBdrop\-finish\fP and \fBesc\-key\fP\&. The first two events refer to a successful completion of a drag or a drop respectively. \fBesc\-key\fP means press the \fBEsc\fP key. Default: \fBesc\-key\fP .UNINDENT .SH Author Kovid Goyal .SH Copyright 2026, Kovid Goyal .\" End of generated man page.