2025-12-12 02:34:04 -03:00
2025-12-11 08:54:51 -03:00
2025-12-11 09:02:59 -03:00
2025-12-11 01:58:08 -03:00
2025-12-12 02:27:30 -03:00
2025-12-12 02:27:30 -03:00
2025-12-12 02:34:04 -03:00
2025-12-11 01:58:08 -03:00
2025-12-11 01:58:08 -03:00
2025-12-11 01:58:08 -03:00
2025-12-11 01:58:08 -03:00
2025-12-11 02:05:01 -03:00
2025-12-12 02:27:30 -03:00
2025-12-11 19:41:56 -03:00
2025-12-11 20:54:42 -03:00
2025-12-11 01:58:08 -03:00
2025-12-12 02:27:30 -03:00
2025-12-11 01:58:08 -03:00
2025-12-11 01:58:08 -03:00
2025-12-11 01:58:08 -03:00
2025-12-11 01:58:08 -03:00

📋 Windows 11 Clipboard History For Linux

License Rust Tauri Platform

A beautiful, Windows 11-style Clipboard History Manager for Linux

Screenshot

Built with 🦀 Rust + Tauri v2 + ⚛️ React + 🎨 Tailwind CSS

FeaturesInstallationDevelopmentContributing


Features

  • 🎨 Windows 11 Design - Pixel-perfect recreation of the Win+V clipboard UI with Acrylic/Mica glassmorphism effects
  • 🌙 Dark/Light Mode - Automatically detects system theme preference
  • ⌨️ Global Hotkey - Press Super+V or Ctrl+Alt+V to open from anywhere
  • 📌 Pin Items - Keep important clipboard entries at the top
  • 🖼️ Image Support - Copy and paste images with preview thumbnails
  • 🎬 GIF Picker - Search and paste GIFs from Tenor directly into any app
  • 🤩 Emoji Picker - Quick access to emojis with search functionality
  • 🚀 Blazing Fast - Written in Rust for maximum performance
  • 🔒 Privacy First - All data stays local on your machine
  • 🖱️ Smart Positioning - Window appears at your cursor position
  • 💨 System Tray - Runs silently in the background
  • 🐧 Wayland & X11 - Works on both display servers

🐧 Installation (For Users)

One-line install:

curl -sL http://clipboard.gustavosett.dev | bash

Note: This script automatically detects your distribution (Ubuntu, Debian, Fedora, etc.), installs the appropriate package, and configures the necessary permissions.

Or

Using package managers

Download the latest release from GitHub and follow the installation instructions for your distribution in RELEASES

⚠️ Important: Permissions Required

This application requires access to input devices for:

  • Global hotkeys (Super+V / Ctrl+Alt+V) - uses evdev to capture keyboard events directly from /dev/input/event*
  • Paste simulation (Ctrl+V injection) - uses uinput for kernel-level keyboard simulation
  • Window positioning - cursor position detection via X11

After installation:

  1. Log out and log back in for the permissions to take effect
  2. The installer automatically:
    • Adds your user to the input group
    • Creates udev rules for input device access
    • Loads the uinput kernel module

If you installed manually, run:

# Add user to input group
sudo usermod -aG input $USER

# Create udev rules
sudo tee /etc/udev/rules.d/99-win11-clipboard-input.rules << 'EOF'
KERNEL=="event*", SUBSYSTEM=="input", MODE="0660", GROUP="input"
KERNEL=="uinput", SUBSYSTEM=="misc", MODE="0660", GROUP="input", OPTIONS+="static_node=uinput"
EOF

# Load uinput module
sudo modprobe uinput
echo "uinput" | sudo tee /etc/modules-load.d/uinput.conf

# Reload udev rules
sudo udevadm control --reload-rules && sudo udevadm trigger

# Then log out and log back in

📦 Installation (For devs)

# Clone the repository
git clone https://github.com/gustavosett/Windows-11-Clipboard-History-For-Linux.git
cd win11-clipboard-history

# Install system dependencies (auto-detects your distro)
make deps

