Git Product home page Git Product logo

ripdrag's Introduction

What is ripdrag?

Crates.io GitHub top language Crates.io

ripdrag is an application that lets you drag and drop files from and to the terminal.

It's designed to be feature to feature* compatible with dragon, while being written in modern Rust and GTK4.

Example.mp4

*some features like --on-top can't be ported over because of limitations in gtk4

Use cases

Many applications expect files to be dragged into them. Normally you would have to put your beloved terminal aside and open a file manager to that, but now you can just type ripdrag FILENAME and be done.

Used in combination with a fuzzy finder like fzf - e.g. ripdrag $(fzf) - can make for an amazingly quick and painless terminal experience.

Installation

Install the required dependencies

Ubuntu 22.04 or later

sudo apt install cargo libgtk-4-dev build-essential

Fedora\CentOS\RHEL

sudo dnf install cargo gdk-pixbuf2-devel pango-devel graphene-devel cargo-devel cairo-gobject-devel cairo-devel python2-cairo-devel gtk4-devel

Arch Linux

sudo pacman -Sy --needed rust gtk4 base-devel

NetBSD

A pre-compiled binary is available from the official repositories. To install it simply run,

pkgin install ripdrag

Install the binary (Do not use sudo, if you don't want it to be installed on root)

cargo install ripdrag

Add cargo to path (Not added by default)

PATH=$PATH:~/.cargo/bin

Usage

USAGE:
    ripdrag [OPTIONS] [PATHS]...

ARGS:
    <PATHS>...    Paths to the files you want to drag

OPTIONS:
    -v, --verbose                  Be verbose
    -t, --target                   Act as a target instead of source
    -k, --keep                     With --target, keep files to drag out
    -p, --print-path               With --target, keep files to drag out
    -r, --resizable                Make the window resizable
    -x, --and-exit                 Exit after first successful drag or drop
    -i, --icons-only               Only display icons, no labels
    -d, --disable-thumbnails       Don't load thumbnails from images
    -s, --icon-size <SIZE>         Size of icons and thumbnails [default: 32]
    -W, --content-width <WIDTH>    Min width of the main window [default: 360]
    -H, --content-height <HEIGHT>  Default height of the main window [default: 360]
    -I, --from-stdin               Accept paths from stdin
    -a, --all                      Drag all the items together
    -A, --all-compact              Show only the number of items and drag them together
    -h, --help                     Print help information
    -V, --version                  Print version information

TODO

There are still lots of thing to be done! Mainly:

  • clean up code
  • pacman, deb, rpm, windows and macos build scripts
  • automated builds

Feel free to contribute ;)

ripdrag's People

Contributors

nik012003 avatar matthiasbeyer avatar fqqf avatar txtyash avatar tranzystorekk avatar 0323pin avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.