kolunmi / dwlb Goto Github PK
View Code? Open in Web Editor NEWFeature-Complete Bar for DWL
License: Other
Feature-Complete Bar for DWL
License: Other
dwlb
fails to compile with fd_set
reported as unknown type name.
Once build dependencies are satisfied, the code should compile cleanly on musl
libc systems.
Here is the full compilation failure output.
$ rm config.h; make clean; make
rm -f dwlb dwlb.o
cp config.def.h config.h
cc -Wall -Wextra -Wno-unused-parameter -Wno-format-truncation -g -DUTF8PROC_EXPORTS -I/usr/include/harfbuzz -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/pixman-1 -c -o dwlb.o dwlb.c
dwlb.c: In function 'event_loop':
dwlb.c:913:17: error: unknown type name 'fd_set'
913 | fd_set rfds;
| ^~~~~~
dwlb.c:914:17: warning: implicit declaration of function 'FD_ZERO'; did you mean 'FP_ZERO'? [-Wimplicit-function-declaration]
914 | FD_ZERO(&rfds);
| ^~~~~~~
| FP_ZERO
dwlb.c:915:17: warning: implicit declaration of function 'FD_SET'; did you mean 'L_SET'? [-Wimplicit-function-declaration]
915 | FD_SET(STDIN_FILENO, &rfds);
| ^~~~~~
| L_SET
dwlb.c:922:21: warning: implicit declaration of function 'select' [-Wimplicit-function-declaration]
922 | if (select(MAX(sock_fd, wl_fd) + 1, &rfds, NULL, NULL, NULL) == -1)
| ^~~~~~
dwlb.c:925:21: warning: implicit declaration of function 'FD_ISSET' [-Wimplicit-function-declaration]
925 | if (FD_ISSET(STDIN_FILENO, &rfds))
| ^~~~~~~~
make: *** [<builtin>: dwlb.o] Error 1
I don't know if it's the best way to address this, but adding the line below in dwlb.c
fixes the issue for me:
#include <sys/select.h>
Patching dwl
for the IPC feature is not clear, per current documentation.
If dwl is patched appropriately, dwlb is capable of communicating directly with dwl
doesn't really tell what is required, especially for people who have never used/tried somebar:
somebar
. However, most people wont likely notice proposed updates.wayland-ipc
patch, but incomplete as far as I can tell (no XML file in the diff or whatsoever)Indicate clearly which dwl
patch to apply to enjoy the dwlb
IPC feature, in the README.
I think that even a link to the pending diff is fine, until it's updated in the somebar
repository.
Is it possible to know the number of windows present in the selected tags?
(Is this information exposed from dwl?)
Use case: I like to use the monocle mode, but in this mode I do not know how many windows are present. In dwm, I've patched its bar to show this information to me...
I've noticed that instead of converting hex to a pixman_color_t
in the config.h despite there being a function that does convert, it is not being used, is there a way to make it so that at run-time, all the colors active_fg_color
, active_bg_color
, etc. get converted to hex and get used?
This is by far the best option I found for a bar.
dwl now have an "official" patch for IPC in it's wiki.
Any way to adapt support for using this patch as well?
I changed scaling in config.h. What can possible cause this issue?
Hi, I'm getting a warning in the system log:
dwlb[492]: memfd_create() called without MFD_EXEC or MFD_NOEXEC_SEAL set
This appears to be due to this kernel patch applied to kernels 6.3 onwards:
https://lore.kernel.org/linux-security-module/[email protected]/
Changing memfd_create() in allocate_shm_file() apears to fix this for me, but note the call can fail on older kernels before 6.3, solution seems to be just to try to allocate, if fails, try again without the new flag, but I haven't tested that:
int fd = memfd_create("surface", MFD_CLOEXEC | MFD_ALLOW_SEALING | MFD_NOEXEC_SEAL);
I also added:
if (fcntl(fd, F_ADD_SEALS,
F_SEAL_GROW | F_SEAL_SHRINK | F_SEAL_SEAL) < 0)
{
fprintf(stderr, "Warning: failed to seal SHM memory file.");
}
before returning the fd.
DWM has the extrabar patch which allows you to have a bar at the top and bottom. Is it possible to do the same in DWMB too?
I tried to just start two dwlb instances, but the "client" sends the messages to all sockets. It should be trivial enough to add a param to send to a specific instance.
Hi !
if i start with dwl with
dwl -s 'autostart_dwl.sh' 2>&1 | tee "$LOGDIR"/dwl.log
autostart_dwl.sh:
dwlb -ipc
someblocks -p | dwlb -status-stdin all &
i cannot see someblocks
but if i start in terminal in dwl
someblocks -p | dwlb -status-stdin all &
i see someblocks and it works
Who can start someblocks with dwlb so that i dont need manualy start it in an terminal ?
thanks
Is it possible to make an inline command to change the font? It can be in the format ^fn(FONT)
and ^fn()
should reset to the default font. The string FONT
should be a font string similar to how it is set in config.h
(e.g. sans-serif:size=11
).
Hi, I'd like to have a systray. Obviously, a patch may be more appropriate for such a feature, but how exactly would this work?
it is not show bidi correctly can you solve this problem?
Title
Is this behavior intentional?
Please forgive me for asking a foolish question.
This is a compilation error message:
In file included from dwlb.c:5:
/usr/include/fcft/fcft.h:7:10: 致命错误:pixman.h:没有那个文件或目录
7 | #include <pixman.h>
| ^~~~~~~~~~
I am using ArchLinux.
Would it be better to have a different file for the client, even if we finally just do an include
? This allows people to build slstatus
-like applications without having to call the application and instead just write to the socket without having to rewrite the socket language?
can hide toggle bar for specific in dwlb?
Hi and thanks for a really nice bar.
Do you know by any chance which block scripts are being used in the second screenshot in the README, the one with the colored blocks? Is it using someblocks?
Thanks in advance!
Similar to -status
, an option such as -title
can be offered to display anything in the title area, rather than window title. Or a delimiter can be used to separate the text supplied from stdin into the two areas.
This would be useful for displaying things like current music playing or time / date or any custom information in the middle, while displaying other status information on the right.
For such cases, it would also make sense to allow centering the text in the title area, instead of aligning it to the left.
I use this bar with dmenu-wayland, which like all windows spawn underneath the bar. When there is no bar, dmenu spawns on the top of the screen (duh). Is there any way to make only this one program spawn on 0x0 position of the screen, covering the bar? Thanks.
Hi! I set up my bar with various colors, but there doesn't seem to be a way to change the layout icon's color like others. Is this an issue or am I missing this option? Thanks.
Could it be possible to add a horizontal padding option like the vertical one?
Please include some real world status command examples. Documentation of command is confusing.
Also is it possible to use applications like someblocks to populate status data?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.