summary refs log tree commit diff
path: root/gnu/packages
diff options
context:
space:
mode:
authorTimotej Lazar <timotej.lazar@araneo.si>2023-06-24 13:28:05 +0200
committerLudovic Courtès <ludo@gnu.org>2023-07-11 16:06:52 +0200
commit355e3c6e1c0d3f847e4c96a566408a7a8aebb551 (patch)
tree0c90ca2254a88397f4375c5ebbb1ac1e80f3e2a9 /gnu/packages
parentf969f45fa8ad8922b1020c93a8fc4d83064c88ae (diff)
downloadguix-355e3c6e1c0d3f847e4c96a566408a7a8aebb551.tar.gz
gnu: rxvt-unicode: Use helper procedure to make desktop files.
* gnu/packages/xdisorg.scm (rxvt-unicode)[arguments]: Replace custom code with
make-desktop-entry-file. Specify categories and icon in desktop files.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
Diffstat (limited to 'gnu/packages')
-rw-r--r--gnu/packages/xdisorg.scm45
1 files changed, 14 insertions, 31 deletions
diff --git a/gnu/packages/xdisorg.scm b/gnu/packages/xdisorg.scm
index 4d072d1e16..1f7539764c 100644
--- a/gnu/packages/xdisorg.scm
+++ b/gnu/packages/xdisorg.scm
@@ -1289,38 +1289,21 @@ compact configuration syntax.")
            #:make-flags #~(list (string-append "TERMINFO=" #$output "/share/terminfo"))
            #:phases
            #~(modify-phases %standard-phases
-               (add-after 'install 'install-desktop-urxvt
+               (add-after 'install 'install-desktop-entries
                  (lambda _
-                   (let ((desktop (string-append #$output "/share/applications")))
-                     (mkdir-p desktop)
-                     (with-output-to-file
-                         (string-append desktop "/urxvt.desktop")
-                       (lambda _
-                         (format #t
-                                 "[Desktop Entry]~@
-                                 Name=rxvt-unicode~@
-                                 Comment=~@
-                                 Exec=~a/bin/urxvt~@
-                                 TryExec=~@*~a/bin/urxvt~@
-                                 Icon=~@
-                                 Type=Application~%"
-                                 #$output))))))
-               (add-after 'install 'install-desktop-urxvtc
-                 (lambda _
-                   (let ((desktop (string-append #$output "/share/applications")))
-                     (mkdir-p desktop)
-                     (with-output-to-file
-                         (string-append desktop "/urxvtc.desktop")
-                       (lambda _
-                         (format #t
-                                 "[Desktop Entry]~@
-                                 Name=rxvt-unicode (client)~@
-                                 Comment=Rxvt clone with XFT and unicode support~@
-                                 Exec=~a/bin/urxvtc~@
-                                 TryExec=~@*~a/bin/urxvtc~@
-                                 Icon=~@
-                                 Type=Application~%"
-                                 #$output)))))))))
+                   (for-each (lambda (exec name)
+                               (make-desktop-entry-file
+                                (string-append #$output "/share/applications/"
+                                               exec ".desktop")
+                                #:type "Application"
+                                #:name name
+                                #:comment '((#f #$(package-synopsis this-package)))
+                                #:exec exec
+                                #:try-exec exec
+                                #:icon "utilities-terminal"
+                                #:categories '("System" "TerminalEmulator")))
+                             '("urxvt" "urxvtc")
+                             '("rxvt-unicode" "rxvt-unicode (client)")))))))
     (inputs
      (list libptytty libxft libx11 libxt libxext))
     (native-inputs