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

Hyprland workspace module height problem #3385

Closed
clevrf0x opened this issue Jun 25, 2024 · 1 comment
Closed

Hyprland workspace module height problem #3385

clevrf0x opened this issue Jun 25, 2024 · 1 comment
Labels
bug Something isn't working custom hyprland

Comments

@clevrf0x
Copy link

clevrf0x commented Jun 25, 2024

Description

The workspace module in my Waybar is taking up too much space even though I've set padding and margin to 0. The CSS only applies margins on the x-axis, which shouldn't affect the height. Below is the configuration and styling code I'm using for the module on the left panel.

Problem

I want the buttons to have no padding inside them. When running env GTK_DEBUG=interactive waybar, I noticed the button labels have an unusual line-height, which seems to be affecting the Waybar's height.

Similar Issue

Note: The solution for that issue involved setting min-height: 0; globally, but this hasn't resolved my problem.

Configuration and Styling

Config

"modules-left": ["hyprland/workspaces", "custom/weather" ],

"hyprland/workspaces": {
    "disable-scroll": true,
    "all-outputs": true,
    "format": "{icon}",
},

Style

* {
    font-family: JetBrains Mono NF;
    font-size: 14px;
    min-height: 0;
    padding: 0;
    margin: 0;
}

#workspaces {
    background-color: transparent;
}

#workspaces button {
    background-color: @white;
    padding: 0; /* Need buttons with zero padding */
    margin-right: 10px;
    font-weight: bolder;
    color: @black;
}

#workspaces button.active {
    background-color: @green2;
    color: @black;
    font-weight: bolder;
}

Note: I have tried setting font-size: 10px and lower and that doesn't seem to solve the issue either

Screenshots

With hyprland/workspaces

image

Without hyprland/workspaces

image

Additional Notes

  • Same issue for "hyprland/window" module
@github-actions github-actions bot added bug Something isn't working custom hyprland labels Jun 25, 2024
@clevrf0x
Copy link
Author

I'm sorry for bringing up a redundant issue here. I should have managed the height of each workspace button by adjusting the padding of the parent container named #workspaces. This way, each button would automatically adjust its size.

Example:

#workspaces {
    background-color: transparent;
    padding: 0.3em; /* Adjust padding here */
}

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
Projects
None yet
Development

No branches or pull requests

2 participants
@clevrf0x and others