Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

qt-dropbox

An always-on-top, usually-invisible KDE/X11 drop zone (Qt).

  • Sits in the bottom-right of the configured monitor.
  • Hold Win+Ctrl to fade in (~20% opacity).
  • Drag-and-drop from file manager or browser:
    • local files are saved as <sha1><ext> (dedupe by content; skips if already exists)
    • web drops (http(s) / data:) are downloaded/saved and deduped
  • Press Win+Ctrl+V (while holding Win+Ctrl) to save the clipboard (image/URL/text).
  • Runs a systray icon with menu + settings.

Requirements

  • X11 session (not Wayland)
  • A StatusNotifier host for the tray icon (KDE works out of the box; GNOME needs an extension)
  • Build tools: CMake (>= 3.20) + a C++17 compiler
  • Qt development packages (Qt 6 preferred; Qt 5 also works): Core, Gui, Widgets, Network
  • X11 development libs: Xlib + Xext

Package install examples:

# Ubuntu/Debian
sudo apt install -y cmake build-essential \
  qt6-base-dev || sudo apt install -y qtbase5-dev \
  libx11-dev libxext-dev

# Fedora
sudo dnf install -y cmake gcc-c++ \
  qt6-qtbase-devel || sudo dnf install -y qt5-qtbase-devel \
  libX11-devel libXext-devel

# Arch
sudo pacman -S --needed cmake base-devel \
  qt6-base || sudo pacman -S --needed qt5-base \
  libx11 libxext

Build / Run

cmake -S qt-dropbox -B qt-dropbox-build -DCMAKE_BUILD_TYPE=Release
cmake --build qt-dropbox-build
./qt-dropbox-build/qt-dropbox

Install to ~/.local:

cmake --install qt-dropbox-build --prefix ~/.local

Autostart on login (KDE/GNOME/etc):

mkdir -p ~/.config/autostart
cp ~/.local/share/applications/qt-dropbox.desktop ~/.config/autostart/

Options:

./qt-dropbox-build/qt-dropbox --output-dir ./data --width 200 --height 400 --opacity 0.20

Qt config file:

  • Default: ~/.config/qt-dropbox/config.ini
  • Override path: ./qt-dropbox-build/qt-dropbox --config /path/to/config.ini
  • Open config from tray menu or --open-config

Qt hotkeys:

  • Hold Win+Ctrl to show the drop box.
  • While holding Win+Ctrl, press V to save the clipboard.
  • Use the tray menu Always Visible to keep it visible without holding keys.

Qt options:

  • Tray toggle Organize into subfolders saves into <outputDir>/<category>/...
  • When organizing, files are always sharded like git to keep folders small: <outputDir>/<category>/<sha1[0:2]>/<sha1[2:4]>/<sha1><ext>
  • Multiple Profiles are supported (tray menu + settings). Each profile has its own outputDir.
  • Files are saved as <sha1><ext>; if the file already exists, it is skipped.
  • Tray menu Settings… edits output dir, size, opacity, fade, and toggles.
  • Monitor selection is configurable in Settings… (Left/Middle/Right by X position).

HTTP Upload Mode

If outputDir is an http:// or https:// URL, qt-dropbox uploads instead of saving locally:

  • Uses POST with multipart/form-data
  • File part: name="file", filename="<sha1><ext>"
  • Extra fields: sha1, ext, category, date
  • Also sends headers: X-Content-SHA1, X-Filename
  • Success: any 2xx response (green flash)
  • Duplicate: 409 or 412 response (amber flash)

About

An always-on-top drop zone for files from your file manager/browser/clipboard

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages