Home

A better drag and drop workflow

Written on 2020-05-24

One of my many gripes with modern GUIs is their workflow for selecting files. They often require either using a clunky file picker or using drag and drop from a GUI file manager. I find both options very slow and annoying.

To scratch this itch, I wrote dragcli (source / Linux binary). It's a simple command line tools that selects the files passed as arguments.

Here is an excerpt of my lfrc showcasing how I integrate it into my workflow:

map f ${{
    selected="$(fzf)"
    [ -d "$selected" ] && cmd=cd || cmd=select
    lf -remote "send $id $cmd '$selected'"
}}
map w &dragcli $fx
My workflow currently looks like this:
  1. Hit my keybind to spawn lf in a new terminal
  2. Press f to jump to the relevant file/directory with fzf
  3. If I want to select multiple files, select them
  4. Hit w to initiate the drag operation
  5. Click on the target dialog
No more clicking around to select files! I find this especially useful for uploading files to web services and importing audio files in my digital audio workstation.