From 8af3f031cd8eba8e0ddc56fb1e16573df9d1396b Mon Sep 17 00:00:00 2001 From: Rutherther Date: Sat, 17 Aug 2024 13:44:06 +0200 Subject: [PATCH] feat: add xdg-user-dirs and mime apps --- home/dotfiles/mimeapps.list | 28 ----------------------- home/home-configuration.scm | 45 +++++++++++++++++++++++++++++++++++-- 2 files changed, 43 insertions(+), 30 deletions(-) delete mode 100644 home/dotfiles/mimeapps.list diff --git a/home/dotfiles/mimeapps.list b/home/dotfiles/mimeapps.list deleted file mode 100644 index 83d0930..0000000 --- a/home/dotfiles/mimeapps.list +++ /dev/null @@ -1,28 +0,0 @@ -[Default Applications] -application/mp4=mpv.desktop -application/pdf=org.pwmt.zathura.desktop - -image/gif=nsxiv.desktop -image/jpeg=nsxiv.desktop -image/png=nsxiv.desktop -image/tiff=nsxiv.desktop -image/webp=nsxiv.desktop - -application/x-shellscript=emacsclient.desktop -text/javascript=emacsclient.desktop -text/markdown=emacsclient.desktop -text/plain=emacsclient.desktop -text/x-python3=emacsclient.desktop - -video/h264=mpv.desktop -video/h265=mpv.desktop -video/h266=mpv.desktop -video/mpeg=mpv.desktop - -text/html=librewolf.desktop -x-scheme-handler/about=librewolf.desktop -x-scheme-handler/chrome=librewolf.desktop -x-scheme-handler/file=emacsclient.desktop -x-scheme-handler/http=librewolf.desktop -x-scheme-handler/https=librewolf.desktop -x-scheme-handler/unknown=librewolf.desktop \ No newline at end of file diff --git a/home/home-configuration.scm b/home/home-configuration.scm index ebdc939..3234caa 100644 --- a/home/home-configuration.scm +++ b/home/home-configuration.scm @@ -16,6 +16,7 @@ (gnu home services shells) (gnu home services gnupg) (gnu home services sound) + (gnu home services xdg) (gnu home services) (ruther home dwl wm) (ruther home themes) @@ -104,7 +105,7 @@ (gtk-theme-configuration (package icon-theme) (name (assoc-ref (package-properties icon-theme) 'dark-icon-theme-name)))) - (font-name "Ubuntu 12")))) + (font-name "Ubuntu 10")))) (service home-zsh-service-type (home-zsh-configuration @@ -116,7 +117,6 @@ (".config/waybar/config.jsonc" ,(local-file "dotfiles/waybar/config.jsonc")) (".config/waybar/style.css" ,(local-file "dotfiles/waybar/style.css")) (".config/mako/config" ,(local-file "dotfiles/mako")) - (".config/mimeapps.list" ,(local-file "dotfiles/mimeapps.list")) ;; Temporary until I figure out how to write those in Guile, ;; and put services into shepherd ones @@ -148,6 +148,47 @@ (family "serif") (prefer (family "Ubuntu"))))) + (service home-xdg-user-directories-service-type + (home-xdg-user-directories-configuration + (desktop "$HOME/desktop") + (documents "$HOME/doc") + (download "$HOME/download") + (music "$HOME/music") + (pictures "$HOME/pictures") + (publicshare "$HOME/public") + (templates "$HOME/templates") + (videos "$HOME/videos"))) + + (service home-xdg-mime-applications-service-type + (home-xdg-mime-applications-configuration + (default + '(("application/mp4" . "mpv.desktop") + ("application/pdf" . "org.pwmt.zathura.desktop") + ("image/gif" . "nsxiv.desktop") + ("image/jpeg" . "nsxiv.desktop") + ("image/png" . "nsxiv.desktop") + ("image/tiff" . "nsxiv.desktop") + ("image/webp" . "nsxiv.desktop") + + ("application/x-shellscript" . "emacsclient.desktop") + ("text/javascript" . "emacsclient.desktop") + ("text/markdown" . "emacsclient.desktop") + ("text/plain" . "emacsclient.desktop") + ("text/x-python3" . "emacsclient.desktop") + + ("video/h264" . "mpv.desktop") + ("video/h265" . "mpv.desktop") + ("video/h266" . "mpv.desktop") + ("video/mpeg" . "mpv.desktop") + + ("text/html" . "librewolf.desktop") + ("x-scheme-handler/about" . "librewolf.desktop") + ("x-scheme-handler/chrome" . "librewolf.desktop") + ("x-scheme-handler/file" . "emacsclient.desktop") + ("x-scheme-handler/http" . "librewolf.desktop") + ("x-scheme-handler/https" . "librewolf.desktop") + ("x-scheme-handler/unknown" . "librewolf.desktop"))))) + (service home-gpg-agent-service-type (home-gpg-agent-configuration (pinentry-program -- 2.48.1