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

[SOLVED] Waybar expands from 29 pixels to 37 when wlr/taskbar module is added with identical icon size to other modules #3334

Open
Nilabb opened this issue Jun 6, 2024 · 1 comment
Labels
bug Something isn't working custom hyprland sni

Comments

@Nilabb
Copy link

Nilabb commented Jun 6, 2024

The modules hyprland/window and tray both work perfectly with an icon size of 24px, and with only those two modules the Waybar height is set to a 29px. As soon as I add wlr/taskbar, with an identical icon size, the bar expands to 35px.

There seems to be some padding, which isn't set through the config or css files, that is adding some padding to the top and bottom of icons which make the module bigger. The only sections of my config and css which include anything to do with wlr/taskbar are:

  • Config file:

    • "modules-center": [
          "wlr/taskbar"
      ],
      
    • "wlr/taskbar": {
          "format": "{icon}",
          "icon-size": 24,
          "tooltip": false,
       },
      
  • style.css file:

    • /* Configuring the taskbar */
      
      #taskbar {
          background-color: #303030;
          border-radius: 15px;
          padding-right: 5px;
          padding-left: 5px;
      }
      
      #taskbar button {
          border-radius: 15px;
      }
      
      #taskbar button.active {
          background-color: #64727D;
          border-radius: 15px;
      }
      

I thought this was due to a left over piece of code from the default config (no longer in the default config) that, on hovering, put a thick whit border underneath the icon, but this issue has persisted after deleting that. It probably looked something like this:

#taskbar button:hover {
    border-bottom: solid white 4px;
}

Small waybar, without wlr/taskabar:

  • image

Big wayabr, with wlr/taskbar:

  • image

Message when running waybar

  • [2024-06-06 13:10:27.930] [info] Using configuration file /home/Balls/.config/waybar/config
    [2024-06-06 13:10:27.931] [info] Unable to receive desktop appearance: GDBus.Error:org.freedesktop.DBus.Error.UnknownMethod: No such interface “org.freedesktop.portal.Settings” on object at path /org/freedesktop/portal/desktop
    [2024-06-06 13:10:27.931] [info] Using CSS file /home/Balls/.config/waybar/style.css
    [2024-06-06 13:10:27.936] [info] Hyprland IPC starting
    [2024-06-06 13:10:27.937] [info] Loading persistent workspaces from Hyprland workspace rules
    [2024-06-06 13:10:27.939] [info] Loading persistent workspaces from Hyprland workspace rules
    [2024-06-06 13:10:28.009] [info] Bar configured (width: 1910, height: 37) for output: HDMI-A-1
    

It says height: 37 because one monitor has icons and one monitor doesn't. They aren't uniform height because I have added min-height: 0 to my style.css and as soon as I open an app on my first monitor the bar expands.

@github-actions github-actions bot added bug Something isn't working custom hyprland sni labels Jun 6, 2024
@Nilabb
Copy link
Author

Nilabb commented Jun 6, 2024

I found the fix to this pretty quickly after I posted this, I guess I should've held back a bit before making an issue, but I swear I did this before posting.

I guess the wlr/taskbar module has some default settings that you don't have to define in style.css because the problem was solved only after I explicitly set padding: 0; under #taskbar button. This will put all your icons bunched together so add 'padding-left' and 'padding-right' after. Sorry for making the issue lmao

@Nilabb Nilabb changed the title Waybar expands from 29 pixels to 37 when wlr/taskbar module is added with identical icon size to other modules [SOLVED] Waybar expands from 29 pixels to 37 when wlr/taskbar module is added with identical icon size to other modules Jun 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working custom hyprland sni
Projects
None yet
Development

No branches or pull requests

1 participant