# f0ckm-uploader A KDE Plasma integration for uploading files directly to a f0ckm instance via the API. Adds an **"Upload to f0ckm"** action to Dolphin's right-click context menu and Spectacle's export/share menu. ## Features - **Dolphin integration** — right-click any file and upload it via the Actions/Service Menu - **Spectacle integration** — export screenshots directly from the share menu - **Clipboard support** — the resulting URL is automatically copied to your clipboard - **Wayland & X11** — uses `wl-copy` or `xclip` depending on the session - **KDE notifications** — upload progress and results via `kdialog` passive popups - **Accurate MIME detection** — uses `file --mime-type` to avoid API rejections ## Requirements | Dependency | Purpose | | -------------------------- | --------------------------- | | `bash` | Script runtime | | `curl` | HTTP uploads | | `kdialog` | Desktop notifications (KDE) | | `wl-clipboard` (`wl-copy`) | Clipboard on Wayland | | `xclip` | Clipboard on X11 | | `file` (libmagic) | MIME type detection | ## Configuration Before installing, edit `uploader.sh` and set your API endpoint and key: ```bash API_URL="http:///api/v2/upload" API_KEY="your_api_key_here" ``` ## Installation ```bash git clone https://git.lat/kibi/f0ckm-uploader cd f0ckm-uploader # Edit uploader.sh — set API_URL and API_KEY chmod +x install.sh ./install.sh ``` The installer will: 1. Copy `uploader.sh` → `~/.local/bin/kde-uploader` 2. Install the `.desktop` application entry for Spectacle → `~/.local/share/applications/` 3. Install the KDE Service Menu for Dolphin → `~/.local/share/kio/servicemenus/` (and the legacy KF5 path) > [!NOTE] > You may need to restart Dolphin or log out/in for the service menu entry to appear. ## Uninstallation ```bash ./uninstall.sh ``` ## Usage ### Dolphin Right-click any file → **Actions** → **Upload to f0ckm** ### Spectacle After capturing a screenshot → **Export** or **Share** → **Upload to f0ckm** A notification will confirm the upload and the link will be in your clipboard. ## File Structure ``` f0ckm-uploader/ ├── uploader.sh # Main upload script ├── kde-uploader.desktop # Application entry (Spectacle) ├── kde-uploader-servicemenu.desktop # Dolphin right-click action ├── install.sh # Installer └── uninstall.sh # Uninstaller ``` ## License MIT