From 07b19b2cdb4aa631095afd002db8d78cde277a8d Mon Sep 17 00:00:00 2001 From: pagedmov Date: Thu, 31 Oct 2024 17:31:17 -0400 Subject: [PATCH] fixed clipboard history menu copying the preview excerpt instead of the full entry --- modules/home/scripts/commands/toolbelt.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/home/scripts/commands/toolbelt.nix b/modules/home/scripts/commands/toolbelt.nix index 8d6688d..c2a8e8c 100644 --- a/modules/home/scripts/commands/toolbelt.nix +++ b/modules/home/scripts/commands/toolbelt.nix @@ -4,15 +4,15 @@ pkgs.writeShellScriptBin "toolbelt" '' hostname=$(cat /etc/hostname) cliphistory() { -cliphist list | fzf --preview=" + selection=$(cliphist list | fzf --preview=" index=\$(echo {} | awk '{print \$1}'); \ mime=\$(cliphist decode \$index | file -i -); \ if echo \"\$mime\" | grep -q 'image'; then \ echo \$(cliphist list | rg \"^\$index\" | cut -d ' ' -f 2- | fmt -w 30); \ else \ cliphist decode \"\$index\" | fmt -w 30; \ - fi -" --prompt="> " | wl-copy + fi" --prompt="> " | awk '{print $1}') + cliphist decode "$selection" | wl-copy } btop_cmd() { if [ "$hostname" = 'oganesson' ]; then