diff options
| author | bakkeby <[email protected]> | 2020-07-18 13:03:30 +0200 |
|---|---|---|
| committer | bakkeby <[email protected]> | 2020-07-18 13:03:30 +0200 |
| commit | 664484d572719df5c105b386fa30e8ba0b7825fa (patch) | |
| tree | e2acd303fb33b74a930dbdabd4430a9c3072e0a9 /patch/bar_wintitle.c | |
| parent | ad09397ad965d6104134bce7df5ad13ecfb97014 (diff) | |
| download | dwm-flexipatch-664484d572719df5c105b386fa30e8ba0b7825fa.tar.gz dwm-flexipatch-664484d572719df5c105b386fa30e8ba0b7825fa.zip | |
Refinement
Diffstat (limited to 'patch/bar_wintitle.c')
| -rw-r--r-- | patch/bar_wintitle.c | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/patch/bar_wintitle.c b/patch/bar_wintitle.c index 36889c1..70c42ce 100644 --- a/patch/bar_wintitle.c +++ b/patch/bar_wintitle.c @@ -1,11 +1,11 @@ int -width_wintitle(Monitor *m, BarWidthArg *a) +width_wintitle(Bar *bar, BarWidthArg *a) { return a->max_width; } int -draw_wintitle(Monitor *m, BarDrawArg *a) +draw_wintitle(Bar *bar, BarDrawArg *a) { #if !BAR_ACTIVETAGINDICATORBAR_PATCH && !BAR_ACTIVETAGINDICATORBAR_ALT1_PATCH #if BAR_PANGO_PATCH @@ -19,7 +19,17 @@ draw_wintitle(Monitor *m, BarDrawArg *a) #else int boxw = drw->fonts->h / 6 + 2; #endif // BAR_PANGO_PATCH + + #if BAR_TITLE_LEFT_PAD && BAR_TITLE_RIGHT_PAD + int x = a->x + lrpad / 2, w = a->w - lrpad; + #elif BAR_TITLE_LEFT_PAD + int x = a->x + lrpad / 2, w = a->w - lrpad / 2; + #elif BAR_TITLE_RIGHT_PAD + int x = a->x, w = a->w - lrpad / 2; + #else int x = a->x, w = a->w; + #endif // BAR_TITLE_LEFT_PAD | BAR_TITLE_RIGHT_PAD + Monitor *m = bar->mon; if (m->sel) { #if BAR_VTCOLORS_PATCH @@ -70,7 +80,7 @@ draw_wintitle(Monitor *m, BarDrawArg *a) } int -click_wintitle(Monitor *m, Arg *arg, BarClickArg *a) +click_wintitle(Bar *bar, Arg *arg, BarClickArg *a) { return ClkWinTitle; } |
