Skip to content

Commit

Permalink
display: add no-line wrapping
Browse files Browse the repository at this point in the history
Now it's a real neofetch program fr

explaination: 	when line wrapping is disabled and the terminal is too small for the fonts to render in a single line
		then it just won't render the rest, maybe the lastest character.
		This is how neofetch does and fastfetch too (I guess?)

Maybe i'll add a configuration setting which you can just disable it
  • Loading branch information
Toni500github committed Oct 22, 2024
1 parent 8c7caaa commit c79316f
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -486,7 +486,13 @@ int main(int argc, char *argv[])
"Compile customfetch with GUI_MODE=1 or contact your distro to enable it");
#endif

// hide cursor and disable line wrapping
fmt::print("\x1B[?25l\x1B[?7l");

Display::display(Display::render(config, colors, false, path));

// enable both of them again
fmt::print("\x1B[?25h\x1B[?7h");

return 0;
}

0 comments on commit c79316f

Please sign in to comment.