Hyprland icon indicating copy to clipboard operation
Hyprland copied to clipboard

Groupbar aesthetic

Open MightyPlaza opened this issue 2 years ago • 19 comments

Improves / adds more customization to groupbar:

  • adds group and groupbar sections to free up misc
  • add bottom as bar position
  • separates border and bar colors
  • allows setting groupbar heigh (bar height/gradient height depending on mode)
  • adds internal_bar, font and background color options
  • fixes gradients not updating with config reload

Mostly ready now, just needs some minors fixes

example of new config:

group {
    col.border_active = rgba(bb66ffee)
    #col.border_inactive = 0xffff0000 
    #col.border_locked_active = 0xff00ffff 
    #col.border_locked_inactive = 0xff0000ff 
    #--moveintogroup_lock_check = false-- #removed due to another commit, maybe should be moved here
    #insert_after_current = true
    groupbar {
        enabled = true
        col.active = rgba(cdd6f4cc)
        col.inactive = rgb(666699)
        #col.locked_active = 0xfff00f0f 
        #col.locked_inactive = 0xff0ff00f 
        col.background = rgb(bb66ff)
        #render_titles = false 
        #scrolling = true
        max_size = 200
        titles_font_size = 8
        mode = 0 # 0 - bar, 1 - gradient 
        height = 18
        #internal_bar = false 
        font = JetBrainsMono Nerd Font Mono
        top = no
        text_color = rgb(333333)
        #unified_border = 1
    }
}

MightyPlaza avatar Sep 06 '23 18:09 MightyPlaza

Cool. Haven't looked into this in-depth, but I think a rectangle that can be styled might be the simplest way to go about this?

  • Text font
  • Stroke color/gradient
  • Stroke weight
  • Fill color/gradient
  • Border radius
  • Vertical offset (box/bar)
  • Horizontal offset (box/bar)
  • Vertical offset (text)
  • Horizontal offset (text)
  • Drop shadow (same settings as tiles)

I think that should cover most styles we could conceive of.

spikespaz avatar Sep 13 '23 10:09 spikespaz

@vaxerski apart from the 2 issues I still haven't found a fix for this should be ready for review anti-aliasing rendering is clearly not an issue from here, since it's happens on main when border_size = 0, starting shadows from border just makes it more noticeable

MightyPlaza avatar Sep 16 '23 20:09 MightyPlaza

great stuff but the deco inside the border is really hideous. Rest is generally alright. We should rethink the design of groupbars in general tbh

vaxerski avatar Oct 07 '23 23:10 vaxerski

generally this MR is quite sizeable. I'd be for dropping internal decorations altogether, to me they serve no purpose.

vaxerski avatar Oct 07 '23 23:10 vaxerski

also request my review when ready

vaxerski avatar Oct 07 '23 23:10 vaxerski

internal_bar is really intended for solid bars not gradients, imo doesn't look that bad. (maybe an inside and an outside border would be better) internal decoration is kinda hacked together, a proper solution would be to handle borders like any other decoration, and control decorations placement better.

like I said, the only remaining problems are rounding issues on boxes which might be more noticeable since I made shadows start at the end of borders, and me still not finding the cause of textures getting deleted which makes them be created on the draw() call.

20231008_00h48m13s_grim

MightyPlaza avatar Oct 07 '23 23:10 MightyPlaza

internal decoration is kinda hacked together,

another reason to move this, if at all, to a separate mr

vaxerski avatar Oct 08 '23 00:10 vaxerski

great stuff but the deco inside the border is really hideous. Rest is generally alright. We should rethink the design of groupbars in general tbh

Why don't you follow the box styling ideas I suggested and add features based on that? It's already a familiar concept to most people.

spikespaz avatar Oct 08 '23 04:10 spikespaz

generally this MR is quite sizeable. I'd be for dropping internal decorations altogether, to me they serve no purpose.

I think vaxry is right. I'm gonna separate this into smaller MRs, which, I hope, will be much easier to handle

MightyPlaza avatar Oct 08 '23 09:10 MightyPlaza

@MightyPlaza do you have the other MR ? (especially for the backgound color).

aacebedo avatar Nov 01 '23 13:11 aacebedo

@MightyPlaza do you have the other MR ? (especially for the backgound color).

I have and will continue to separate this PR into smaller ones To avoid merge conflicts I am creating 1 at each time Currently still doing internal reworks, but after that will start adding the visual changes

MightyPlaza avatar Nov 01 '23 14:11 MightyPlaza

@MightyPlaza do you have the other MR ? (especially for the backgound color).

I have and will continue to separate this PR into smaller ones To avoid merge conflicts I am creating 1 at each time Currently still doing internal reworks, but after that will start adding the visual changes

noted ! Thanks for the update I am going to need this

aacebedo avatar Nov 01 '23 14:11 aacebedo

Another question about the font management. Do you know if the PR supports using a font with bold weight?

aacebedo avatar Nov 02 '23 18:11 aacebedo

Another question about the font management. Do you know if the PR supports using a font with bold weight?

pretty sure https://github.com/hyprwm/Hyprland/pull/3197/commits/9ce1310d627ef4a7894cd690d7deeefbe568bb78 allows that feel free to pr it if you want, should work without extra work

MightyPlaza avatar Nov 02 '23 18:11 MightyPlaza

Another question about the font management. Do you know if the PR supports using a font with bold weight?

pretty sure https://github.com/hyprwm/Hyprland/pull/3197/commits/9ce1310d627ef4a7894cd690d7deeefbe568bb78 allows that feel free to pr it if you want, should work without extra work

Actually, I tried a plug-in (https://github1s.com/outfoxxed/hy3) which is doing the same. The author pointed me to hyprland repo for this specific part of but they did not test the bold font support. I tested some values but was unable to make it work. I checked the pango spec (tried "Sans Bold" ) so I don't see why it is not working.

aacebedo avatar Nov 02 '23 20:11 aacebedo

seems to work for me https://docs.gtk.org/Pango/type_func.FontDescription.from_string.html with font = JetBrainsMono Nerd Font Mono Italic Extra-Bold

MightyPlaza avatar Nov 02 '23 20:11 MightyPlaza

JetBrainsMono Nerd Font Mono Italic Extra-Bold

Thanks that's working. I had an issue in the font name I think.

aacebedo avatar Nov 03 '23 07:11 aacebedo

Can't wait for this to get merged :star_struck: I've just hardcoded a few things in the meatime. 2024-01-14_11-52

RichAyotte avatar Jan 14 '24 16:01 RichAyotte

@MightyPlaza May I ask you for an update or ETA of this work please?

StanSvec avatar Feb 18 '24 10:02 StanSvec