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

hyprbars: add bar_color & title_color windowrules #192

Merged
merged 3 commits into from
Aug 8, 2024

Conversation

Misterio77
Copy link
Contributor

Fixes #72

Adds two windowrules, for setting bg and fg color.

Some cool use cases:

recording.mp4
windowrulev2=plugin:hyprbars:bar_color 0xdd1e1010, title:^\[pleione\]
windowrulev2=plugin:hyprbars:title_color 0xeef8dcdc, title:^\[pleione\]
windowrulev2=bordercolor 0xaaf6adfe 0xaa473535, title:^\[pleione\]

windowrulev2=plugin:hyprbars:bar_color 0xdde36f6f, title:sudo
windowrulev2=plugin:hyprbars:title_color 0xeeeeeeee, title:sudo
windowrulev2=plugin:hyprbars:bar_color 0xdde36f6f, title:root@
windowrulev2=plugin:hyprbars:title_color 0xeeeeeeee, title:root@

windowrulev2=plugin:hyprbars:bar_color 0xee651b96, title:Gabriel Fontes
windowrulev2=plugin:hyprbars:title_color 0xeeeeeeee, title:Gabriel Fontes

I tried my best to make it consistent with surrounding code. I've refactored nobar so that hyprbars windowrules are applied similarly to hyprland's (i.e. with a dedicated applyRule(SWindowRule) function). Please let me know if there's anything that can be improved!

hyprbars/barDeco.cpp Outdated Show resolved Hide resolved
hyprbars/barDeco.cpp Outdated Show resolved Hide resolved
Copy link
Member

@vaxerski vaxerski left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm but needs a clang-format

@Misterio77
Copy link
Contributor Author

Hey, sorry for the delay. Just formatted it.

@Misterio77 Misterio77 requested a review from vaxerski August 8, 2024 17:58
Copy link
Member

@vaxerski vaxerski left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks!

@vaxerski vaxerski merged commit b73d7b9 into hyprwm:main Aug 8, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Hyprbars: Allow for a different bar and text color for the focused window
3 participants