1
0
Fork 0
mirror of https://github.com/nix-community/home-manager synced 2024-11-26 21:19:45 +01:00

lsd: add support for icons.yaml

This update introduces support for icons.yaml in the lsd module,
enhancing the customization options for file icons.
This commit is contained in:
Roberto Abdelkader Martínez Pérez 2024-10-15 21:06:17 +02:00
parent e1aec543f5
commit 41ea217558
No known key found for this signature in database
GPG key ID: 76D4BC436CD4D007

View file

@ -65,6 +65,30 @@ in {
automatically set to `"custom"`. automatically set to `"custom"`.
''; '';
}; };
icons = mkOption {
type = yamlFormat.type;
default = { };
example = {
name = {
".trash" = "";
".cargo" = "";
};
extension = {
"go" = "";
"hs" = "";
};
filetype = {
"dir" = "📂";
"file" = "📄";
};
};
description = ''
Configuration written to {file}`$XDG_CONFIG_HOME/lsd/icons.yaml`. See
<https://github.com/lsd-rs/lsd?tab=readme-ov-file#icon-theme-file-content> for
details.
'';
};
}; };
config = mkIf cfg.enable { config = mkIf cfg.enable {
@ -91,6 +115,10 @@ in {
source = yamlFormat.generate "lsd-colors" cfg.colors; source = yamlFormat.generate "lsd-colors" cfg.colors;
}; };
xdg.configFile."lsd/icons.yaml" = mkIf (cfg.icons != { }) {
source = yamlFormat.generate "lsd-icons" cfg.icons;
};
xdg.configFile."lsd/config.yaml" = mkIf (cfg.settings != { }) { xdg.configFile."lsd/config.yaml" = mkIf (cfg.settings != { }) {
source = yamlFormat.generate "lsd-config" cfg.settings; source = yamlFormat.generate "lsd-config" cfg.settings;
}; };