ceuk / spotui

Spotify in the terminal 💻🎶
MIT License
525 stars 22 forks source link

User Themes #22

Open ceuk opened 3 years ago

ceuk commented 3 years ago

Using the existing patterns in config.py and colors.py implement a new config section: "theme" that allows users to define the terminal color using the ncurses constant names. These config values should be plugged into colors.py (replacing the hardcoded values) if they are present.

e.g.

[theme]
progress_bar_fg = "COLOR_GREEN"
progress_bar_bg = "COLOR_BLACK"
border_fg = "COLOR_WHITE"
border_bg = "COLOR_BLACK"
border_active_fg = "COLOR_YELLOW"
# ...etc

We will also need to define a set of themeable colors as currently the colors file and use thereof isn't very organised (Basically, we need to make sure that we have a pair defined for each semantic UI element: e.g. progress bar etc - and that we update the pairs being used by these elements accordingly)

octoshrimpy commented 3 years ago

Hey! glad you're still around! This project is awesome and your code has been wonderful to work with. Honestly, I was expecting the usual "other dev's code is hard to read" but your python/curses is legitimately fun to read and tweak.

I've implemented the theme engine, as well as transparency (if the terminal has it) and x_2256_colors on top. see https://github.com/octoshrimpy/spotui/commits/master and https://github.com/octoshrimpy/spotui/commits/master

I'm working on setting up a config updater for those who are already using spotui so that the update to the new config with more values goes by smoothly.