Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion spicetify.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,14 @@ func init() {
log.SetOutput(colorable.NewColorableStdout())

// Separates flags and commands
parseFlags := true
for _, v := range os.Args[1:] {
if len(v) > 0 && v[0] == '-' {
if parseFlags && v == "--" {
parseFlags = false
continue
}

if parseFlags && len(v) > 0 && v[0] == '-' {
if len(v) > 2 && v[1] != '-' {
for _, char := range v[1:] {
flags = append(flags, "-"+string(char))
Expand Down Expand Up @@ -494,6 +500,8 @@ upgrade|update Update spicetify to the latest version if an update is avail

--bypass-admin Bypass admin or root (sudo) check. NOT RECOMMENDED

-- Stop parsing flags; treat remaining arguments as command values

-c, --config Print config file path and quit

-h, --help Print this help text and quit
Expand Down Expand Up @@ -532,6 +540,8 @@ replace_colors <0 | 1>
spotify_launch_flags <string>
Command-line flags used when launching/restarting Spotify.
Separate each flag with "|".
To set flags from the CLI, place "--" before the value.
Example: spicetify config spotify_launch_flags -- "--flag-1|--flag-2"
List of valid flags: https://spicetify.app/docs/development/spotify-cli-flags

always_enable_devtools <0 | 1>
Expand Down
4 changes: 1 addition & 3 deletions src/cmd/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,7 @@ func EditConfig(args []string) {
switch field {
case "extensions", "custom_apps":
arrayType(featureSection, field, value)
case "spotify_launch_flags":
// not editable via config command
case "prefs_path", "spotify_path", "current_theme", "color_scheme":
case "prefs_path", "spotify_path", "current_theme", "color_scheme", "spotify_launch_flags":
stringType(settingSection, field, value)

default:
Expand Down