Skip to content

Commit

Permalink
make your bar
Browse files Browse the repository at this point in the history
  • Loading branch information
FT-Labs committed Jul 25, 2022
1 parent f730822 commit eb1b8e3
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions dwm.c
Original file line number Diff line number Diff line change
Expand Up @@ -1112,14 +1112,13 @@ drawbar(Monitor *m, Client *cdock)
twtmp -= sb_icon_wh + sb_icon_margin_x;
drw_text(drw, m->ww - twtmp, y, TEXTW_SB(sb_arr[i]), bh, 0, sb_arr[i], 0);
twtmp -= TEXTW_SB(sb_arr[i]);
}
else {
} else {
if (sb_arr[i][strlen(sb_arr[i]) - 1] == '%') {
char buf[3];
char buf[strlen(sb_arr[i])];
char* tmp;
int x = 0;

strncpy(buf, sb_arr[i] + strlen(sb_arr[i]) - 5, strlen(sb_arr[i]) - 1);
strncpy(buf, sb_arr[i], strlen(sb_arr[i]) - 1);
tmp = buf;
x = atoi(tmp);

Expand Down

0 comments on commit eb1b8e3

Please sign in to comment.