Add flag to specify drop directory for dnd kitten

This commit is contained in:
Kovid Goyal 2026-05-05 09:47:12 +05:30
parent fd7e43ab0c
commit fd451f5974
No known key found for this signature in database
GPG key ID: 06BC317B515ACE7C
2 changed files with 10 additions and 1 deletions

View file

@ -139,7 +139,12 @@ func (dnd *dnd) run_loop() (err error) {
debugprintln("dnd kitten exiting with error: ", err)
}
}()
base_dir, err := os.Getwd()
base_dir := dnd.opts.DropDest
if base_dir == "" {
base_dir, err = os.Getwd()
} else {
base_dir, err = filepath.Abs(base_dir)
}
if err != nil {
return err
}

View file

@ -20,6 +20,10 @@ it will prevent that MIME type being dropped, useful to disable accepting text/p
text/uri-list.
--drop-dest
Path to the directory in which dropped data is saved. Defaults to the current working directory.
--confirm-drop-overwrite
type=bool-set
Ask for confirmation when dropping text/uri-list data if the drop will cause any existing