From b8eb9a50ab7b303ce357c6bee779345d0e15f966 Mon Sep 17 00:00:00 2001 From: Filippo Berto Date: Sat, 5 Nov 2022 22:15:09 +0100 Subject: [PATCH] Heif/Heic file thumbnailer integration --- hm_modules/heif.nix | 15 +++++++++++++++ odin/hm.nix | 1 + thor/hm.nix | 1 + 3 files changed, 17 insertions(+) create mode 100644 hm_modules/heif.nix diff --git a/hm_modules/heif.nix b/hm_modules/heif.nix new file mode 100644 index 0000000..7df5ab5 --- /dev/null +++ b/hm_modules/heif.nix @@ -0,0 +1,15 @@ +{ pkgs, ... }: + +let thumbnailer = "${pkgs.libheif.bin}/bin/heif-thumbnailer"; in +{ + # home.packages = [ + # pkgs.libheif.bin + # ]; + + xdg.dataFile."thumbnailers/heic.thumbnailer".text = '' + [Thumbnailer Entry] + TryExec=${thumbnailer} + Exec=${thumbnailer} -s %s %i %o + MimeType=image/heif;image/heic + ''; +} diff --git a/odin/hm.nix b/odin/hm.nix index a43b864..bf891c4 100644 --- a/odin/hm.nix +++ b/odin/hm.nix @@ -136,6 +136,7 @@ ../hm_modules/dunst.nix # ../hm_modules/grobi.nix ../hm_modules/gtk_theme.nix + ../hm_modules/heif.nix ../hm_modules/helix.nix # ../hm_modules/joystickwake.nix ../hm_modules/kakoune.nix diff --git a/thor/hm.nix b/thor/hm.nix index 8316364..ed03c82 100644 --- a/thor/hm.nix +++ b/thor/hm.nix @@ -104,6 +104,7 @@ ../hm_modules/dunst.nix # ../hm_modules/grobi.nix ../hm_modules/gtk_theme.nix + ../hm_modules/heif.nix ../hm_modules/helix.nix ../hm_modules/joystickwake.nix # ../hm_modules/kakoune.nix