diff options
| author | joe <rbo@gmx.us> | 2025-09-15 15:29:49 +0200 | 
|---|---|---|
| committer | joe <rbo@gmx.us> | 2025-09-15 15:29:49 +0200 | 
| commit | 3e7119272066fa47a75a5ba41df7b470ae1c60ae (patch) | |
| tree | 0418ed0183b04f89e5289e8e952d4d31404569c1 /.config/nnn/plugins/joe_clipper | |
| parent | up (diff) | |
| download | dotfiles-bsd-3e7119272066fa47a75a5ba41df7b470ae1c60ae.tar.gz dotfiles-bsd-3e7119272066fa47a75a5ba41df7b470ae1c60ae.tar.bz2 dotfiles-bsd-3e7119272066fa47a75a5ba41df7b470ae1c60ae.tar.xz dotfiles-bsd-3e7119272066fa47a75a5ba41df7b470ae1c60ae.tar.zst dotfiles-bsd-3e7119272066fa47a75a5ba41df7b470ae1c60ae.zip | |
up
Diffstat (limited to '')
| -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', | 
