diff --git a/bt.c b/bt.c index 149a3b3..693e461 100644 --- a/bt.c +++ b/bt.c @@ -4,7 +4,6 @@ #include #include #include -#include #include #include #include @@ -35,7 +34,7 @@ void spawn(file_descriptors *fds) { dup2(fds->child, 1); dup2(fds->child, 2); - execle("/bin/dash", "-/bin/dash", (char *)NULL, (char *[]){ "TERM=dumb", NULL }); + execle("/bin/bash", "-/bin/bash", (char *)NULL, (char *[]){ "TERM=dumb", NULL }); } else { close(fds->child); } @@ -43,15 +42,15 @@ void spawn(file_descriptors *fds) { static float fontsize = 12; -Font *load_font() { +Font *load_font(void) { unsigned int file_size = 0; char *font = "./fira.ttf"; unsigned char *fontdata = LoadFileData(font, &file_size); Font *fontDefault = calloc(1, sizeof(Font)); - fontDefault->baseSize = fontsize; + fontDefault->baseSize = (int)fontsize; fontDefault->glyphCount = 95; - fontDefault->glyphs = LoadFontData(fontdata, file_size, 16, 0, 95, FONT_DEFAULT); + fontDefault->glyphs = LoadFontData(fontdata, (int)file_size, 16, 0, 95, FONT_DEFAULT); Image atlas = GenImageFontAtlas(fontDefault->glyphs, &fontDefault->recs, 95, 16, 4, 0); fontDefault->texture = LoadTextureFromImage(atlas); UnloadImage(atlas); @@ -130,7 +129,7 @@ int main(void) { sb.height = MeasureTextEx(*fontDefault, sb.buf, fontsize, 1).y; if (new_read || new_char) { - if (sb.height - abs((int)sb.ypos) + fontsize > screenHeight) { + if (sb.height - (float)abs((int)sb.ypos) + fontsize > (float)screenHeight) { sb.ypos = -(sb.height - screenHeight) - fontsize; } new_read = false; diff --git a/project.todo b/project.todo new file mode 100644 index 0000000..e6070a0 --- /dev/null +++ b/project.todo @@ -0,0 +1,28 @@ +#-*- mode: org -*- +#+TODO: BLOCKED TODO INPROGRESS | DONE BACKLOG +#+STARTUP: overview + + +* DONE Render with Raylib +* DONE Load custom Mono font +* DONE Render input from user +* DONE Do not block Raylib so we can loop while reading +* DONE Create scrollback struct +* DONE Scrolling the scrollback buffer +* DONE Auto-scrolling +* DONE Render scrollback by rows +* DONE Handle color escape sequences +* TODO Backspace and Return aren't repeating [[https://github.com/raysan5/raylib/issues/2041][Issue Here]] +* TODO Switch to SDL2 +* TODO Only draw scrollback that is visible +* TODO Improve the scrolling to match first and last lines +* TODO Handle unicode characters +* TODO Handle canonical and raw commands +* TODO Mouse copy/paste +* TODO Manually control when raylib updates/draws +* TODO Create basic vertical splits + +* COMMENT Local variables +;; Local Variables: +;; eval: (olivetti-mode t) +;; End: