mirror of
https://github.com/librephoenix/nixos-config
synced 2025-07-06 06:52:13 +05:30
Revived cbx script to copy images directly to clipboard
This commit is contained in:
parent
23a2dcc1a1
commit
f7c2b21b09
2 changed files with 12 additions and 2 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue