From ceb5ee4356b4cdad249350e037206bd7a21ab041 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christopher=20M=C3=BChl?= Date: Sat, 28 Feb 2026 01:19:27 +0100 Subject: [PATCH] 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 --- home/by-host/endurance/hyprland/keybinds.nix | 1 + home/by-host/endurance/niri/autostart.nix | 4 ++++ home/by-host/endurance/niri/default.nix | 2 ++ home/by-host/endurance/niri/keybinds.nix | 1 + 4 files changed, 8 insertions(+) diff --git a/home/by-host/endurance/hyprland/keybinds.nix b/home/by-host/endurance/hyprland/keybinds.nix index b99cac0..6bfff45 100644 --- a/home/by-host/endurance/hyprland/keybinds.nix +++ b/home/by-host/endurance/hyprland/keybinds.nix @@ -9,6 +9,7 @@ "$mod, e, exec, nautilus" "$mod, d, exec, zeal" "$mod, g, exec, ${pkgs.harbor.hg-picker}/bin/hg-picker" + "$mod, v, exec, cliphist list | fuzzel --dmenu | cliphist decode | wl-copy" # Window management "$mod, q, killactive" diff --git a/home/by-host/endurance/niri/autostart.nix b/home/by-host/endurance/niri/autostart.nix index 9218921..cd5a193 100644 --- a/home/by-host/endurance/niri/autostart.nix +++ b/home/by-host/endurance/niri/autostart.nix @@ -2,5 +2,9 @@ programs.niri.settings.spawn-at-startup = [ # open fastfetch by default {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"];} ]; } diff --git a/home/by-host/endurance/niri/default.nix b/home/by-host/endurance/niri/default.nix index 0a65e14..6499c7a 100644 --- a/home/by-host/endurance/niri/default.nix +++ b/home/by-host/endurance/niri/default.nix @@ -15,5 +15,7 @@ home.packages = with pkgs; [ fuzzel + wl-clipboard + cliphist ]; } diff --git a/home/by-host/endurance/niri/keybinds.nix b/home/by-host/endurance/niri/keybinds.nix index d00161f..8984576 100644 --- a/home/by-host/endurance/niri/keybinds.nix +++ b/home/by-host/endurance/niri/keybinds.nix @@ -12,6 +12,7 @@ "Mod+d".action = spawn "zeal"; # Documentation viewer "Mod+c".action = spawn "${pkgs.harbor.spawn-term}/bin/spawn-term"; "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+f".action = fullscreen-window;