feat: add cliphist clipboard history manager with Mod+v keybind

Enables clipboard history for both Niri and Hyprland compositors:
- Added wl-clipboard and cliphist packages to Niri
- Configured clipboard watchers for text and images in Niri autostart
- Bound Mod+v to open clipboard history via fuzzel in both compositors

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
Christopher Mühl 2026-02-28 01:19:27 +01:00
parent ae2ee1fb77
commit ceb5ee4356
No known key found for this signature in database
GPG key ID: 925AC7D69955293F
4 changed files with 8 additions and 0 deletions

View file

@ -9,6 +9,7 @@
"$mod, e, exec, nautilus" "$mod, e, exec, nautilus"
"$mod, d, exec, zeal" "$mod, d, exec, zeal"
"$mod, g, exec, ${pkgs.harbor.hg-picker}/bin/hg-picker" "$mod, g, exec, ${pkgs.harbor.hg-picker}/bin/hg-picker"
"$mod, v, exec, cliphist list | fuzzel --dmenu | cliphist decode | wl-copy"
# Window management # Window management
"$mod, q, killactive" "$mod, q, killactive"

View file

@ -2,5 +2,9 @@
programs.niri.settings.spawn-at-startup = [ programs.niri.settings.spawn-at-startup = [
# open fastfetch by default # open fastfetch by default
{argv = ["kitty" "--title" "'fastfetch'" "sh" "-c" "'fastfetch; read'"];} {argv = ["kitty" "--title" "'fastfetch'" "sh" "-c" "'fastfetch; read'"];}
# Clipboard history daemons
{argv = ["wl-paste" "--type" "text" "--watch" "cliphist" "store"];}
{argv = ["wl-paste" "--type" "image" "--watch" "cliphist" "store"];}
]; ];
} }

View file

@ -15,5 +15,7 @@
home.packages = with pkgs; [ home.packages = with pkgs; [
fuzzel fuzzel
wl-clipboard
cliphist
]; ];
} }

View file

@ -12,6 +12,7 @@
"Mod+d".action = spawn "zeal"; # Documentation viewer "Mod+d".action = spawn "zeal"; # Documentation viewer
"Mod+c".action = spawn "${pkgs.harbor.spawn-term}/bin/spawn-term"; "Mod+c".action = spawn "${pkgs.harbor.spawn-term}/bin/spawn-term";
"Mod+g".action = spawn "${pkgs.harbor.hg-picker}/bin/hg-picker"; "Mod+g".action = spawn "${pkgs.harbor.hg-picker}/bin/hg-picker";
"Mod+v".action = spawn "sh" "-c" "cliphist list | fuzzel --dmenu | cliphist decode | wl-copy";
"Mod+q".action = close-window; "Mod+q".action = close-window;
"Mod+f".action = fullscreen-window; "Mod+f".action = fullscreen-window;