mierak / rmpc

A configurable, terminal based Media Player Client with album art support via various terminal image protocols
https://mierak.github.io/rmpc/
BSD 3-Clause "New" or "Revised" License
120 stars 5 forks source link

how to make pywal/wallust colorscheme to work with rmpc #44

Closed NischalDawadi closed 2 months ago

NischalDawadi commented 2 months ago

Same as title

mierak commented 2 months ago

What have you tried and what is not working? Hard to help like this. I do not use pywal and do not know wallust, but for pywal you can use their templating function which should simply work as long as it generates a valid theme. Rmpc supports hex colors, which should be all you need for it to work.

NischalDawadi commented 2 months ago

in ncmpcpp i used to do this ~include '~/.config/wallust/templates/colors-kitty.conf' in rmpc i cannot do this. Also, unrelated but just like ncmpcpp is there any way I use send notification with album art on song change.

mierak commented 2 months ago

So I installed wallust and got it to work, heres the steps:

  1. Copy contents of the default theme (including the three directives at the top!) to ~/.config/wallust/templates/rmpc.ron
  2. Change the values inside the theme to your liking, for example you can do
    #![enable(implicit_some)]
    #![enable(unwrap_newtypes)]
    #![enable(unwrap_variant_newtypes)]
    (
    background_color: Some("{{background}}"),
    text_color: Some("{{foreground}}"),
    ...
  3. Define a template section in your wallust config like so
    [templates]
    rmpc = { template = 'templates/rmpc.ron', target = '~/.config/rmpc/themes/wallust.ron', new_engine = true }
  4. Set your theme in ~/.config/rmpc/config.ron
    #![enable(implicit_some)]
    #![enable(unwrap_newtypes)]
    #![enable(unwrap_variant_newtypes)]
    (
    address: "/tmp/mpd_socket",
    theme: Some("wallust"), // here!
  5. run wallust and restart rmpc
mierak commented 2 months ago

And no, there is currently no way to send notification on song change. Ncmpcpp does this by allowing you to execute a custom script on song change right? Sounds like a nice enhancement to me, I will make that happen.

NischalDawadi commented 2 months ago

Thank you so much. It works perfectly now. Now after you implement the custom script, i think i am going to ditch ncmpcpp for this.

mierak commented 2 months ago

Just a heads up, I have merged https://github.com/mierak/rmpc/pull/46 which contains on_song_change property. I have also documented an example of desktop notification with album art, provided your notification daemon supports notify-send's icons. You can check it out here in the docs provided you build rmpc from master.

NischalDawadi commented 2 months ago

Amazing work. This project deserves more stars.