Fixed ranger img copy-paste script for wayland
This commit is contained in:
@@ -1,11 +1,16 @@
|
|||||||
{ config, pkgs, ... }:
|
{ config, pkgs, ... }:
|
||||||
let myCbxScript = ''
|
let myCbxScript = ''
|
||||||
# TODO fix this for wayland
|
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
|
# this lets my copy and paste images and/or plaintext of files directly out of ranger
|
||||||
if [ "$#" -le "2" ]; then
|
if [ "$#" -le "2" ]; then
|
||||||
if [ "$1" = "copy" -o "$1" = "cut" ]; then
|
if [ "$1" = "copy" -o "$1" = "cut" ]; then
|
||||||
#xclip -selection clipboard -t $(file -b --mime-type $2) -i $2;
|
if [ "$XDG_SESSION_TYPE" = "wayland" ]; then
|
||||||
xclip -selection clipboard -t image/png -i $2;
|
wl-copy < $2;
|
||||||
|
else
|
||||||
|
# xclip -selection clipboard -t $(file -b --mime-type $2) -i $2;
|
||||||
|
xclip -selection clipboard -t image/png -i $2;
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
'';
|
'';
|
||||||
|
Reference in New Issue
Block a user