Skip to content

Commit

Permalink
feat: partially hide waybar on toggle
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexays committed Apr 15, 2019
1 parent 316b948 commit ecc5f48
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
4 changes: 4 additions & 0 deletions resources/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
5 changes: 5 additions & 0 deletions src/bar.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down

0 comments on commit ecc5f48

Please sign in to comment.