diff options
Diffstat (limited to '.config/nnn')
| -rwxr-xr-x | .config/nnn/plugins/joe_clipper | 6 | 
1 files changed, 4 insertions, 2 deletions
| 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', | 
