use hm for xdg dirs

This commit is contained in:
jacekpoz 2024-02-14 21:14:14 +01:00
parent 10ae3b11c3
commit de49dd1457
No known key found for this signature in database
GPG key ID: 94E812A8B12AAE3C
2 changed files with 46 additions and 45 deletions

View file

@ -153,11 +153,6 @@
MOZ_ENABLE_WAYLAND = "1"; MOZ_ENABLE_WAYLAND = "1";
MOZ_DRM_DEVICE = "/dev/dri/card0"; MOZ_DRM_DEVICE = "/dev/dri/card0";
XDG_DATA_HOME = "\$HOME/.local/share";
XDG_CONFIG_HOME = "\$HOME/.config";
XDG_STATE_HOME = "\$HOME/.local/state";
XDG_CACHE_HOME = "\$HOME/.cache";
HISTFILE = "\${XDG_STATE_HOME}/bash/history"; HISTFILE = "\${XDG_STATE_HOME}/bash/history";
CARGO_HOME = "\${XDG_DATA_HOME}/cargo"; CARGO_HOME = "\${XDG_DATA_HOME}/cargo";
GTK2_RC_FILES = "\${XDG_CONFIG_HOME}/gtk-2.0/gtkrc"; GTK2_RC_FILES = "\${XDG_CONFIG_HOME}/gtk-2.0/gtkrc";

View file

@ -11,46 +11,52 @@
text_editor = "nvim.desktop"; text_editor = "nvim.desktop";
in { in {
home-manager.users.${config'.username} = { home-manager.users.${config'.username} = {
xdg.mimeApps = { xdg = {
enable = true; cacheHome = "~/.cache";
defaultApplications = { configHome = "~/.config";
"text/html" = [ primary_browser secondary_browser ]; dataHome = "~/.local/share";
"x-scheme-handler/http" = [ primary_browser secondary_browser ]; stateHome = "~/.local/state";
"x-scheme-handler/https" = [ primary_browser secondary_browser ]; mimeApps = {
"x-scheme-handler/about" = [ primary_browser secondary_browser ]; enable = true;
"x-scheme-handler/unknown" = [ primary_browser secondary_browser ]; defaultApplications = {
"x-scheme-handler/mailto" = [ mail_client ]; "text/html" = [ primary_browser secondary_browser ];
"message/rfc822" = [ mail_client ]; "x-scheme-handler/http" = [ primary_browser secondary_browser ];
"x-scheme-handler/mid" = [ mail_client ]; "x-scheme-handler/https" = [ primary_browser secondary_browser ];
"inode/directory" = [ file_manager ]; "x-scheme-handler/about" = [ primary_browser secondary_browser ];
"x-scheme-handler/heroic" = [ "heroic.desktop" ]; "x-scheme-handler/unknown" = [ primary_browser secondary_browser ];
"audio/mp3" = [ media_player ]; "x-scheme-handler/mailto" = [ mail_client ];
"audio/ogg" = [ media_player ]; "message/rfc822" = [ mail_client ];
"audio/mpeg" = [ media_player ]; "x-scheme-handler/mid" = [ mail_client ];
"audio/aac" = [ media_player ]; "inode/directory" = [ file_manager ];
"audio/opus" = [ media_player ]; "x-scheme-handler/heroic" = [ "heroic.desktop" ];
"audio/wav" = [ media_player ]; "audio/mp3" = [ media_player ];
"audio/webm" = [ media_player ]; "audio/ogg" = [ media_player ];
"audio/3gpp" = [ media_player ]; "audio/mpeg" = [ media_player ];
"audio/3gpp2" = [ media_player ]; "audio/aac" = [ media_player ];
"video/mp4" = [ media_player ]; "audio/opus" = [ media_player ];
"video/x-msvideo" = [ media_player ]; "audio/wav" = [ media_player ];
"video/mpeg" = [ media_player ]; "audio/webm" = [ media_player ];
"video/ogg" = [ media_player ]; "audio/3gpp" = [ media_player ];
"video/mp2t" = [ media_player ]; "audio/3gpp2" = [ media_player ];
"video/webm" = [ media_player ]; "video/mp4" = [ media_player ];
"video/3gpp" = [ media_player ]; "video/x-msvideo" = [ media_player ];
"video/3gpp2" = [ media_player ]; "video/mpeg" = [ media_player ];
"image/png" = [ image_viewer ]; "video/ogg" = [ media_player ];
"image/jpeg" = [ image_viewer ]; "video/mp2t" = [ media_player ];
"image/gif" = [ image_viewer ]; "video/webm" = [ media_player ];
"image/avif" = [ image_viewer ]; "video/3gpp" = [ media_player ];
"image/bmp" = [ image_viewer ]; "video/3gpp2" = [ media_player ];
"image/vnd.microsoft.icon" = [ image_viewer ]; "image/png" = [ image_viewer ];
"image/svg+xml" = [ image_viewer ]; "image/jpeg" = [ image_viewer ];
"image/tiff" = [ image_viewer ]; "image/gif" = [ image_viewer ];
"image/webp" = [ image_viewer ]; "image/avif" = [ image_viewer ];
"text/plain" = [ text_editor ]; "image/bmp" = [ image_viewer ];
"image/vnd.microsoft.icon" = [ image_viewer ];
"image/svg+xml" = [ image_viewer ];
"image/tiff" = [ image_viewer ];
"image/webp" = [ image_viewer ];
"text/plain" = [ text_editor ];
};
}; };
}; };
}; };