diff options
author | 2024-11-21 12:35:14 -0500 | |
---|---|---|
committer | 2024-11-21 12:35:14 -0500 | |
commit | 7539914ba81183bbc1506952d7ed260e0c4ec9ca (patch) | |
tree | e2ea98cde4126721608c61a115f94e6a3dc50f99 /src/lib.rs |
Thu Nov 21 12:35:14 PM EST 2024
Diffstat (limited to 'src/lib.rs')
-rw-r--r-- | src/lib.rs | 67 |
1 files changed, 67 insertions, 0 deletions
diff --git a/src/lib.rs b/src/lib.rs new file mode 100644 index 0000000..ff031ee --- /dev/null +++ b/src/lib.rs @@ -0,0 +1,67 @@ +use lazy_static::lazy_static; +use std::collections::HashMap; + +#[derive(Debug, Clone, Copy)] +pub struct FileIcon { + pub icon: char, + pub color: u32, +} + +impl Default for FileIcon { + fn default() -> Self { + Self { + icon: '', + color: 0xFFFFFF, + } + } +} + +lazy_static! { + pub static ref ICONS_BY_EXTENSION: HashMap<&'static str, FileIcon> = HashMap::from([ + ( + "glb", + FileIcon { + icon: '', + color: 0x87C63E, + } + ), + ( + "gltf", + FileIcon { + icon: '', + color: 0x87C63E, + } + ), + ( + "png", + FileIcon { + icon: '', + color: 0xA074C4, + } + ), + ( + "rs", + FileIcon { + icon: '', + color: 0xDEA584, + } + ), + ( "mid", + FileIcon { + icon: '', + color: 0x800080, + } + ), + ( "wav", + FileIcon { + icon: '', + color: 0xF74231, + } + ) + ]); +} + +pub const FOLDER_ICON: FileIcon = FileIcon { + icon: '', + color: 0xFFFFFF, +}; |