---
src/rde/features/image.scm | 58 ++++++++++++++++++++++++++++++++++++++
1 file changed, 58 insertions(+)
create mode 100644 src/rde/features/image.scm
diff --git a/src/rde/features/image.scm b/src/rde/features/image.scm
Moved to image-viewers.scm
new file mode 100644
index 00000000..51c8e53e
--- /dev/null
+++ b/src/rde/features/image.scm
@@ -0,0 +1,58 @@
+;;; rde --- Reproducible development environment.
+;;;
+;;; Copyright © 2023 Nicolas Graves <ngraves@ngraves.fr>
+;;;
+;;; This file is part of rde.
+;;;
+;;; rde is free software; you can redistribute it and/or modify it
+;;; under the terms of the GNU General Public License as published by
+;;; the Free Software Foundation; either version 3 of the License, or (at
+;;; your option) any later version.
+;;;
+;;; rde is distributed in the hope that it will be useful, but
+;;; WITHOUT ANY WARRANTY; without even the implied warranty of
+;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+;;; GNU General Public License for more details.
+;;;
+;;; You should have received a copy of the GNU General Public License
+;;; along with rde. If not, see <http://www.gnu.org/licenses/>.
+
+(define-module (rde features image)
+ #:use-module (rde features)
+ #:use-module (rde features emacs)
+ #:use-module (rde features predicates)
+ #:use-module (gnu packages image-viewers)
+ #:use-module (gnu services)
+ #:use-module (gnu home services)
+ #:use-module (gnu home services xdg)
+ #:use-module (guix gexp)
+ #:export (feature-imv))
+
+(define* (feature-imv
+ #:key
+ (package imv))
+ "Setup and configure the imv command-line image viewer."
+ (ensure-pred file-like? imv)
+
+ (define f-name 'imv)
+
+ (define (get-home-services config)
+ (append
+ (list
+ (simple-service
+ 'imv-add-package
+ home-profile-service-type
+ (list imv))
+ (simple-service
+ 'add-imv-mime-entries
+ home-xdg-mime-applications-service-type
+ (home-xdg-mime-applications-configuration
+ ;; The imv entry is included in the package, but chromium was set as default.
Removed this comment.
+ (default '((image/jpeg . imv.desktop)
+ (image/png . imv.desktop)
+ (image/svg+xml . imv.desktop))))))))
+
+ (feature
+ (name f-name)
+ (values (make-feature-values imv))
+ (home-services-getter get-home-services)))
Thank you for the patch, applied, pushed as
https://git.sr.ht/~abcdw/rde/commit/84601d4
--
2.39.2