spicetify / cli

Command-line tool to customize Spotify client. Supports Windows, MacOS, and Linux.
https://spicetify.app
GNU Lesser General Public License v2.1
18.77k stars 734 forks source link

error XResources is not available #253

Closed Addisonbean closed 4 years ago

Addisonbean commented 4 years ago

I'm getting this error when running spicetify update: error XResources is not available

Here's the output of xrdb -query | grep spotify:

spotify.foreground:     #f5f5f5
spotify.foreground2:    #fafafa
spotify.background:     #272c34
spotify.slider_bg:      #212121
spotify.button_hover_bg:        #4caf50
spotify.selection_bg:   #ffeb3b
spotify.button_held_fg: #03a9f4
spotify.button_held_bg: #9c27b0
spotify.selected_button:        #00bcd4
spotify.background_misc:        #f44336
spotify.background_misc_hover:  #4caf50
spotify.preserve_1:     #FFFFFF

And here's my color.ini:

[Base]
main_fg                               = ${xrdb:spotify.foreground}
secondary_fg                          = ${xrdb:spotify.foreground2}
main_bg                               = ${xrdb:spotify.background}
sidebar_and_player_bg                 = ${xrdb:spotify.background}
cover_overlay_and_shadow              = ${xrdb:spotify.background}
indicator_fg_and_button_bg            = ${xrdb:spotify.background}
pressing_fg                           = ${xrdb:spotify.background}
slider_bg                             = ${xrdb:spotify.slider_bg}
sidebar_indicator_and_hover_button_bg = ${xrdb:spotify.button_hover_bg}
scrollbar_fg_and_selected_row_bg      = ${xrdb:spotify.selection_bg}
pressing_button_fg                    = ${xrdb:spotify.button_held_fg}
pressing_button_bg                    = ${xrdb:spotify.button_held_bg}
selected_button                       = ${xrdb:spotify.selected_button}
miscellaneous_bg                      = ${xrdb:spotify.background_misc}
miscellaneous_hover_bg                = ${xrdb:spotify.background_misc_hover}
preserve_1                            = ${xrdb:spotify.preserve_1}

System info:

khanhas commented 4 years ago

My xrdb pattern matching is not ideal, to be honest. It only handle one word matching (\w+), hence the case key with . in middle will not be parsed. If you don't mind, please replace . with _ then it should work fine.

Addisonbean commented 4 years ago

Hm, I'm still getting the same error after updating the theme and Xresources then reloading xresources with xrdb. Here's what xrdb -query | grep spotify gives now:

spotify_foreground: #f5f5f5
spotify_foreground2:    #fafafa
spotify_background: #272c34
spotify_slider_bg:  #212121
spotify_button_hover_bg:    #4caf50
spotify_selection_bg:   #ffeb3b
spotify_button_held_fg: #03a9f4
spotify_button_held_bg: #9c27b0
spotify_selected_button:    #00bcd4
spotify_background_misc:    #f44336
spotify_background_misc_hover:  #4caf50
spotify_preserve_1: #FFFFFF
khanhas commented 4 years ago

Haha I was editing my comment. You actually need to prefix every key with * (*spotify_foreground). Tbh, I don't know why I wrote such terrible regexp for xrdb. I will update it later when I have a chance.

Addisonbean commented 4 years ago

Ohh haha, yep it's working now. Thanks!