tramhao / termusic

Music Player TUI written in Rust
GNU General Public License v3.0
963 stars 42 forks source link

Allow termusic to apply tui theme colors externally (pywal support) #342

Open uwidev opened 2 weeks ago

uwidev commented 2 weeks ago

Describe what you want

Allow termusic to apply (update) tui theme colors externally.

The specific thing I want to do is to integrate pywal into the tui themes, so that colors can sync with a different wallpaper. Pywal is only able to change the background color, and is unable to change anything else (border, foreground, highlight, etc).

Do you have already an idea for the implementation?

Of course, users would have to write their own scripts, something like...

wal -i "new-img.png"
cp ~/.cache/wal/colors-termusic.yml ~/.config/termusic/themes/pywal.yml
killall -SIGUSR1 -e termusic # exactly termusic, not termusic-server

Update: I also learned that termusic does not load the current them on start. I'm assuming it uses the tui.yml file instead... which while isn't impossible to hook into and modify, is quite inconvenient considering the functionality already exists to just load a theme, and it still doesn't update the terminal during operation.