lsd icon indicating copy to clipboard operation
lsd copied to clipboard

refactoring `src/theme/icons.rs`

Open scarf005 opened this issue 2 years ago • 1 comments

Directly using emojis

https://github.com/lsd-rs/lsd/blob/ea56a7c385db4d4e67992d2d13de94ebc2a97234/src/theme/icon.rs#L41-L56

would it be useful to directly use emoji?

impl Default for ByType {
    fn default() -> ByType {
        ByType {
            dir: "".into(),          // 
            file: "".into(),         // 
            pipe: "".into(),         // 
            socket: "".into(),       // 
            executable: "".into(),   // 
            symlink_dir: "".into(),  // 
            symlink_file: "".into(), // 
            device_char: "".into(),  // 
            device_block: "ﰩ".into(), // ﰩ
            special: "".into(),      // 
        }
    }
}

Compiletime Hashset

https://github.com/lsd-rs/lsd/blob/ea56a7c385db4d4e67992d2d13de94ebc2a97234/src/theme/icon.rs#L99-L101

using phf set could help with storing duplicate default values

scarf005 avatar Mar 10 '23 03:03 scarf005

Hi @scarf005, we originally launched with nerd font, and we would keep the nerd font as the default.

and we now provide the icon theme, so that you could always create an icon theme by yourself, using anything you like, emoji of cause.

also, as emoji now rules the world, maybe it is not a bad idea to provide an optional built-in theme using emoji.

/kind enhancement

zwpaper avatar Jul 04 '23 03:07 zwpaper