mirror of
https://github.com/librephoenix/nixos-config
synced 2025-01-19 07:05:51 +05:30
Revived cbx script to copy images directly to clipboard
This commit is contained in:
parent
23a2dcc1a1
commit
f7c2b21b09
|
@ -1,9 +1,19 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
let myCbxScript = ''
|
||||
#!/bin/sh
|
||||
if [ "$#" -le "2" ]; then
|
||||
if [ "$1" = "copy" -o "$1" = "cut" ]; then
|
||||
#xclip -selection clipboard -t $(file -b --mime-type $2) -i $2;
|
||||
xclip -selection clipboard -t image/png -i $2;
|
||||
fi
|
||||
fi
|
||||
'';
|
||||
in
|
||||
{
|
||||
home.packages = with pkgs; [
|
||||
ranger
|
||||
xdragon
|
||||
(pkgs.writeScriptBin "cbx" myCbxScript)
|
||||
];
|
||||
home.file.".config/ranger/rc.conf".source = ./rc.conf;
|
||||
home.file.".config/ranger/rifle.conf".source = ./rifle.conf;
|
||||
|
|
|
@ -504,7 +504,7 @@ map da cut mode=add
|
|||
map dr cut mode=remove
|
||||
map dt cut mode=toggle
|
||||
|
||||
map yy chain copy; shell ~/.local/bin/cbx copy %s
|
||||
map yy chain copy; shell cbx copy %s
|
||||
map uy uncut
|
||||
map ya copy mode=add
|
||||
map yr copy mode=remove
|
||||
|
|
Loading…
Reference in a new issue