openbar icon indicating copy to clipboard operation
openbar copied to clipboard

Enable setting of margins separately

Open finnar-bin opened this issue 1 year ago • 4 comments

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

finnar-bin avatar May 10 '24 02:05 finnar-bin

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!

neuromorph avatar May 11 '24 06:05 neuromorph

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.

finnar-bin avatar May 12 '24 22:05 finnar-bin

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.

neuromorph avatar May 16 '24 14:05 neuromorph

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.

finnar-bin avatar May 22 '24 22:05 finnar-bin

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

neuromorph avatar Jun 21 '24 11:06 neuromorph