dfrankland / hyper-custom-plugins

🛠 Create Hyper.app plugins from Hyper.app's configuration file.
https://www.npmjs.com/package/hyper-custom-plugins
4 stars 0 forks source link

Adding vibrancy #1

Open karlpokus opened 7 years ago

karlpokus commented 7 years ago

Hi!

Thanks for sharing this. I am trying to add vibrancy via your plugin-thing and following this example I was wondering if browserWindow is equal to win below.

config: {
  customPlugins: {
    callback: ({ hooks }) => {
      hooks.onWindow = win =>
        win.setHasShadow(false); // hack to fix ghost
        win.setVibrancy('dark') // Sadly this does not work.
dfrankland commented 7 years ago

I have the exact same configuration 👍 but it works perfectly for me. Did you make your backgroundColor have some transparency?

karlpokus commented 7 years ago

Did you make your backgroundColor have some transparency?

Yes. I have it at backgroundColor: 'rgba(0,0,0,0.8)'. I get win is not defined from the above snippet but it works for you?

dfrankland commented 7 years ago

If you can set win.setHasShadow(false); then win must not be undefined, no?

You are running Hyper version 1.0.0+ right? Also, are you using a theme? The theme may be overriding your backgroundColor.

karlpokus commented 7 years ago

If you can set win.setHasShadow(false); then win must not be undefined, no?

I agree. I only get the error when I include win.setVibrancy('dark') which is wierd right? I have tried chaining them but still get the error.

On 1.0.0. No theme.