feat: partially hide waybar on toggle
parent
316b948d86
commit
ecc5f48dd7
|
@ -12,6 +12,10 @@ window#waybar {
|
|||
color: #ffffff;
|
||||
}
|
||||
|
||||
window#waybar.hidded {
|
||||
opacity: 0.2;
|
||||
}
|
||||
|
||||
/* https://github.com/Alexays/Waybar/wiki/FAQ#the-workspace-buttons-have-a-strange-hover-effect */
|
||||
#workspaces button {
|
||||
padding: 0 5px;
|
||||
|
|
|
@ -266,6 +266,11 @@ auto waybar::Bar::toggle() -> void
|
|||
{
|
||||
visible = !visible;
|
||||
auto zone = visible ? height_ : 0;
|
||||
if (!visible) {
|
||||
window.get_style_context()->add_class("hidded");
|
||||
} else {
|
||||
window.get_style_context()->remove_class("hidded");
|
||||
}
|
||||
zwlr_layer_surface_v1_set_exclusive_zone(layer_surface, zone);
|
||||
wl_surface_commit(surface);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue