From 3e7119272066fa47a75a5ba41df7b470ae1c60ae Mon Sep 17 00:00:00 2001 From: joe Date: Mon, 15 Sep 2025 15:29:49 +0200 Subject: up --- .config/nnn/plugins/joe_clipper | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to '.config/nnn/plugins/joe_clipper') diff --git a/.config/nnn/plugins/joe_clipper b/.config/nnn/plugins/joe_clipper index 69059fa..54d8095 100755 --- a/.config/nnn/plugins/joe_clipper +++ b/.config/nnn/plugins/joe_clipper @@ -5,6 +5,8 @@ use strict; use warnings; use Cwd qw(cwd); +use constant XCLIP => 'xclip -selection clipboard '; + sub close_io { open STDIN, '<', '/dev/null' or die $!; @@ -20,7 +22,7 @@ sub clip_img $pid = fork(); if ($pid == 0) { - system("magick $file png:- | xclip -selection clipboard -t image/png"); + system("magick '$file' png:- | " . XCLIP . "-t image/png"); exec( 'notify-send', '-t', '2000', @@ -39,7 +41,7 @@ sub clip_raw $pid = fork(); if ($pid == 0) { - system( "xclip -selection clipboard $file"); + system( "xclip -selection clipboard '$file'"); exec( 'notify-send', '-t', '2000', -- cgit v1.2.3