From ca564d88a0836028942fa34cdcf3583536c6d209 Mon Sep 17 00:00:00 2001 From: speedie Date: Mon, 5 Dec 2022 21:16:32 +0100 Subject: [PATCH] remove statuscmd from powerline as it doesn't work well at all --- bar/statusbar-powerline.c | 26 +------------------------- bar/statusbar-powerline.h | 1 - 2 files changed, 1 insertion(+), 26 deletions(-) diff --git a/bar/statusbar-powerline.c b/bar/statusbar-powerline.c index b160d24..6ca325c 100644 --- a/bar/statusbar-powerline.c +++ b/bar/statusbar-powerline.c @@ -4,34 +4,10 @@ click_status_pwl(Bar *bar, Arg *arg, BarClickArg *a) if (selmon->hidestatus) { return 0; } else { - return click_status_text(arg, a->rel_x, rawstext); + return ClkStatusText; } } -int -click_status_text_pwl(Arg *arg, int rel_x, char *text) -{ - int i = -1; - int x = 0; - char ch; - clickstatusn = 0; - while (text[++i]) { - if ((unsigned char)text[i] < ' ') { - ch = text[i]; - text[i] = '\0'; - x += textlength(text); - text[i] = ch; - text += i+1; - i = -1; - if (x >= rel_x) - break; - if (ch <= LENGTH(clickstatuss)) - clickstatusn = ch; - } - } - return ClkStatusText; -} - int width_status_pwl(Bar *bar, BarWidthArg *a) { diff --git a/bar/statusbar-powerline.h b/bar/statusbar-powerline.h index 8742bf4..ed5a400 100644 --- a/bar/statusbar-powerline.h +++ b/bar/statusbar-powerline.h @@ -1,6 +1,5 @@ static int width_status_pwl(Bar *bar, BarWidthArg *a); static int draw_status_pwl(Bar *bar, BarDrawArg *a); static int click_status_pwl(Bar *bar, Arg *arg, BarClickArg *a); -static int click_status_text_pwl(Arg *arg, int rel_x, char *text); static int drawpowerlinestatus(int x, char *stext); static int widthpowerlinestatus(char *stext);