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

6
main.c
View File

@ -7,6 +7,7 @@
#include "window.h"
#include "interactions.h"
#include "defines.h"
#include "colors.h"
unsigned int terminal_height;
unsigned int terminal_width;
@ -75,6 +76,7 @@ int main() {
render_pass(win_t, win_b, win_l, win_m, win_r);
}
/*
threading_free();
pthread_join(thread_l, NULL);
@ -82,6 +84,7 @@ int main() {
pthread_join(thread_m, NULL);
pthread_join(thread_t, NULL);
pthread_join(thread_b, NULL);
*/
curs_set(1);
endwin();
@ -93,7 +96,6 @@ int main() {
void render_pass(WINDOW *win_t, WINDOW *win_b, WINDOW *win_l, WINDOW *win_m, WINDOW *win_r){
if ((status & STATUS_UPDATE_SCREEN_MASK) & STATUS_UPDATE_SCREEN_RESIZE) {
status |= STATUS_LOCK_MASK;
/*TODO: check if deallocation of window and reallocation is faster than this or not */
@ -116,7 +118,6 @@ void render_pass(WINDOW *win_t, WINDOW *win_b, WINDOW *win_l, WINDOW *win_m, WIN
mvwin(win_r, 1, ((terminal_width/3)*2));
status &= ~STATUS_LOCK_MASK;
status |= STATUS_UPDATE_SCREEN_0;
}
@ -147,6 +148,7 @@ void init() {
status = (STATUS_RUN_BACKEND | STATUS_UPDATE_SCREEN_MASK);
threading_init(); /* found in threading.c */
colors_init();
}