Skip to content

Separate adjacent borders in swaybar #8656

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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

kupospelov
Copy link
Contributor

Unlike i3bar, swaybar does not render the workspace/mode separator.

IMO stuck together borders are kind of ugly, especially in the default configuration, and even more so when the bar is on top.

For a long time I could ignore this by enabling thicker borders for all windows and effectively disabling workspace borders, but recently I made my configuration look more like the default with smart borders turned on, and now this issue is harder to ignore.

Before:
before

After:
after

Note that the first commit in this PR is basically the same as #8634, I hoped to get the refactoring submitted first, but that PR did not get any comments in the last weeks.

The render_workspace_button and render_binding_mode_indicator functions are
almost the same. This commit extracts the common rendering code into a new
render_box function.
This commit decouples the surface height from the usable height, making it
possible to draw a separator between the workspace/mode and window borders
on top (for bottom bars) or bottom (for top bars). The workspace and mode
borders also get separated.

This behavior is consistent with i3bar.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

1 participant