diff options
Diffstat (limited to 'gnu/home/services/xdg.scm')
-rw-r--r-- | gnu/home/services/xdg.scm | 54 |
1 files changed, 34 insertions, 20 deletions
diff --git a/gnu/home/services/xdg.scm b/gnu/home/services/xdg.scm index 63c6041cd4..865f8b81d7 100644 --- a/gnu/home/services/xdg.scm +++ b/gnu/home/services/xdg.scm @@ -1,5 +1,5 @@ ;;; GNU Guix --- Functional package management for GNU -;;; Copyright © 2021 Andrew Tropin <andrew@trop.in> +;;; Copyright © 2021, 2022 Andrew Tropin <andrew@trop.in> ;;; Copyright © 2021 Xinglu Chen <public@yoctocell.xyz> ;;; ;;; This file is part of GNU Guix. @@ -35,10 +35,24 @@ #:export (home-xdg-base-directories-service-type home-xdg-base-directories-configuration home-xdg-base-directories-configuration? + home-xdg-base-directories-configuration-cache-home + home-xdg-base-directories-configuration-config-home + home-xdg-base-directories-configuration-data-home + home-xdg-base-directories-configuration-state-home + home-xdg-base-directories-configuration-log-home + home-xdg-base-directories-configuration-runtime-dir home-xdg-user-directories-service-type home-xdg-user-directories-configuration home-xdg-user-directories-configuration? + home-xdg-user-directories-configuration-desktop + home-xdg-user-directories-configuration-documents + home-xdg-user-directories-configuration-download + home-xdg-user-directories-configuration-music + home-xdg-user-directories-configuration-pictures + home-xdg-user-directories-configuration-publicshare + home-xdg-user-directories-configuration-templates + home-xdg-user-directories-configuration-videos xdg-desktop-action xdg-desktop-entry @@ -383,25 +397,25 @@ configuration." (define (serialize-alist config) (generic-serialize-alist append format-config config)) - (define (serialize-xdg-desktop-action action) - (match action - (($ <xdg-desktop-action> action name config) - `(,(format #f "[Desktop Action ~a]\n" - (string-capitalize (maybe-object->string action))) - ,(format #f "Name=~a\n" name) - ,@(serialize-alist config))))) - - (match entry - (($ <xdg-desktop-entry> file name type config actions) - (list (if (string-suffix? file ".desktop") - file - (string-append file ".desktop")) - `("[Desktop Entry]\n" - ,(format #f "Name=~a\n" name) - ,(format #f "Type=~a\n" - (string-capitalize (symbol->string type))) - ,@(serialize-alist config) - ,@(append-map serialize-xdg-desktop-action actions)))))) + (define (serialize-xdg-desktop-action desktop-action) + (match-record desktop-action <xdg-desktop-action> + (action name config) + `(,(format #f "[Desktop Action ~a]\n" + (string-capitalize (maybe-object->string action))) + ,(format #f "Name=~a\n" name) + ,@(serialize-alist config)))) + + (match-record entry <xdg-desktop-entry> + (file name type config actions) + (list (if (string-suffix? file ".desktop") + file + (string-append file ".desktop")) + `("[Desktop Entry]\n" + ,(format #f "Name=~a\n" name) + ,(format #f "Type=~a\n" + (string-capitalize (symbol->string type))) + ,@(serialize-alist config) + ,@(append-map serialize-xdg-desktop-action actions))))) (define-configuration home-xdg-mime-applications-configuration (added |