# Install Rust and Node.js if needed
make rust
make node
source ~/.cargo/env  # Reload shell environment

# Build and install
make build
sudo make install

Distribution-Specific Dependencies

🟠 Ubuntu / Debian / Linux Mint / Pop!_OS
sudo apt update
sudo apt install -y \
    libwebkit2gtk-4.1-dev \
    build-essential \
    curl \
    wget \
    file \
    libssl-dev \
    libayatana-appindicator3-dev \
    librsvg2-dev \
    libxdo-dev \
    libgtk-3-dev \
    libglib2.0-dev \
    xclip \
    wl-clipboard \
    pkg-config
🔵 Fedora
sudo dnf install -y \
    webkit2gtk4.1-devel \
    openssl-devel \
    curl \
    wget \
    file \
    libappindicator-gtk3-devel \
    librsvg2-devel \
    libxdo-devel \
    gtk3-devel \
    glib2-devel \
    xclip \
    wl-clipboard \
    pkg-config \
    @development-tools
🟣 Arch Linux / Manjaro / EndeavourOS
sudo pacman -Syu --needed \
    webkit2gtk-4.1 \
    base-devel \
    curl \
    wget \
    file \
    openssl \
    libappindicator-gtk3 \
    librsvg \
    xdotool \
    gtk3 \
    glib2 \
    xclip \
    wl-clipboard \
    pkgconf

Install Rust

curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
source ~/.cargo/env

Install Node.js (v18+)

# Using nvm (recommended)
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.1/install.sh | bash
source ~/.nvm/nvm.sh
nvm install 20
nvm use 20

Build from Source

# Clone the repository
git clone https://github.com/gustavosett/Windows-11-Clipboard-History-For-Linux.git
cd win11-clipboard-history

# Install npm dependencies
npm install

# Build the application
npm run tauri:build

# The built packages will be in:
# - Binary: src-tauri/target/release/win11-clipboard-history
# - DEB package: src-tauri/target/release/bundle/deb/
# - RPM package: src-tauri/target/release/bundle/rpm/
# - AppImage: src-tauri/target/release/bundle/appimage/

🛠️ Development

Quick Start

# Install dependencies
npm install

# Run in development mode (hot reload enabled)
make dev
# OR
./scripts/run-dev.sh

Note for VS Code Snap users: If you're using VS Code installed via Snap, use make dev or ./scripts/run-dev.sh instead of npm run tauri:dev directly. This script cleans the environment to avoid library conflicts.

Makefile Commands

Command Description
make help Show all available commands
make deps Install system dependencies (auto-detect distro)
make deps-ubuntu Install dependencies for Ubuntu/Debian
make deps-fedora Install dependencies for Fedora
make deps-arch Install dependencies for Arch Linux
make rust Install Rust via rustup
make node Install Node.js via nvm
make check-deps Verify all dependencies are installed
make dev Run in development mode
make build Build production release
make install Install to system (requires sudo)
make uninstall Remove from system (requires sudo)
make clean Remove build artifacts
make lint Run linters
make format Format code

npm Scripts

Command Description
npm run dev Start Vite dev server (frontend only)
npm run tauri:dev Start full Tauri development mode
npm run tauri:build Build production release
npm run build Build frontend only
npm run lint Run ESLint
npm run format Format code with Prettier

Project Structure

