nix/home/program/bash/module/Picture.nix

19 lines
354 B
Nix
Raw Normal View History

2024-11-20 22:57:12 +03:00
{ ... }: {
text = ''
# Quick edit a picture and copy to clipboard.
# Usage: pic_copy <FILE>
function pic_copy() {
swappy -f "''${1}" -o - | copy
}
# Quick edit a pictures inplace.
# Usage: pic_edit <FILES>
function pic_edit() {
local IFS=$'\n'
for file in "''${@}"; do
swappy -f "''${file}" -o "''${file}"
done
}
'';
}