Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Configuration of bar width #15

Closed
sidzwans opened this issue Aug 11, 2018 · 5 comments
Closed

Configuration of bar width #15

sidzwans opened this issue Aug 11, 2018 · 5 comments
Labels
bug Something isn't working

Comments

@sidzwans
Copy link

HI,

I am using sway 1.0. My monitor's default resolution is 2560x1440. I force the TTY resolution to 1920x1080 by using kernel parameter like "video=HDMI-A-1:1920x1080" as recommended in sway Archwiki . Thus I am able to set the new resolution in sway's config. Command `swaymsg -t outputs' shows the current mode is 1920x1080 and there are 2 modes available.

When I run the waybar, I ended up with width of 2560. Not the width of my current resolution that I set. Thus some part of the bar is not visible.

Waybar output is like:
Bar width configured: 1920
Bar width configured: 2560
New height: 30
New height: 30

Can I get around this?

Thanks.

@Alexays
Copy link
Owner

Alexays commented Aug 11, 2018

Weird, since the last configured width i get is normally the one using :/
I'll add a width parameter in the config to force it

@Alexays Alexays added the bug Something isn't working label Aug 11, 2018
@Alexays
Copy link
Owner

Alexays commented Aug 11, 2018

Option to force width done in 3c66f4b

@Alexays
Copy link
Owner

Alexays commented Aug 11, 2018

Can you confirm that your issue is fixed with last commit (without the configuration width) 8d5b61a ? :)

@sidzwans
Copy link
Author

Can confirm the issue is fixed.
Thanks.

@izelnakri
Copy link

@Alexays there is still a bug in this implementation as my waybar width constantly gets changed on each width change/refresh:

[2023-10-21 20:21:07.720] [info] Bar configured (width: 2198, height: 34) for output: eDP-1
[2023-10-21 20:21:07.730] [info] Bar configured (width: 2214, height: 34) for output: eDP-1
[2023-10-21 20:21:17.700] [info] Bar configured (width: 2189, height: 34) for output: eDP-1

I'm running Waybar v0.9.22 , and setting min-width, max-width or width makes the waybar to throw/exit, saying they are not valid CSS property names(definitely confusing).

I dont want to set a fix width on my waybar other than 100%, let me know if I can help in anyway. Styling with CSS seem to be a challenge still for waybar in terms of width styling and :hover on waybar today and documentation and implementation needs to be improved it seems.

cfillion added a commit to cfillion/Waybar that referenced this issue Oct 17, 2024
`Workspaces::*` and `IPC::startIPC` may both call `getSocketFolder` at the same time.

This randomly causes crashes and/or corruption of the socket path.

Typycal crash A:

    [2024-10-16 07:42:09.987] [info] Hyprland IPC starting
    malloc(): unaligned tcache chunk detected
    [2024-10-16 07:42:09.987] [error] Hyprland IPC: Unable to connect?
    Thread 1 "waybar" received signal SIGABRT, Aborted.
    (gdb) bt
    #0  __pthread_kill_implementation (threadid=<optimized out>, signo=signo@entry=6, no_tid=no_tid@entry=0) at pthread_kill.c:44
    (omitted for brievety)
    Alexays#9  0x00007ffff64ae745 in operator new (sz=sz@entry=296) at /usr/src/debug/gcc/gcc/libstdc++-v3/libsupc++/new_op.cc:50
    Alexays#10 0x00007ffff65ab1f1 in std::filesystem::__cxx11::path::_List::_Impl::copy (this=0x555555a23350) at /usr/src/debug/gcc/gcc/libstdc++-v3/src/c++17/fs_path.cc:249
    Alexays#11 0x00007ffff65ab3bd in std::filesystem::__cxx11::path::_List::_List (this=0x7fffffff9d30, other=<optimized out>) at /usr/src/debug/gcc/gcc-build/x86_64-pc-linux-gnu/libstdc++-v3/include/bits/unique_ptr.h:454
    Alexays#12 0x00005555556f4ab1 in waybar::modules::hyprland::IPC::getSocket1Reply(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) ()
    Alexays#13 0x00005555556f5e3d in waybar::modules::hyprland::IPC::getSocket1JsonReply(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) ()
    Alexays#14 0x000055555571289c in waybar::modules::hyprland::Workspaces::setCurrentMonitorId() ()

Typical crash B:

    [2024-10-16 10:01:15.859] [info] Hyprland IPC starting
    [2024-10-16 10:01:15.859] [info] Loading persistent workspaces from Hyprland workspace rules
    Thread 8 "waybar" received signal SIGSEGV, Segmentation fault.
    (gdb) bt
    #0  std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_S_copy
        (__d=0x5555558fbca8 "/", __s=0x2973961a26d35726 <error: Cannot access memory at address 0x2973961a26d35726>, __n=1)
        at /usr/src/debug/gcc/gcc-build/x86_64-pc-linux-gnu/libstdc++-v3/include/bits/basic_string.h:433
    (omitted for brievety)
    Alexays#15 waybar::modules::hyprland::IPC::getSocketFolder[abi:cxx11](char const*)
        (instanceSig=0x7fffffffe604 "4520b30d498daca8079365bdb909a8dea38e8d55_1729051218_1982280648") at ../src/modules/hyprland/backend.cpp:41
    Alexays#16 0x000055555564230f in waybar::modules::hyprland::IPC::startIPC()::{lambda()Alexays#1}::operator()() const ()
        at ../src/modules/hyprland/backend.cpp:70
    Alexays#17 0x00007ffff64e1c34 in std::execute_native_thread_routine (__p=0x5555558119c0) at /usr/src/debug/gcc/gcc/libstdc++-v3/src/c++11/thread.cc:104
    Alexays#18 0x00007ffff62a339d in start_thread (arg=<optimized out>) at pthread_create.c:447
cfillion added a commit to cfillion/Waybar that referenced this issue Oct 17, 2024
`Workspaces::*` and `IPC::startIPC` may both call `getSocketFolder` at the same time.

This randomly causes crashes and/or corruption of the socket path.

Typical crash A:

    [2024-10-16 07:42:09.987] [info] Hyprland IPC starting
    malloc(): unaligned tcache chunk detected
    [2024-10-16 07:42:09.987] [error] Hyprland IPC: Unable to connect?
    Thread 1 "waybar" received signal SIGABRT, Aborted.
    (gdb) bt
    #0  __pthread_kill_implementation (threadid=<optimized out>, signo=signo@entry=6, no_tid=no_tid@entry=0) at pthread_kill.c:44
    (omitted for brievety)
    Alexays#9  0x00007ffff64ae745 in operator new (sz=sz@entry=296) at /usr/src/debug/gcc/gcc/libstdc++-v3/libsupc++/new_op.cc:50
    Alexays#10 0x00007ffff65ab1f1 in std::filesystem::__cxx11::path::_List::_Impl::copy (this=0x555555a23350) at /usr/src/debug/gcc/gcc/libstdc++-v3/src/c++17/fs_path.cc:249
    Alexays#11 0x00007ffff65ab3bd in std::filesystem::__cxx11::path::_List::_List (this=0x7fffffff9d30, other=<optimized out>) at /usr/src/debug/gcc/gcc-build/x86_64-pc-linux-gnu/libstdc++-v3/include/bits/unique_ptr.h:454
    Alexays#12 0x00005555556f4ab1 in waybar::modules::hyprland::IPC::getSocket1Reply(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) ()
    Alexays#13 0x00005555556f5e3d in waybar::modules::hyprland::IPC::getSocket1JsonReply(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) ()
    Alexays#14 0x000055555571289c in waybar::modules::hyprland::Workspaces::setCurrentMonitorId() ()

Typical crash B:

    [2024-10-16 10:01:15.859] [info] Hyprland IPC starting
    [2024-10-16 10:01:15.859] [info] Loading persistent workspaces from Hyprland workspace rules
    Thread 8 "waybar" received signal SIGSEGV, Segmentation fault.
    (gdb) bt
    #0  std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_S_copy
        (__d=0x5555558fbca8 "/", __s=0x2973961a26d35726 <error: Cannot access memory at address 0x2973961a26d35726>, __n=1)
        at /usr/src/debug/gcc/gcc-build/x86_64-pc-linux-gnu/libstdc++-v3/include/bits/basic_string.h:433
    (omitted for brievety)
    Alexays#15 waybar::modules::hyprland::IPC::getSocketFolder[abi:cxx11](char const*)
        (instanceSig=0x7fffffffe604 "4520b30d498daca8079365bdb909a8dea38e8d55_1729051218_1982280648") at ../src/modules/hyprland/backend.cpp:41
    Alexays#16 0x000055555564230f in waybar::modules::hyprland::IPC::startIPC()::{lambda()Alexays#1}::operator()() const ()
        at ../src/modules/hyprland/backend.cpp:70
    Alexays#17 0x00007ffff64e1c34 in std::execute_native_thread_routine (__p=0x5555558119c0) at /usr/src/debug/gcc/gcc/libstdc++-v3/src/c++11/thread.cc:104
    Alexays#18 0x00007ffff62a339d in start_thread (arg=<optimized out>) at pthread_create.c:447
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants