From 469bd8cf64d6c370f77618e483947799e84ae3d0 Mon Sep 17 00:00:00 2001 From: hashirama Date: Sat, 8 Jun 2024 02:25:47 +0000 Subject: [PATCH] add service that compress mpv screenshots --- config.scm | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/config.scm b/config.scm index ff7af23..2de6205 100644 --- a/config.scm +++ b/config.scm @@ -18,10 +18,12 @@ (gnu packages audio) (gnu packages librewolf) (gnu packages gdb) + (gnu packages graphics) (gnu packages java) (gnu packages fcitx5) (gnu packages ibus) (gnu packages gnuzilla) + (gnu services mcron) (gnu packages haskell) (gnu packages ebook) (gnu packages lisp-xyz) @@ -162,8 +164,10 @@ KERNEL==\"xpad\", SUBSYSTEM==\"drivers\", ACTION==\"add\", ATTR{new_id}=\"2dc8 3 ibus dconf gimp + blender gimp-resynthesizer wmctrl + libwebp libreoffice librewolf ;; audio @@ -299,6 +303,15 @@ KERNEL==\"xpad\", SUBSYSTEM==\"drivers\", ACTION==\"add\", ATTR{new_id}=\"2dc8 3 (set-xorg-configuration (xorg-configuration (keyboard-layout keyboard-layout))) (udev-rules-service '8bitdo %8bitdo-udev-rules) + + + #| Compress my mpv screenshots periodically |# + (service mcron-service-type + (mcron-configuration + (jobs (list #~(job "0 14 * * *" + "find /mnt/Data/mpv-screenshots/ -type f \\( -iname '.png' -o -iname '.jpg' \\) -exec sh -c 'cwebp -q 80 \"$0\" -o \"${0%.*}.webp\" && rm \"$0\"' {} \\;"))))) + + ) %desktop-services)