curve: add ocr and screenshot desktop entries
This commit is contained in:
parent
8c3924d942
commit
ba2d0c4917
|
@ -33,6 +33,21 @@ in
|
||||||
termpdfpy
|
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
|
# set up env
|
||||||
xsession.enable = true;
|
xsession.enable = true;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue