wl-paste share to a file host (0x0.st, catbox.moe, x0.at, envs.sh) and copy result url to clipboard
  • Go 80.5%
  • Nix 16.6%
  • Makefile 2.9%
Find a file
github-actions[bot] 3ebc49af05
Merge pull request #13 from labi-le/dependabot/go_modules/golang.org/x/net-0.58.0
chore(deps): bump golang.org/x/net from 0.57.0 to 0.58.0
2026-08-17 05:55:08 +00:00
.github ci: fix the automerge gate, drop the --auto race 2026-08-07 19:50:15 +03:00
testdata add ocr mode via --ocr flag 2026-07-12 00:01:23 +03:00
.gitignore add golangci-lint config (belphegor golden) and make lint target 2026-07-16 14:24:55 +03:00
.golangci.yml add golangci-lint config (belphegor golden) and make lint target 2026-07-16 14:24:55 +03:00
.goreleaser.yaml actualize workflows and add nixos module to flake 2026-07-12 00:01:47 +03:00
flake.lock chore: update flake.nix to v1.4.0 2026-08-07 13:25:03 +00:00
flake.nix chore: update flake.nix to v1.4.0 2026-08-07 16:54:31 +00:00
go.mod chore(deps): bump golang.org/x/net from 0.57.0 to 0.58.0 2026-08-17 05:54:56 +00:00
go.sum chore(deps): bump golang.org/x/net from 0.57.0 to 0.58.0 2026-08-17 05:54:56 +00:00
LICENSE Create LICENSE 2024-05-07 00:36:12 +03:00
main.go add pluggable upload providers with --provider flag and catbox 2026-07-16 14:24:55 +03:00
main_test.go add pluggable upload providers with --provider flag and catbox 2026-07-16 14:24:55 +03:00
Makefile add golangci-lint config (belphegor golden) and make lint target 2026-07-16 14:24:55 +03:00
provider.go add pluggable upload providers with --provider flag and catbox 2026-07-16 14:24:55 +03:00
provider_test.go add pluggable upload providers with --provider flag and catbox 2026-07-16 14:24:55 +03:00
README.md flake: add provider option to the nixos module 2026-07-16 15:05:27 +03:00

wl-paste-uploader

wl-paste share to a file host (0x0.st, catbox.moe, x0.at, envs.sh) and copy result url to clipboard

Installation

  • Prebuilt binaries

  • Nix flake

    as profile
    nix profile install github:labi-le/wl-paste-uploader
    
    import the module
    {
      # inputs
      wl-uploader.url = "github:labi-le/wl-paste-uploader";
      # outputs
      overlay-wl-uploader = final: prev: {
        wl-uploader = wl-uploader.packages.${system}.default;
      };
    
      modules = [
        ({ config, pkgs, ... }: { nixpkgs.overlays = [ overlay-wl-uploader ]; })
      ];
    
      # add package
      environment.systemPackages = with pkgs; [
        wl-uploader
      ];
    }
    
    nixos module
    {
      # inputs
      wl-uploader.url = "github:labi-le/wl-paste-uploader";
    
      # outputs
      modules = [
        wl-uploader.nixosModules.default
        {
          programs.wl-paste-uploader = {
            enable = true;
            ocr = true; # optional: pull in tesseract for `--ocr`
            provider = "catbox"; # optional: default upload provider (UPLOADER_PROVIDER)
          };
        }
      ];
    }
    

usage:

wl-uploader

example for sway

bindsym --to-code Mod4+p exec wl-uploader

with proxy

socks_proxy=socks5://127.0.0.1:1088 wl-uploader

you can also use env HTTPS_PROXY, HTTP_PROXY, SOCKS_PROXY, ALL_PROXY

Providers

Choose where to upload with --provider (or the UPLOADER_PROVIDER env var; the flag takes precedence). Default: 0x0.

  • 0x00x0.st, size-based retention
  • x0x0.at, 3100 days
  • envsenvs.sh, size-based retention
  • catboxcatbox.moe, permanent (anonymous files removed after 2 years without access)
wl-uploader --provider catbox

example for sway

bindsym --to-code Mod4+p exec wl-uploader --provider catbox

OCR

With --ocr the text is recognized from the clipboard image and copied to the clipboard instead of being uploaded:

wl-uploader --ocr

Requires tesseract in PATH. Pick the recognition language(s) with OCR_LANG (defaults to tesseract's own default, usually eng):

OCR_LANG=eng+rus wl-uploader --ocr

example for sway

bindsym --to-code Mod4+o exec wl-uploader --ocr