implementation of file type & extension based coloring

This commit is contained in:
nova
2025-05-08 21:15:14 +02:00
parent 37d5531aa7
commit 6f7415a913
3 changed files with 55 additions and 7 deletions

View File

@ -16,6 +16,15 @@
#define FILE_MODIFIERS_SORT_REVERSE 64
/*FILE_MODIFIERS_SORT_NATURAL is when bitmask is 0*/
#define COLOR_REGULAR 0
#define COLOR_DIR 1
#define COLOR_BLOCK 2
#define COLOR_CHARDEV 3
#define COLOR_SYMLINK 4
#define COLOR_FIFO 5
#define COLOR_SOCK 6
#define COLOR_PATH
#ifndef GUARD
#define GUARD
@ -26,5 +35,9 @@ typedef struct File {
unsigned long file_name_width;
unsigned long file_size_bytes;
} file;
typedef struct Color {
char *file_extension;
short color_pair;
} color;
#endif