Compare commits

..

2 Commits

Author SHA1 Message Date
Hamza 0956b291dd Merge 9dc4e9e9ec into efaef82d5e 2025-05-07 12:28:12 +00:00
Hamza 9dc4e9e9ec fix the title centering ig 2024-07-19 18:25:17 +01:00
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -28,7 +28,7 @@ dwl -s 'dwlb -font "monospace:size=16"'
``` ```
## Ipc ## Ipc
If dwl is [patched](https://codeberg.org/dwl/dwl-patches/src/branch/main/patches/ipc) appropriately, dwlb is capable of communicating directly with dwl. When ipc is enabled with `-ipc`, dwlb does not read from stdin, and clicking tags functions as you would expect. Ipc can be disabled with `-no-ipc`. If dwl is [patched](https://github.com/djpohly/dwl/wiki/ipc) appropriately, dwlb is capable of communicating directly with dwl. When ipc is enabled with `-ipc`, dwlb does not read from stdin, and clicking tags functions as you would expect. Ipc can be disabled with `-no-ipc`.
## Commands ## Commands
Command options send instructions to existing instances of dwlb. All commands take at least one argument to specify a bar on which to operate. This may be zxdg_output_v1 name, "all" to affect all outputs, or "selected" for the current output. Command options send instructions to existing instances of dwlb. All commands take at least one argument to specify a bar on which to operate. This may be zxdg_output_v1 name, "all" to affect all outputs, or "selected" for the current output.
+1 -1
View File
@@ -457,7 +457,7 @@ draw_frame(Bar *bar)
uint32_t nx; uint32_t nx;
if (center_title) { if (center_title) {
uint32_t title_width = TEXT_WIDTH(custom_title ? bar->title.text : bar->window_title, bar->width - status_width - x, 0); uint32_t title_width = TEXT_WIDTH(custom_title ? bar->title.text : bar->window_title, bar->width - status_width - x, 0);
nx = MAX(x, MIN((bar->width - title_width) / 2, bar->width - status_width - title_width)); nx = MAX(x, MIN(((bar->width - title_width - x - status_width) / 2) + x, bar->width - status_width - title_width));
} else { } else {
nx = MIN(x + bar->textpadding, bar->width - status_width); nx = MIN(x + bar->textpadding, bar->width - status_width);
} }