change default layout names, add ><>
This commit is contained in:
parent
4074f10be6
commit
cf5306d92c
3 changed files with 8 additions and 8 deletions
|
@ -14,10 +14,11 @@ static char *tags[] = { "1", "2", "3", "4", "5", "6", "7", "8", "9" };
|
|||
/* layout name replacement values */
|
||||
static const char *layouts[][2] = {
|
||||
/* layout name replace */
|
||||
{ "rivertile - left", "=[]" },
|
||||
{ "rivertile - right", "[]=" },
|
||||
{ "rivertile - left", "[]=" },
|
||||
{ "rivertile - right", "=[]" },
|
||||
{ "rivertile - top", "[^]" },
|
||||
{ "rivertile - bottom", "[_]" },
|
||||
{ NULL, "><>" }, /* no layout, last layout */
|
||||
};
|
||||
|
||||
static const char *termcmd[] = { "foot", NULL };
|
||||
|
|
BIN
dam-demo.jpg
BIN
dam-demo.jpg
Binary file not shown.
Before Width: | Height: | Size: 13 KiB After Width: | Height: | Size: 14 KiB |
11
dam.c
11
dam.c
|
@ -254,11 +254,10 @@ bar_draw(Bar *bar)
|
|||
x = drwl_text(bar->drw, x, 0, w, bar->height, bar->lrpad / 2, mode, 0);
|
||||
}
|
||||
|
||||
if (bar->layout) {
|
||||
w = TEXTW(bar, bar->layout);
|
||||
drwl_setscheme(bar->drw, colors[SchemeNorm]);
|
||||
x = drwl_text(bar->drw, x, 0, w, bar->height, bar->lrpad / 2, bar->layout, 0);
|
||||
}
|
||||
bar->layout = bar->layout ? bar->layout : strdup(layouts[LENGTH(layouts)-1][1]);
|
||||
w = TEXTW(bar, bar->layout);
|
||||
drwl_setscheme(bar->drw, colors[SchemeNorm]);
|
||||
x = drwl_text(bar->drw, x, 0, w, bar->height, bar->lrpad / 2, bar->layout, 0);
|
||||
|
||||
if ((w = bar->width - tw - x) > bar->height) {
|
||||
if (bar->title) {
|
||||
|
@ -354,7 +353,7 @@ output_status_handle_layout_name(void *data,
|
|||
if (bar->layout)
|
||||
free(bar->layout);
|
||||
for (i = 0; i < LENGTH(layouts); i++)
|
||||
if (!strcmp(name, layouts[i][0]))
|
||||
if (layouts[i][0] && !strcmp(name, layouts[i][0]))
|
||||
name = layouts[i][1];
|
||||
bar->layout = strdup(name);
|
||||
bar_frame(bar);
|
||||
|
|
Loading…
Add table
Reference in a new issue