sagebind / atom-gtk-dark-theme

Toggles the dark theme variant for Atom windows on GTK+3
https://atom.io/packages/gtk-dark-theme
MIT License
18 stars 3 forks source link

Better method just around the corner #1

Open p-e-w opened 8 years ago

p-e-w commented 8 years ago

Hi there :smiley_cat:! Your package works great, but when I found it today I was hoping to enlist you in my effort to bring a much cleaner method for enabling the dark theme to Atom.

While I think GTKDarkThemeVariantSetter was a pretty cool hack, it was also an act of desperation because of how limited the Sublime Text API is. When Atom came out, I immediately started to think about how we could do it better this time given that the program is open source. So I filed https://github.com/atom/electron/issues/352, which fortunately was implemented shortly after. Therefore, the great news is that Electron already supports setting the dark theme variant through a BrowserWindow flag!

The last missing puzzle piece is now https://github.com/atom/atom/issues/8287. I have hesitated to file a pull request directly because Atom is now stable which means the API can not be changed randomly anymore, but as soon as BrowserWindow options can be injected by packages, your package could be adapted to use that mechanism, which would work much faster, require no external process invocations, and even work on platforms other than Linux in theory (though I am not aware of any GTK+ ports supporting dark themes). Better yet, we could even push for a (Linux only) switch to be included directly in Atom core that would allow the user to flip from light to dark theme and back whenever they like.

Our best bet right now is probably to lend weight to https://github.com/atom/atom/issues/8287, which, once resolved, will allow us to bring first-class GTK+ theme variant support to Atom.

:palm_tree:

sagebind commented 8 years ago

HI! I have been following your adventures with trying to get Electron, and then Atom to support dark themes, and have been waiting on https://github.com/atom/atom/issues/8287 also. I just grew impatient and decided to follow the hacky route for now :wink:. I just recently switched to Atom from Sublime, and I guess I'm shallow enough that no dark titlebars was going to be a deal-breaker for me (I think your package spoiled me).

I'd certainly love to help out getting a formal method to be available in Atom -- in fact, I'd rather have it a core feature of Atom that the themes themselves can choose to enable the dark variant! One step at a time, I suppose.

I was curious if you were planning on creating your own Atom package once we can actually access BrowserWindow.

P.S.: Glad you like the package! Async works much nicer in Atom than in Sublime.

bhack commented 6 years ago

See also https://github.com/electron/electron/issues/2927.