Shortened placeholders in bar

This commit is contained in:
2026-11-01 12:47:11 +01:00
parent 0649340152
commit 8e36c8c791
4 changed files with 6 additions and 8 deletions
+2 -2
View File
@@ -23,8 +23,8 @@ static uint32_t colors[][3] = {
/* tagging */ /* tagging */
static char *tags[] = { "1", "2", "3", "4", "5", "6", "7", "8", "9" }; static char *tags[] = { "1", "2", "3", "4", "5", "6", "7", "8", "9" };
static const char *tagempty = "[ - ]"; /* label of empty workspaces */ static const char *tagempty = " "; /* label of empty workspaces */
static const unsigned int tagtitlelen = 7; /* title characters per workspace label */ static const unsigned int tagtitlelen = 7; /* max title characters per workspace label */
/* logging */ /* logging */
static int log_level = WLR_ERROR; static int log_level = WLR_ERROR;
+2 -2
View File
@@ -23,8 +23,8 @@ static uint32_t colors[][3] = {
/* tagging */ /* tagging */
static char *tags[] = { "1", "2", "3", "4", "5", "6", "7", "8", "9" }; static char *tags[] = { "1", "2", "3", "4", "5", "6", "7", "8", "9" };
static const char *tagempty = "[ - ]"; /* label of empty workspaces */ static const char *tagempty = " "; /* label of empty workspaces */
static const unsigned int tagtitlelen = 7; /* title characters per workspace label */ static const unsigned int tagtitlelen = 7; /* max title characters per workspace label */
/* logging */ /* logging */
static int log_level = WLR_ERROR; static int log_level = WLR_ERROR;
BIN
View File
Binary file not shown.
+2 -4
View File
@@ -3110,8 +3110,8 @@ tag(const Arg *arg)
drawbars(); drawbars();
} }
/* Workspace label: first tagtitlelen characters of the tag's master client /* Workspace label: at most tagtitlelen characters of the tag's master client
* title, padded with spaces. Empty tags show tagempty. */ * title. Empty tags show tagempty. */
void void
taglabel(Monitor *m, unsigned int i, char *buf, size_t size) taglabel(Monitor *m, unsigned int i, char *buf, size_t size)
{ {
@@ -3139,8 +3139,6 @@ taglabel(Monitor *m, unsigned int i, char *buf, size_t size)
while ((*s & 0xc0) == 0x80 && n < size - 1); while ((*s & 0xc0) == 0x80 && n < size - 1);
chars++; chars++;
} }
for (; chars < tagtitlelen && n < size - 1; chars++)
buf[n++] = ' ';
buf[n] = '\0'; buf[n] = '\0';
} }