blahsd / snwe

🚀 Extensible, customisable, menubar replacement for macOS/UNIX.
304 stars 9 forks source link

Running wal breaks everything #3

Closed paanvaannd closed 6 years ago

paanvaannd commented 6 years ago

It would be great to have theme pywal-generated theme integration in this project similar to supernerd.

I'm aware that this is a new project so it may be a low priority at the moment. I think an issue would be helpful in tracking this feature for myself and others interested in using it if it is in the works.

Is such an integration possible with the electron framework? If it is already set up, is there documentation about how to set it up?

blahsd commented 6 years ago

Should work now, provided that you have ~/.cache/wal/colors.css - let me know if it actually does. You activate the pywal colorscheme in the preference pane.

paanvaannd commented 6 years ago

I have a ~/.cache/wal/colors.css generated by pywal but after selecting the pywal theme preference, there was no immediate change. I decided to restart snwe but after the restart, I could no longer see the bar or any icons. I reinstalled snwe by removing the directory and cloning the repo once again, which has not resolved the issue. For some reason, the bar has simply disappeared...

Exact steps:

1) Install and run pywal to generate colorscheme 2) $ ls ~/.cache/wal/ I confirmed that colors.css file has been generated by pywal. 3) $ cd ~/bin && git clone https://github.com/blahsd/snwe 4) $ cd snwe && npm start 5) Click preferences icon on snwe bar 6) Select pywal theme option I saw no theme change after doing this step. 7) Ctrl+C to stop snwe 8) $ npm start The application runs with no extra warnings than the one reported in issue #2. Electron is running with corresponding application in Dock, but the snwe bar is no longer visible though all text and icons except the indicators on the left side (the music player buttons and whatever the number 1 is there... workspaces?) visible with a shadow outline offset by a couple pixels and are no longer intertactive. 9) Ctrl+C to stop snwe 10) $ cd ~/bin && rm -rf snwe && git clone https://github.com/blahsd/snwe 11) $ cd snwe && npm start Same result as in step 8.

edit: Turns out the bar icons and text were present but that the bar was transparent and against a dark wallpaper, rendering them functionally invisible. I have emphasized the new finding above and stricken through the incorrect portions.

After changing to a light wallpaper, I can confirm that the icons are still present but that that the issue of the invisible bar persists, that it is not interactive anymore (i.e. I cannot click on the preferences icon, etc.), and there is an outline of all icons and text that is offset by a couple pixels from the actual objects' positions as illustrated in the following screenshot:

error

Note: Network name redacted, but the WiFi icon's outline shows up behind the network name.

blahsd commented 6 years ago

See latest commit. It's a sort of hackish workaround which creates the pywal symlink if it's not there – since it's creating it by expanding $HOME/.cache/wal/colors.css, I have good hope that it might work on all systems that respect that convention, regardless of where snwe (which was probably the issue before). I'm not very satisfied with this solution, and even if it ends up working (which is a big if) I might come back to this when releasing a packaged version.

A couple things that you could check in order to make sure that this is working as intended.

  1. Before running this version for the first time, please make sure that ../snwe/app/css/colors-wal.css is not present .
  2. After running the script, everything might load up correctly. If it doesn't, please try closing and reopening.
  3. If something hasn't worked on the first try, please check that: (a) ./snwe/app/css/colors-wal.css now exists and that (b) it points to ~/.cache/wal/colors.css correctly.
paanvaannd commented 6 years ago

Pywal-generated colors now work and the outlined and non-interactive icon/text issue is fixed!

Prior to this commit, though, I was able to select the default colorscheme and choose between the 4 themes. However, though the pywal colorscheme is now working, it does not let me choose the Default colorscheme and I am stuck with the Center theme.

Also, regenerating a pywal colorscheme when snwe is open causes snwe to disappear completely (along with all text/icon objects and all) though Electron is still running.

blahsd commented 6 years ago

Pywal-generated colors now work and the outlined and non-interactive icon/text issue is fixed!

Good.

Prior to this commit, though, I was able to select the default colorscheme and choose between the 4 themes. However, though the pywal colorscheme is now working, it does not let me choose the Default colorscheme and I am stuck with the Center theme.

Can you confirm that this is still the case? I can't reproduce.

Also, regenerating a pywal colorscheme when snwe is open causes snwe to disappear completely (along with all text/icon objects and all) though Electron is still running.

Can confirm. Will have to work on this.

blahsd commented 6 years ago

@paanvaannd you mentioned in #6 that this was solved but I'm still getting it 🤔 Limited to this part:

Also, regenerating a pywal colorscheme when snwe is open causes snwe to disappear completely (along with all text/icon objects and all) though Electron is still running.