diff options
| author | Inqiyad Sabr <sabr@ariamath.xyz> | 2025-10-19 23:17:43 +0600 |
|---|---|---|
| committer | Inqiyad Sabr <sabr@ariamath.xyz> | 2025-10-19 23:17:43 +0600 |
| commit | ea5380fccb9f962203726540d69cb490048de7c0 (patch) | |
| tree | ceb8f56cef8deb086a328bfe840e327da7f16452 /block.c | |
Add files
Diffstat (limited to 'block.c')
| -rw-r--r-- | block.c | 18 |
1 files changed, 18 insertions, 0 deletions
@@ -0,0 +1,18 @@ +#include <stdio.h> +#define BORDER_WIDTH "10" +void block( + char *text, char *fg, + char *bg, char *bc +){ + fputs("{",stdout); + printf("\"full_text\":\"%s\",",text); + printf("\"color\":\"%s\",",fg); + printf("\"background\":\"%s\",",bg); + printf("\"border\":\"%s\",",bc); + fputs("\"border_top\":\""BORDER_WIDTH"\",",stdout); + fputs("\"border_bottom\":\""BORDER_WIDTH"\",",stdout); + fputs("\"border_left\":\""BORDER_WIDTH"\",",stdout); + fputs("\"border_right\":\""BORDER_WIDTH"\",",stdout); + fputs("\"separator\":false},",stdout); + fflush(stdout); +} |