21 个版本
| 0.4.9 | 2024 年 6 月 25 日 | 
|---|---|
| 0.4.6 | 2024 年 1 月 15 日 | 
| 0.4.5 | 2023 年 11 月 15 日 | 
| 0.3.2 | 2023 年 7 月 26 日 | 
| 0.2.1 | 2022 年 11 月 4 日 | 
#488 在 命令行工具 中排名
每月 145 次下载
32KB
641 行
什么是 ripdrag?
ripdrag 是一款允许您在终端之间拖放文件的应用程序。
它旨在与 dragon 完全兼容,同时采用现代 Rust 和 GTK4 编写。
*由于 gtk4 的限制,某些功能(如 --on-top)无法迁移
使用场景
许多应用程序期望将文件拖放到它们中。通常您需要将心爱的终端放在一边,打开文件管理器进行操作,但现在您只需输入 ripdrag FILENAME 即可完成任务。
与模糊查找器(如 fzf)结合使用 - 例如 ripdrag $(fzf) - 可以提供惊人的快速且无痛苦的终端体验。
安装
点击查看安装指南
安装所需的依赖项
Ubuntu 22.04 或更高版本
sudo apt install libgtk-4-dev build-essential curl
curl --proto '=https' --tlsv1.3 https://sh.rustup.rs -sSf | sh
Fedora\CentOS\RHEL
sudo dnf install cargo gdk-pixbuf2-devel pango-devel graphene-devel cairo-gobject-devel cairo-devel python2-cairo-devel gtk4-devel
Arch Linux
ripdrag 在 AUR 上: ripdrag-git
如果您想手动安装,则需要安装以下依赖项
sudo pacman -Sy --needed rust gtk4 base-devel
MacOS
您需要安装 homebrew。
brew install rustup gtk4
rustup-init
NetBSD
官方仓库中提供了预编译的二进制文件。要安装,只需运行:
pkgin install ripdrag
安装二进制文件
(如果您不想将其安装在根目录下,请不要使用 sudo)
cargo install ripdrag
将 cargo 添加到路径
(默认情况下不会添加)
PATH=$PATH:~/.cargo/bin
使用方法
Usage: ripdrag [OPTIONS] [PATH]...
Arguments:
  [PATH]...  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
  -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
  -n, --no-click                 Don't open files on click
  -b, --basename                 Always show basename of each file
  -h, --help                     Print help
  -V, --version                  Print version
TODO
还有很多事情要做!主要是
- 清理代码
- pacman、deb、rpm、windows 和 macos 构建脚本
- 自动构建
请随时贡献 ;)
依赖项
~17–26MB
~474K SLoC