Improve layout symbol functions
This commit is contained in:
parent
e93ff551de
commit
ee0c5ec71e
1 changed files with 4 additions and 4 deletions
|
@ -30,7 +30,7 @@ void layouts_symbol_monocle(
|
||||||
if (buffer == NULL) return;
|
if (buffer == NULL) return;
|
||||||
|
|
||||||
char tmp[TMP_BUFFER_SIZE];
|
char tmp[TMP_BUFFER_SIZE];
|
||||||
sprintf(tmp, "[%u]", visible_clients);
|
sprintf(tmp, "[%u/%u]", clients_in_master, visible_clients);
|
||||||
tmp[(buffer_size > TMP_BUFFER_SIZE ? TMP_BUFFER_SIZE : buffer_size) - 1] = '\0';
|
tmp[(buffer_size > TMP_BUFFER_SIZE ? TMP_BUFFER_SIZE : buffer_size) - 1] = '\0';
|
||||||
strncpy(buffer, tmp, buffer_size);
|
strncpy(buffer, tmp, buffer_size);
|
||||||
}
|
}
|
||||||
|
@ -45,7 +45,7 @@ void layouts_symbol_floating(
|
||||||
if (buffer == NULL) return;
|
if (buffer == NULL) return;
|
||||||
|
|
||||||
char tmp[TMP_BUFFER_SIZE];
|
char tmp[TMP_BUFFER_SIZE];
|
||||||
strcpy(tmp, "><>");
|
sprintf(tmp, "<%u/%u>", clients_in_master, visible_clients);
|
||||||
tmp[(buffer_size > TMP_BUFFER_SIZE ? TMP_BUFFER_SIZE : buffer_size) - 1] = '\0';
|
tmp[(buffer_size > TMP_BUFFER_SIZE ? TMP_BUFFER_SIZE : buffer_size) - 1] = '\0';
|
||||||
strncpy(buffer, tmp, buffer_size);
|
strncpy(buffer, tmp, buffer_size);
|
||||||
}
|
}
|
||||||
|
@ -60,7 +60,7 @@ void layouts_symbol_tile(
|
||||||
if (buffer == NULL) return;
|
if (buffer == NULL) return;
|
||||||
|
|
||||||
char tmp[TMP_BUFFER_SIZE];
|
char tmp[TMP_BUFFER_SIZE];
|
||||||
sprintf(tmp, "[%u]=", clients_in_master);
|
sprintf(tmp, "{%u/%u}=", clients_in_master, visible_clients);
|
||||||
tmp[(buffer_size > TMP_BUFFER_SIZE ? TMP_BUFFER_SIZE : buffer_size) - 1] = '\0';
|
tmp[(buffer_size > TMP_BUFFER_SIZE ? TMP_BUFFER_SIZE : buffer_size) - 1] = '\0';
|
||||||
strncpy(buffer, tmp, buffer_size);
|
strncpy(buffer, tmp, buffer_size);
|
||||||
}
|
}
|
||||||
|
@ -75,7 +75,7 @@ void layouts_symbol_centeredmaster(
|
||||||
if (buffer == NULL) return;
|
if (buffer == NULL) return;
|
||||||
|
|
||||||
char tmp[TMP_BUFFER_SIZE];
|
char tmp[TMP_BUFFER_SIZE];
|
||||||
sprintf(tmp, "=[%u]=", clients_in_master);
|
sprintf(tmp, "={%u/%u}=", clients_in_master, visible_clients);
|
||||||
tmp[(buffer_size > TMP_BUFFER_SIZE ? TMP_BUFFER_SIZE : buffer_size) - 1] = '\0';
|
tmp[(buffer_size > TMP_BUFFER_SIZE ? TMP_BUFFER_SIZE : buffer_size) - 1] = '\0';
|
||||||
strncpy(buffer, tmp, buffer_size);
|
strncpy(buffer, tmp, buffer_size);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue