w0lfschild / winBuddy

:open_file_folder: MacForge plugin to give windows some extra functionality on macOS
https://www.macenhance.com/mflink?macforge://github.com/w0lfschild/myRepo/raw/master/mytweaks/org.w0lf.winBuddy
96 stars 19 forks source link

[Feature Request] Border colors read from preferences rather than hardcoded #28

Open blahsd opened 6 years ago

blahsd commented 6 years ago

This would allow to change border color in according to the color scheme in use. Currently it's basically impossible to automate because it would require recompiling every time.

w0lfschild commented 6 years ago

You mean like light or dark based on the system setting?

blahsd commented 6 years ago

Nope. I meant it as in – I change frequently the colorscheme of my terminal, wm, etc. according to fixed colorschemes (through pywal). So each time I set a system-wide colorscheme, I'm left with some 16 colors that all belong to the same palette. I would like to be able to write this colors down somewhere – be it a config file, or straight to defaults – so that winBuddy would read it and color the borders accordingly, at least after a restart. As an example:

I set up my color palette to be orange, green, yellow, red. I'd like winBuddy to read my preferences and set active borders orange and non-active green.

I then change my color palette to be blue, purple, red, pink. I'd like winBuddy to read the preferences set active borders blue and non-active purple.

I'm almost positive it can be done – unfortunately I might be talking out of my ass because I know no obj-c. What I'm thinking is something along the way of:

[borderWin.contentView setBorderColor:self.isKeyWindow ? [ReadPref(@"AtiveBorderColor") NSColor] : [[ReadPref(@"NonAcriveBorderColor") NSColor]]];

Then you just need to write in the preferences what colors you want to use.

I hope it made sense, idk because I have some experience developing but none with obj-c and in general Xcode really eludes me.