13 KiB
📋 Windows 11 Clipboard History For Linux
A beautiful, Windows 11-style Clipboard History Manager for Linux
Built with 🦀 Rust + ⚡ Tauri v2 + ⚛️ React + 🎨 Tailwind CSS
✨ 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+VorCtrl+Alt+Vto 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)
The easiest way to get started (Recommended)
One-line install:
curl -sL http://clipboard.gustavosett.dev | bashNote: 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
evdevto capture keyboard events directly from/dev/input/event* - Paste simulation (Ctrl+V injection) - uses
uinputfor kernel-level keyboard simulation - Window positioning - cursor position detection via X11
After installation:
- Log out and log back in for the permissions to take effect
- The installer automatically:
- Adds your user to the
inputgroup - Creates udev rules for input device access
- Loads the
uinputkernel module
- Adds your user to the
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 devor./scripts/run-dev.shinstead ofnpm run tauri:devdirectly. 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
- Check dependencies: Run
make check-depsto verify all dependencies are installed - Wayland clipboard issues: The app uses
wayland-data-controlprotocol for Wayland clipboard access - VS Code Snap conflict: Use
make devor./scripts/run-dev.shinstead ofnpm run tauri:dev
Global hotkey not working
- Add user to input group:
sudo usermod -aG input $USERthen log out/in - Check udev rules exist:
cat /etc/udev/rules.d/99-win11-clipboard-input.rules - Reload udev:
sudo udevadm control --reload-rules && sudo udevadm trigger - Try alternative hotkey
Ctrl+Alt+Vinstead ofSuper+V
Paste not working in some apps
- Install xdotool (optional fallback):
sudo apt install xdotool - Check uinput module:
lsmod | grep uinput- if not loaded, runsudo modprobe uinput - Check /dev/uinput permissions:
ls -la /dev/uinputshould show groupinput
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:
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'feat: add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
Development Guidelines
- Follow the existing code style
- Run
make lintandmake formatbefore 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
