Bi-directional drag and drop source / target
Key features:
- Run
dndwithout arguments and blank window with target area appears - Run
dndwith arguments, e.g.dnd file1.txt file2.html,dnd *or pipe into it likefind . -name "*.txt" | dnd file2.htmland window with both drag and drop source files & target area appears - Configure default options (flags) in
dnd.cfgfile located in the same directory as the executable or~/.config/dnd/dnd.cfg.(after installation) so you dont have to type them every time - Save different setting presets in
dnd.cfgand switch between them by running the program likednd --preset=Alt - Run
dnd --helpto see all options or look at usage below - You can quit by hitting
EscorQkey also
- GTK+ 3
- GTK+ 3 dev packages
- Nim compiler 1.6.12 - e.g. use
choosenim 1.6.12(compilation with newer versions unfortunately fails due to isuue in gintro and/or Nim compiler itself) - gintro (automatically downloaded via nimble)
You can install it via 2 methods:
- Manual (Makefile) - Nim not required (when not building)
- Nim's package manager
nimble
Download the latest release and unpack it to a folder (tar -zxf FILENAME)
To install:
make installTo uninstall:
make uninstalldndexecutable is installed to~/.local/bin/dnddnd.cfgis installed to~/.config/dnd/dnd.cfg- Desktop entry is installed to
~/.local/share/applications/dnd.desktop - Icon
dnd.xpmis installed to~/.local/share/icons/dnd.xpm
nimble install dnddndsymlink is installed to~/.nimble/bin/dndand executable to~/.nimble/pkgs/dnd-VERSION/dnddnd.cfgis installed to~/.nimble/pkgs/dnd-VERSION/dnd.cfg- Desktop entry is installed to
~/.local/share/applications/dnd.desktop-nimble uninstall dndcannot remove it automatically? - Icon
dnd.xpmis installed to~/.nimble/pkgs/dnd-VERSION/resources/dnd.xpm
dnd - bi-directional drag and drip source / target
Usage: dnd [options] [file...]
-a, --all=true Drag all files at once
-k, --keep=true Keep dropped files in for a drag out
-t, --top=true Keep the program window always on top
-c, --center-mouse=true Center the program on the mouse
-C, --center-screen=true Center the program in the middle of the screen
-f=NAME, --cfg=NAME Load a different config file
-p=NAME, --preset=NAME Load different preset from config file
-d, --decorated=true Let the program window be decorated by the window manager
-o=FLOAT, --opacity=FLOAT Change the program window opacity
-v, --version Show version info
-h, --help Show this message
Presets in current loaded dnd.cfg file:
[Default]
w = 200 # Width
h = 200 # Height
keep = false
always_on_top = true
center_mouse = false
center_screen = true
decorated = true
opacity = 1.0dnd- shows a blankdndwindow with drag-and-drop area, drag media into it and an URL/URI address is printed tostdoutdnd *- shows a drag area for every file in the folder and drop area at the bottomdnd .- shows a drag area for the current folder and drop area at the bottomdnd file1 file2- shows a drag area forfile1,file2and drop area at the bottomfind . -name "*.txt" | dnd file2.html- shows a drag area forfile.html, every file output by the pipe (everytxtfile in current folder and subfolders) and drop area at the bottomdnd | while read url; do wget "$url"; done- drag media from browser (a picture) intodnddrop area, it captures the URL address and useswgetto download the media to current folder (also inexamples/dnd_wget.sh)
Thanks to mwh and his dragon for inspiration and Dr. Stefan Salewski for help with GTK and gintro.
GNU GPL version 3
