matryer/xbar · error
terminal
Error message
terminal
What it means
Returned by ItemParams.setValueByKey when the 'terminal' parameter value cannot be parsed as a boolean by parseBool; the error is wrapped with the key name ('terminal: ...'). This occurs while parsing plugin item parameters that control whether an item runs in a terminal.
Source
Thrown at pkg/plugins/item_params.go:213
case "font":
p.Font = value
case "size":
val, err := parseInt(value)
if err != nil {
return errors.Wrap(err, key)
}
p.Size = val
case "shell", "bash":
p.Shell = value
case "templateImage":
p.TemplateImage = value
case "image":
p.Image = value
case "terminal":
var err error
p.Terminal, err = parseBool(value)
if err != nil {
return errors.Wrap(err, key)
}
case "refresh":
var err error
p.Refresh, err = parseBool(value)
if err != nil {
return errors.Wrap(err, key)
}
case "dropdown":
var err error
p.Dropdown, err = parseBool(value)
if err != nil {
return errors.Wrap(err, key)
}
case "length":
val, err := parseInt(value)
if err != nil {
return errors.Wrap(err, key)
}View on GitHub (pinned to d624239058)
Solutions
- Use lowercase true/false: terminal=true or terminal=false.
- Trim whitespace and quotes from the value.
- Omit the 'terminal' key if the default behavior is desired.
Example fix
// before terminal=True // after terminal=true
Defensive patterns
Strategy: validation
Validate before calling
func validTerminalParam(key, value string) error {
if key == "terminal" {
v := strings.TrimSpace(value)
if v != "true" && v != "false" {
return fmt.Errorf("terminal must be true/false, got %q", value)
}
}
return nil
} Try / catch
params, err := parseParamStr(raw)
if err != nil && strings.HasPrefix(err.Error(), "terminal:") {
log.Printf("invalid 'terminal' value in %q, defaulting to false", raw)
params.Terminal = false
} Prevention
- Use only lowercase true/false for the terminal param.
- Normalize booleans (True→true, yes→true) when migrating configs.
- Trim whitespace/quotes from parameter values.
- Lint plugin config files for boolean params before deployment.
When it happens
Trigger: parseParamStr encounters key 'terminal' with a non-boolean value — e.g. terminal=True (capital T if parser is strict), terminal=yes, terminal=on, or terminal= with empty value.
Common situations: Configs written with YAML-style booleans (yes/no/on/off/True/False) instead of lowercase true/false; quotes or whitespace around the value from manual editing.
Related errors
AI-assisted analysis of matryer/xbar@d624239058 (2026-09-02).
Data as JSON: /api/errors/11fa89be12090bfe.
Report an issue: GitHub.