From fd451f5974f5be5d1d4baec991de2970727652bc Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Tue, 5 May 2026 09:47:12 +0530 Subject: [PATCH] Add flag to specify drop directory for dnd kitten --- kittens/dnd/main.go | 7 ++++++- kittens/dnd/main.py | 4 ++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/kittens/dnd/main.go b/kittens/dnd/main.go index 3e42a3630..213f04f28 100644 --- a/kittens/dnd/main.go +++ b/kittens/dnd/main.go @@ -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 } diff --git a/kittens/dnd/main.py b/kittens/dnd/main.py index fcb8dd0a3..b0840298a 100644 --- a/kittens/dnd/main.py +++ b/kittens/dnd/main.py @@ -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