mirror of
https://github.com/rad4day/Waybar.git
synced 2025-07-20 01:42:38 +02:00
feat: partially hide waybar on toggle
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
Reference in New Issue
Block a user