added file previev

This commit is contained in:
nova
2025-06-02 22:53:08 +02:00
parent f7c1d34e05
commit 0053c7cb88
6 changed files with 73 additions and 28 deletions

View File

@ -4,6 +4,7 @@
extern unsigned int status;
extern unsigned int timeout_time;
extern unsigned int color_count;
extern color *colors;
@ -88,13 +89,7 @@ void window_rgt(WINDOW *win){
mvwprintw(win, local_height/2, local_width/2, "LOADING");
status |= STATUS_UPDATE_SCREEN_0;
} else {
int i = 0;
for (i = 0; i < color_count; i++) {
wattron(win, COLOR_PAIR(colors[i].color_pair));
mvwprintw(win, i, 0, "%d", colors[i].color_pair);
mvwaddstr(win, i, 3,colors[i].file_extension);
wattroff(win, COLOR_PAIR(colors[i].color_pair));
}
print_dir(win, &rgt_file_count, rgt_content);
pthread_mutex_unlock(&mutex_rgt);
}
}