Giter VIP home page Giter VIP logo

dwlb's People

Contributors

apprehensions avatar arnor-nolen avatar dhruvasambrani avatar groggone avatar kerberoge avatar kolunmi avatar ktyldev avatar nikitaivanovv avatar podit avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

dwlb's Issues

Build issue on Musl libc systems

System Information

  • OS: Void Linux x86_64 (musl flavor)
  • dwlb: Commit fe2d0e6
  • wlroots: 0.16.x (standard Void Linux devel package)

Current behavior

dwlb fails to compile with fd_set reported as unknown type name.

Expected behavior

Once build dependencies are satisfied, the code should compile cleanly on musl libc systems.

Relevant logs and/or media

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

Other comment

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>

IPC feature documentation improvement for dwl patching

Summary

Patching dwl for the IPC feature is not clear, per current documentation.

Current problem and ambiguity

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:

  • Users could attempt to apply the wayland IPC patch from somebar. However, most people wont likely notice proposed updates.
  • Users might also try applying the swaycompat patch which I believe is related to the wayland-ipc patch, but incomplete as far as I can tell (no XML file in the diff or whatsoever)

Request

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.

[question] how to get the number of windows

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...

use `parse_color()` to convert `*_color` in `config.h`

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?

Warning in system log

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.

[PATCH] Sending commands to specific instance

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.

dwlb & someblocks start

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

In-line command to change the font

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).

Systray (Patch?)

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?

BiDi

it is not show bidi correctly can you solve this problem?

About Compilation lssues

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.

Refactor client out of the main program

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?

Add -no-input option to not listen to stdin

To run dwlb with -no-ipc in the background fails since dwlb is listening to stdin, which puts the application in a suspend state

image

Add this option to not listen to stdin. so dwlb can be bg'd

[Question] Block scripts

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!

[Feature Request] Option to use Title area for custom text via stdin

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.

Let dmenu cover bar

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.

[BUG]: Change layout icon colors

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.

Horizontal padding

Could it be possible to add a horizontal padding option like the vertical one?

Include real world status command examples

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?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.