win11-clipboard-history/
├── src/                      # React frontend
│   ├── components/           # UI components
│   │   ├── DragHandle.tsx    # Window drag handle
│   │   ├── EmptyState.tsx    # Empty history state
│   │   ├── Header.tsx        # App header with actions
│   │   ├── HistoryItem.tsx   # Clipboard item card
│   │   └── TabBar.tsx        # Tab navigation
│   ├── hooks/                # React hooks
│   │   ├── useClipboardHistory.ts
│   │   └── useDarkMode.ts
│   ├── types/                # TypeScript types
│   │   └── clipboard.ts
│   ├── App.tsx               # Main app component
│   ├── index.css             # Global styles + Tailwind
│   └── main.tsx              # Entry point
├── src-tauri/                # Rust backend
│   ├── src/
│   │   ├── main.rs           # App setup, tray, commands
│   │   ├── lib.rs            # Library exports
│   │   ├── clipboard_manager.rs  # Clipboard operations
│   │   ├── focus_manager.rs      # Window focus tracking for paste
│   │   └── hotkey_manager.rs     # Global shortcuts (evdev)
│   ├── capabilities/         # Tauri permissions
│   ├── icons/                # App icons
│   ├── Cargo.toml            # Rust dependencies
│   └── tauri.conf.json       # Tauri configuration
├── scripts/
│   └── run-dev.sh            # Clean environment dev script
├── Makefile                  # Build automation
├── tailwind.config.js        # Win11 theme config
├── vite.config.ts            # Vite configuration
└── package.json              # Node dependencies

Global Hotkey Permissions

Global keyboard capture requires the user to be in the input group to access /dev/input/event* devices:

sudo usermod -aG input $USER
# Log out and back in for changes to take effect

This works on both X11 and Wayland as it reads keyboard events directly from the kernel.

🐧 Platform Support

Display Servers

Display Server Status Notes
X11 Full support Full native support
Wayland Full support Uses evdev for hotkeys, wayland-data-control for clipboard

Tested Distributions

Distribution Version Status
Ubuntu 22.04+ Tested
Debian 12+ Tested
Fedora 38+ Not tested
Arch Linux Rolling Not tested
Manjaro Latest Not tested
Linux Mint 21+ Not tested
Pop!_OS 22.04+ Not tested

🎨 Customization

Changing the Hotkey

Edit src-tauri/src/hotkey_manager.rs to modify the global shortcut:

// Current: Super+V or Ctrl+Alt+V
Key::KeyV => {
    if super_pressed || (ctrl_pressed && alt_pressed) {
        callback();
    }
}

Theme Colors

The Windows 11 color palette is defined in tailwind.config.js:

colors: {
  win11: {
    'bg-primary': '#202020',
    'bg-accent': '#0078d4',
    // ... customize as needed
  }
}

🔧 Troubleshooting

Application won't start

  1. Check dependencies: Run make check-deps to verify all dependencies are installed
  2. Wayland clipboard issues: The app uses wayland-data-control protocol for Wayland clipboard access
  3. VS Code Snap conflict: Use make dev or ./scripts/run-dev.sh instead of npm run tauri:dev

Global hotkey not working

  1. Add user to input group: sudo usermod -aG input $USER then log out/in
  2. Check udev rules exist: cat /etc/udev/rules.d/99-win11-clipboard-input.rules
  3. Reload udev: sudo udevadm control --reload-rules && sudo udevadm trigger
  4. Try alternative hotkey Ctrl+Alt+V instead of Super+V

Paste not working in some apps

  1. Install xdotool (optional fallback): sudo apt install xdotool
  2. Check uinput module: lsmod | grep uinput - if not loaded, run sudo modprobe uinput
  3. Check /dev/uinput permissions: ls -la /dev/uinput should show group input

Window not showing at cursor position

This may occur on some Wayland compositors. The app forces XWayland mode via GDK_BACKEND=x11 for better positioning support.

🤝 Contributing

Contributions are welcome! Here's how you can help:

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'feat: add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

Development Guidelines

  • Follow the existing code style
  • Run make lint and make format before committing
  • Write meaningful commit messages
  • Add tests for new features
  • Update documentation as needed

📄 License

This project is licensed under the MIT License - see the LICENSE file for details.

🙏 Acknowledgments

  • Tauri - For the amazing Rust-based framework
  • Windows 11 - For the beautiful design inspiration
  • evdev - For kernel-level global keyboard capture
  • arboard - For cross-platform clipboard access
  • x11rb - For X11 window focus management

If you find this project useful, please consider giving it a !

Made with ❤️ for the Linux community

Description
Mirrored from GitHub
Readme MIT 45 MiB
Languages
Rust 46%
TypeScript 41.7%
Shell 7.9%
Makefile 2.9%
CSS 0.8%
Other 0.7%