diff --git a/README.md b/README.md index d1320be..cc1c2d2 100644 --- a/README.md +++ b/README.md @@ -130,8 +130,8 @@ Usage of gspt: Specify The Directory to check for config.yml file. (default "$XDG_CONFIG_HOME/gspt") -hide-image Do not display the cover art image. - -nerd-icons - Use Nerd Icons + -icons + Use Icons -rounded-corners Enable Rounded Corners ``` @@ -164,8 +164,8 @@ hide_image: false # Enable Rounded Corners rounded_corners: false -# Use Nerd Icons -use_nerd_icons: false +# Use Special Characters to display information +use_icons: false # Image Drawing related parameters. You aren't supposed to define them manually. # See the next section to see how you can calibrate the Image placement. @@ -247,7 +247,7 @@ icons: icons: computer: "🖥️" -# Note: icons are used only if `use_nerd_icons` is true +# Note: icons are used only if `use_icons` is true # For the default icons used and all available icon names please see: # https://github.com/aditya-K2/gspt/blob/master/extras/CONFIG.md diff --git a/config/config.go b/config/config.go index 53d5711..ef1a9f0 100644 --- a/config/config.go +++ b/config/config.go @@ -28,7 +28,7 @@ type ConfigS struct { ImageWidthExtraY int `yaml:"image_width_extra_y" mapstructure:"image_width_extra_y"` HideImage bool `yaml:"hide_image" mapstructure:"hide_image"` RoundedCorners bool `yaml:"rounded_corners" mapstructure:"rounded_corners"` - UseNerdIcons bool `yaml:"use_nerd_icons" mapstructure:"use_nerd_icons"` + UseIcons bool `yaml:"use_icons" mapstructure:"use_icons"` } func NewConfigS() *ConfigS { @@ -80,8 +80,8 @@ func ReadConfig() { if Flags.RoundedCorners != false { Config.RoundedCorners = Flags.RoundedCorners } - if Flags.UseNerdIcons != false { - Config.UseNerdIcons = Flags.UseNerdIcons + if Flags.UseIcons != false { + Config.UseIcons = Flags.UseIcons } } useFlags() diff --git a/config/flags.go b/config/flags.go index 3c52329..b0e8af1 100644 --- a/config/flags.go +++ b/config/flags.go @@ -12,7 +12,7 @@ type Flag struct { ConfigPath string HideImage bool RoundedCorners bool - UseNerdIcons bool + UseIcons bool } func parseFlags() { @@ -22,7 +22,7 @@ func parseFlags() { "Do not display the cover art image.") flag.BoolVar(&Flags.RoundedCorners, "rounded-corners", Config.RoundedCorners, "Enable Rounded Corners") - flag.BoolVar(&Flags.UseNerdIcons, "nerd-icons", Config.UseNerdIcons, - "Use Nerd Icons") + flag.BoolVar(&Flags.UseIcons, "icons", Config.UseIcons, + "Use Icons") flag.Parse() } diff --git a/ui/progress.go b/ui/progress.go index bda860d..a778133 100644 --- a/ui/progress.go +++ b/ui/progress.go @@ -147,7 +147,7 @@ func progressRoutine() { } func deviceIcon(d spotify.PlayerDevice) string { - if val, ok := devices[strings.ToLower(d.Type)]; cfg.UseNerdIcons && ok { + if val, ok := devices[strings.ToLower(d.Type)]; cfg.UseIcons && ok { return val } return "Device:" @@ -164,7 +164,7 @@ func topTitle(playing, shuffle bool, repeat string, device spotify.PlayerDevice) playState = "Playing" } - if cfg.UseNerdIcons { + if cfg.UseIcons { icon = playIcons[playing] icon += " " repeat = repeatIcons[repeat]