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

Enable setting of margins separately #31

Closed
finnar-bin opened this issue May 10, 2024 · 5 comments
Closed

Enable setting of margins separately #31

finnar-bin opened this issue May 10, 2024 · 5 comments
Labels
enhancement New feature or request

Comments

@finnar-bin
Copy link

It would be awesome if we'd be able to set the bar margins separately. I'm currently using forge for the tiling and there's a lot of space in between the bar and the windows since Forge also doesn't allow setting the gaps separately per position.

image

@neuromorph neuromorph added the enhancement New feature or request label May 11, 2024
@neuromorph
Copy link
Owner

I would prefer to keep the margins symmetric, but I will look into it.
I am currently overhauling auto-theming along with extending the styles to the shell and fixing bugs/quirks so a lot needs to be streamlined first.
You may also want to comment on Forge issue #272 which seems to deal with the same.

Thanks for your suggestion!

@finnar-bin
Copy link
Author

Gotcha, yeah it would be awesome to be able to set it separately but I get your point. I'll check out the forge issue as well.

@neuromorph
Copy link
Owner

In the meanwhile I can guide you if you are willing to make a change in the extension code in your local installation. This should allow to achieve the same without the GUI. You need to go to the extension directory (~/.local/share/gnome-shell/extensions/openbar@neuromorph) and open stylesheets.js.
At line num 677, you can find code below (as I see you are using Tri/Islands Bar):

if(bartype == 'Islands' || bartype == 'Trilands') {
        panelStyle += 
        ` margin: ${margin}px ${1.5*margin}px; 

The syntax currently is for symmetric margins, so it goes like: margin: <top/bottom> <left/right>.
For separate control, you can change it to: margin: <top> <right> <bottom> <left>.
To get the setting param value, we use ${margin}px pixels.
You can use hard coded values OR fractions of this param e.g. if you only want to minimize bottom margin to 10%:

margin: ${margin}px ${1.5*margin}px ${0.1*margin}px ${1.5*margin}px;

Note: after any change you make, you will need to reload Gnome (log out/in) to test the changes.

One more thing, if you want to try out Openbar 2.0 with the enhancements I mentioned earlier, you can clone it from openbar2.0 branch. Feedback on it will be appreciated in issue #29 .
Thanks.

@finnar-bin
Copy link
Author

Just got back from a holiday, yeah sure I'll check it out when I get some downtime at work. Also, thanks for sharing how to manually do it, I'll take a peek at that as well.

@neuromorph
Copy link
Owner

I will keep it at manual mod for now (described above).
Closing this. Hope you like the new version of OpenBar.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants