aboutsummaryrefslogtreecommitdiffstats
path: root/src/icon.h
blob: bf276c0ae4d6be9e25197c4cd38e1cd54aaa11fd (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#ifndef SF_ICON_H
#define SF_ICON_H

#include <stdbool.h>

#define DEFAULT_DIR_ICON "󰉋"
#define DEFAULT_FILE_ICON "󰈔"

typedef struct {
	const char *key;
	const char *icon; // Nerd Font icon
} icon_pair;

static const icon_pair exact_match_icons[] = {
    {"Makefile", ""},	    {"Dockerfile", "󰡨"}, {".gitignore", ""},
    {".clang-format", ""}, {"README.md", "󰍔"},
};

static const icon_pair ext_icons[] = {
    {"c", ""},	  {"h", ""},	{"cpp", ""}, {"py", ""},  {"rs", ""},
    {"go", ""},  {"sh", ""},	{"org", ""}, {"md", ""},  {"json", ""},
    {"png", "󰋩"}, {"jpg", "󰋩"}, {"zip", "󰿺"}, {"tar", "󰿺"}, {"gz", "󰿺"},
};

const char *get_file_icon(const char *filename, bool is_dir);

#endif /* SF_ICON_H */