piousdeer / vscode-adwaita

VS Code theme for the GNOME desktop
140 stars 10 forks source link

Load colors from gtk.css (libadwaita theming/recoloring) #10

Open piousdeer opened 1 year ago

piousdeer commented 1 year ago

Theming GNOME apps via ~/.config/gtk-4.0/gtk.css is gaining popularity with projects such as adw-gtk3 bringing GTK 3 support, adw-colors listing user-made themes, and Material You Color Theming automatically generating themes from your wallpapers.

VS Code themes are just static JSON files. From a quick look, there aren't APIs extensions can use to dynamically alter the current theme, but they can modify either settings.json or the theme files themselves. Bloating the user's settings file is too barbaric, but we could go with the second way. Related: vscode-dynamic-theme, vscode-wal-theme

piousdeer commented 1 year ago

I've found an undocumented package.json .contributes.themes[]._watch option that, when set to true, makes changes made to a theme's JSON file apply immediately (normally, you'd have to restart or reload VS Code). I've also found a project utilizing it for as long as 3 years, so it's not going away. It's also utilized in vscode-wal-theme.

MajorCarrot commented 1 year ago

This will be a great addition. Let me know if you need any help in testing a beta version of this (I might not be much help in programming the theme)

piousdeer commented 1 year ago

I've figured out how to get the current theme's colors via gjs. Now to rewrite the theme generator in TypeScript and wrap it all up in an extension. Expect progress soon!

MajorCarrot commented 1 year ago

Sounds cool! Will eagerly wait for an update!