You are not logged in.
I downloaded dragdrop.txt from here: https://github.com/jarun/nnn/blob/maste … s/dragdrop
I placed it in ~/.config/nnn/plugins and assigned the "d" key to it. I can press ";" and "d" shows up as a valid key. When I press "d", it doesn't do anything. I've also tried pressing "Enter" and selecting dragdrop.txt, but that doesn't do anything either.
I wondered if this could be an issue with dragon. I'm pretty sure I installed dragon correctly, since there's a "dragon" file in ~/.local/bin. It says I should be able to run "dragon --target", but it says "command not found." Is there something else I need to install or do?
Last edited by TySpicer (2025-09-27 15:30:28)
Offline
(Does replying bump, so people can see this?)
Still not sure what to do here. I'm assuming this is an issue with dragon. I tried typing "dragon" into the terminal, and it says "command not found."
Update - I figured out that I can cd into `~/.local/bin`, and run `./dragon path/to/file.png`. It looks like this works, so there shouldn't be any issues with dragon itself. I thought about writing an alias to run this from anywhere, but I quickly realized I don't know how to `./` without being in that folder (or a parent folder). Either way, I'm not sure if an alias would help this work in nnn.
Maybe I need to alter the plugin file `dragdrop.txt` so it knows where to find the `dragon` executable?
What else can I try?
Offline
https://github.com/jarun/nnn/blob/b8110 … agdrop#L30
dnd=${HOME}/.local/bin/dragon
Alternatively extend your $PATH variable to include $HOME/.local/bin
https://wiki.archlinux.org/title/Enviro … s#Examples
Last edited by seth (2025-09-26 07:15:20)
Offline
Are you saying to add the line
dnd=${HOME}/.local/bin/dragon
to `dragdrop.txt`? Line 30 looks like it's in-between an if-else statement and the `add_file` function. Should I add this line in the if-else statement? Are you pointing to the if-else statement, or something else?
Offline
Yes, the gist is to make sure the variable ends up pointing there.
Overmore, I'm not do sure about the ".txt" suffix which sounds like something your browser might have added there (ie. idk whether that plugin is currently used at all - i've no experience w/ nnn)
Offline
I got it to work! In the else-if structure before line 30, I changed all three of the `dnd=...` lines to
dnd=~/.local/bin/dragon
I changed the extension to `.sh` instead of `.txt`. Lastly, I ran
chmod +x dragdrop.sh
to make the file executable (I think the * keybind in nnn does this, but I used the terminal command just in case). With those changes, it works!
Thanks for the help!
Offline