opening files using mimetypes defined in config.h

This commit is contained in:
nova
2025-06-18 04:08:02 +02:00
parent 1485d69cad
commit f99035629a
10 changed files with 106 additions and 41 deletions

15
main.c
View File

@ -20,6 +20,7 @@ unsigned int status;
unsigned int timeout_time = 0;
char input = 0;
void render_pass(WINDOW *wint, WINDOW *winb, WINDOW *winl, WINDOW *winm, WINDOW *winr);
void init();
@ -96,9 +97,15 @@ int main(){
pthread_join(thread_b, NULL);
*/
curs_set(1);
delwin(win_l);
delwin(win_m);
delwin(win_r);
delwin(win_t);
delwin(win_b);
endwin();
refresh();
noraw();
curs_set(1);
echo();
return 0;
}
@ -106,6 +113,10 @@ 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) {
if (status & STATUS_UPDATE_SCREEN_RELOAD_FULL) {
clear();
status &= ~STATUS_UPDATE_SCREEN_RELOAD_FULL;
}
/*TODO: check if deallocation of window and reallocation is faster than this or not */