diff --git a/img/logo.txt b/img/logo.txt deleted file mode 100644 index 96357cf..0000000 --- a/img/logo.txt +++ /dev/null @@ -1,17 +0,0 @@ - .,,,,,,,,,,,,,,,#&&&&&&&&,,,,. - ,,,&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&,, - ,&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&,,* -,,&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&%,,% -.,&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&,,,% -,,&&&&&&&&&&&&&&&&&&&&&&&&&&,,,&&&&&&&&,,,,% - ,,&&&&&&&&,,,&&&&&&&&&&&&&&&&&&&&&&&,,,%% - ,,&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&,,,%. - ,,&&&&&&&&&&&&&&&&&&&,&&&&&&&&&&&&*,,% - ,&&&&&&&&&&&&,,&&&&*,&&&&&&&&&&&&&,,% - ,&&&&&&&&&&&&&&&,,*&&&&&&&&&&&&&&&,,,% - ,&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&,,,% - ,,&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&,,,% - ,,&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&(,,% - ,&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&,,,% - ,&&&&&&&&/,,,,,,,,,,,,,,,,,,,,,,,,,,% - ,,,,,,,,,,(%%%%%%%%%%%%%(,,,,,,,.. \ No newline at end of file diff --git a/img/toast.txt b/img/toast.txt deleted file mode 100644 index 493ea8c..0000000 --- a/img/toast.txt +++ /dev/null @@ -1,3 +0,0 @@ - ╔╦╗╔═╗╔═╗╔═╗╔╦╗ - ║ ║ ║╠═╣╚═╗ ║ - ╩ ╚═╝╩ ╩╚═╝ ╩ \ No newline at end of file diff --git a/toast.c b/toast.c index 0bfaeb7..fba5011 100644 --- a/toast.c +++ b/toast.c @@ -22,6 +22,25 @@ #define TP_COL_W 6 #define TMP_PREC 1 +char toast_logo[] = "\ + .,,,,,,,,,,,,,,,#&&&&&&&&,,,,. \n\ + ,,,&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&,, \n\ + ,&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&,,* \n\ +,,&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&%,,%\n\ +.,&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&,,,%\n\ +,,&&&&&&&&&&&&&&&&&&&&&&&&&&,,,&&&&&&&&,,,,%\n\ + ,,&&&&&&&&,,,&&&&&&&&&&&&&&&&&&&&&&&,,,%% \n\ + ,,&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&,,,%. \n\ + ,,&&&&&&&&&&&&&&&&&&&,&&&&&&&&&&&&*,,% \n\ + ,&&&&&&&&&&&&,,&&&&*,&&&&&&&&&&&&&,,% \n\ + ,&&&&&&&&&&&&&&&,,*&&&&&&&&&&&&&&&,,,% \n\ + ,&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&,,,% \n\ + ,,&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&,,,% \n\ + ,,&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&(,,% \n\ + ,&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&,,,% \n\ + ,&&&&&&&&/,,,,,,,,,,,,,,,,,,,,,,,,,,% \n\ + ,,,,,,,,,,(%%%%%%%%%%%%%(,,,,,,,.." ; + struct curses_info { WINDOW *window; int old_cursor; @@ -70,25 +89,18 @@ int get_num_thermal_zones() { } void print_logo() { - FILE* f = fopen("./img/logo.txt", "r"); - if (f == NULL) { - perror("Could not read logo file"); - } - - char *line = NULL; - size_t len = 0; - ssize_t read; + attron(COLOR_PAIR(PRIM_COLOR)); + int i = 0; + char *line = strtok(toast_logo, "\n"); - attron(COLOR_PAIR(PRIM_COLOR)); - while ((read = getline(&line, &len, f)) != -1) { + while (line != NULL) { mvprintw(i + 1, 40, "%s", line); - i++; + line = strtok(NULL, "\n"); + i++; } - attroff(COLOR_PAIR(PRIM_COLOR)); - fclose(f); - if (line) free(line); + attroff(COLOR_PAIR(PRIM_COLOR)); } void print_header() { @@ -200,4 +212,5 @@ int main() { stop_curses(); cleanup(); + return 0; }