curve: add ocr and screenshot desktop entries

This commit is contained in:
Anish Lakhwara 2023-05-30 22:23:49 +10:00
parent 8c3924d942
commit ba2d0c4917

View file

@ -33,6 +33,21 @@ in
termpdfpy
];
xdg.desktopEntries = {
ocr = {
name = "OCR image";
exec = "${pkgs.writeScript "ocr" ''
${pkgs.xfce.xfce4-screenshooter}/bin/xfce4-screenshooter -r --save /tmp/ocr-tmp.png
${pkgs.tesseract}/bin/tesseract /tmp/ocr-tmp.png | ${pkgs.xclip}/bin/xclip -sel clip
rm /tmp/ocr-tmp.png
''}";
};
screenshot = {
name = "Screenshot";
exec = "screenshot";
};
};
# set up env
xsession.enable = true;