mirror of
https://github.com/kovidgoyal/kitty
synced 2026-07-25 17:52:02 +02:00
Add flag to specify drop directory for dnd kitten
This commit is contained in:
@@ -139,7 +139,12 @@ func (dnd *dnd) run_loop() (err error) {
|
|||||||
debugprintln("dnd kitten exiting with error: ", err)
|
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 {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -20,6 +20,10 @@ it will prevent that MIME type being dropped, useful to disable accepting text/p
|
|||||||
text/uri-list.
|
text/uri-list.
|
||||||
|
|
||||||
|
|
||||||
|
--drop-dest
|
||||||
|
Path to the directory in which dropped data is saved. Defaults to the current working directory.
|
||||||
|
|
||||||
|
|
||||||
--confirm-drop-overwrite
|
--confirm-drop-overwrite
|
||||||
type=bool-set
|
type=bool-set
|
||||||
Ask for confirmation when dropping text/uri-list data if the drop will cause any existing
|
Ask for confirmation when dropping text/uri-list data if the drop will cause any existing
|
||||||
|
|||||||
Reference in New Issue
Block a user