uobikiemukot / yaft

yet another framebuffer terminal

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

customize size

bryfry opened this issue · comments

I have a separate fb program which uses the last (single) column of pixels on the screen to display a battery percentage bar. When fb refreshes overwrites these pixels. Would it be possible to change somewhere in yaft to not write to these pixels and to only see the screen size as 1 pixel less in with?

Thanks!

Hi,

Would it be possible to change somewhere in yaft to not write to these pixels and to only see the screen size as 1 pixel less in with?

Currently yaft does not support custom size feature, always uses whole screen.

I recommend to use text based status monitor programs (like i3status variants) and
screen/tmux status line feature.


in a special cases, yaft does not draw at the bottom of display:

  • for example, If font height equals 15 pixels and display height equals 29 pixels, yaft does not draw 14 pixels at the bottom

Or If you are willing to rewrite some codes, you can use this patch:
(drop the last terminal lines in this example)

diff --git a/yaft/terminal.c b/yaft/terminal.c
index b4455c3..def74a3 100644
--- a/yaft/terminal.c
+++ b/yaft/terminal.c
@@ -352,7 +352,7 @@ bool term_init(struct terminal_t *term, int width, int height)
        term->height = height;

        term->cols  = term->width / CELL_WIDTH;
-       term->lines = term->height / CELL_HEIGHT;
+       term->lines = term->height / CELL_HEIGHT - 1;

        term->esc.size = ESCSEQ_SIZE;