Thanks to visit codestin.com
Credit goes to github.com

Skip to content

simple command to drag-and-drop file(s) from your terminal without a GUI or dragging.

License

Notifications You must be signed in to change notification settings

sillybanaja/drop

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

dropshowcase


Install

To install or remove drop use the provided Makefile. Simply run a make install which will install to /usr/local/bin (by default). To uninstall run make uninstall which removes drop from /usr/local/bin, you also need to make sure you have Xlib downloaded.

$ git clone https://github.com/sillybanaja/drop.git
$ cd drop
$ make install

context

I wanted a simple way to drag files from the terminal into windows that force drag-and-drop without having to open a file browser or interact with a GUI. Existing solutions like Dragon by mwh are "bloated" (written in GTK) for what I need, plus Dragon required me to physically drag the files to the target application with a gui which is not ideal.

I wrote drop in C using Xlib, which is lightweight and widely available on Unix-like systems. It takes a list of filenames as arguments and allows you to drop them onto any application that supports XDND, without requiring you to physically drag the files.

usage

The basic usage is drop filename .... Here's a example:

$ drop ~/Downloads/*.jpg file.txt /usr/local/bin/*

As you can see you can use globbing patterns like "~/Downloads/*.jpg" for example when you pass in files.

After executing the command, you can navigate to the destination window and left click where you want to drop. After you have dropped the files drop will exit. You can also press escape at any time to close the program.

note

This implementation is a little crude, but it should work with most applications that support drag-and-drop (XDND).

contributions

Pull requests and bug reports are welcome. Please keep in mind that this project is intended to remain small and focused on its core functionality.


If you found this tool helpful give it a star so others can find it.

About

simple command to drag-and-drop file(s) from your terminal without a GUI or dragging.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published