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

Feature suggestion: Allow specifying accent color as the window color #108

Open
stroiman opened this issue Jul 14, 2024 · 0 comments
Open

Comments

@stroiman
Copy link

stroiman commented Jul 14, 2024

First of all, thanks for this project. Just installed it yesterday, and I think it should help solve a problem I have where I'm confused about which window has focus.

I wanted this to match the "accent colour" in the MacOS Appearance prefecences.

I had hoped to be able to get the color value from a command line tool, but that doesn't appear to be possible.

I can get the "highlight colour",

defaults read "Apple Global Domain" AppleHighlightColor

Which can then be used to setup borders with a bit of awk magic.

borders active_color=$(defaults read "Apple Global Domain" AppleHighlightColor | awk '{printf("0xff%02x%02x%02x", $1*255 , $2*255 , $3*255)}') inactive_color=0xff494d64 width=5.0 &

But that's the highlight colour, not accent color. The accent colour

defaults read "Apple Global Domain" AppleAccentColor

Which returns a number from -1 to 6 (if I remember correctly), that needs to be mapped to a colour name that looked up using an API call (I stopped at what is possible with shell scripts). Or it doesn't return a value at all, which means you have selected "Multicolor" accent color.

But another problem is that the color values can change, e.g. they change with light/dark theme settings. So even if I could get the value from a shell script; that would just be valid when I launch borders. But if e.g. the theme changes, possibly because of the 'auto' setting, the value will go stale.

That also means that if you think that this is a good idea and want to add that feature; the app also need to react to some system events about changes to accent color.

Anyway, this is just a suggestion ;) I think it would be an awesome feature, but is probably (due to the dynamic value of the color) overly complicated in relation to the importance of the color.

In my personal setup, I simply picked the accent colour, which also happens to be a contrast color to my desktop background, making it stand out.

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

No branches or pull requests

1 participant