Compare commits

...

4 Commits

Author SHA1 Message Date
Hamza
c8f50728e1
Merge 9dc4e9e9ec21a95ad97842c537632d3d9267af4f into 48dbe00bdb98a1ae6a0e60558ce14503616aa759 2025-06-15 14:52:04 +03:00
Adam Masciola
48dbe00bdb
Merge pull request #47 from kothman/main
Update IPC git repository link to point to the updated Codeberg READM…
2025-05-20 11:07:19 -07:00
Morgan Kothman
7b46718427 Update IPC git repository link to point to the updated Codeberg README.md. 2025-05-20 12:56:33 -04: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

View File

@ -28,7 +28,7 @@ dwl -s 'dwlb -font "monospace:size=16"'
```
## 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`.
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`.
## 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.

2
dwlb.c
View File

@ -457,7 +457,7 @@ draw_frame(Bar *bar)
uint32_t nx;
if (center_title) {
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 {
nx = MIN(x + bar->textpadding, bar->width - status_width);
}