Adding a copy utility (thx Mats)

This commit is contained in:
Martin Potier 2018-06-01 10:21:56 +03:00
parent 0f175c9ccc
commit 84e19fe583
1 changed files with 12 additions and 0 deletions

View File

@ -36,5 +36,17 @@ self: super:
--replace 'system.nixosVersion' 'system.nixos.version'
'';
});
# Originally from Mats Rauhala ®2018
copy = super.writeScriptBin "copy" ''
function clean() {
sleep 10
echo cleaning
${super.xclip}/bin/xclip -sel clipboard -i /dev/null
}
${super.xclip}/bin/xclip -sel clipboard < /dev/stdin
clean &
'';
}