{"record":{"id":"e4cbf29870eed656","repo":"kovidgoyal/kitty","slug":"the-value-val-is-not-a-valid-choice-for-window-t-e4cbf2","errorCode":null,"errorMessage":"The value {val} is not a valid choice for window_title_bar_align","messagePattern":"The value (.+?) is not a valid choice for window_title_bar_align","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"kitty/options/parse.py","lineNumber":1585,"sourceCode":"\n    def window_title_bar(self, val: str, ans: dict[str, typing.Any]) -> None:\n        val = val.lower()\n        if val not in self.choices_for_window_title_bar:\n            raise ValueError(f\"The value {val} is not a valid choice for window_title_bar\")\n        ans[\"window_title_bar\"] = val\n\n    choices_for_window_title_bar = frozenset(('top', 'bottom'))\n\n    def window_title_bar_active_background(self, val: str, ans: dict[str, typing.Any]) -> None:\n        ans['window_title_bar_active_background'] = to_color_or_none(val)\n\n    def window_title_bar_active_foreground(self, val: str, ans: dict[str, typing.Any]) -> None:\n        ans['window_title_bar_active_foreground'] = to_color_or_none(val)\n\n    def window_title_bar_align(self, val: str, ans: dict[str, typing.Any]) -> None:\n        val = val.lower()\n        if val not in self.choices_for_window_title_bar_align:\n            raise ValueError(f\"The value {val} is not a valid choice for window_title_bar_align\")\n        ans[\"window_title_bar_align\"] = val\n\n    choices_for_window_title_bar_align = frozenset(('left', 'center', 'right'))\n\n    def window_title_bar_inactive_background(self, val: str, ans: dict[str, typing.Any]) -> None:\n        ans['window_title_bar_inactive_background'] = to_color_or_none(val)\n\n    def window_title_bar_inactive_foreground(self, val: str, ans: dict[str, typing.Any]) -> None:\n        ans['window_title_bar_inactive_foreground'] = to_color_or_none(val)\n\n    def window_title_bar_min_windows(self, val: str, ans: dict[str, typing.Any]) -> None:\n        ans['window_title_bar_min_windows'] = positive_int(val)\n\n    def window_title_template(self, val: str, ans: dict[str, typing.Any]) -> None:\n        ans['window_title_template'] = tab_title_template(val)\n\n    def x11_hide_window_decorations(self, val: str, ans: dict[str, typing.Any]) -> None:\n        deprecated_hide_window_decorations_aliases('x11_hide_window_decorations', val, ans)","sourceCodeStart":1567,"sourceCodeEnd":1603,"githubUrl":"https://github.com/kovidgoyal/kitty/blob/6d5d0c440603ad9bdf6dcd599f73f6dde21acb44/kitty/options/parse.py#L1567-L1603","documentation":"window_title_bar_align aligns text in the window title bar and accepts left, center, right. The parser lowercases and validates; anything else aborts parsing.","triggerScenarios":"Setting `window_title_bar_align start`, `middle`, or `justify` in kitty.conf.","commonSituations":"Using logical alignment names (start/end) that are valid for tab_bar_align but not this option; 'middle' instead of 'center'; typos.","solutions":["Use one of: left, center, right","Note this option does not accept start/end, unlike tab_bar_align","Fix typos"],"exampleFix":"# before\nwindow_title_bar_align middle\n# after\nwindow_title_bar_align center","handlingStrategy":"validation","validationCode":"value = value.lower()\nif value not in ('left','center','right'):\n    raise SystemExit(f'bad window_title_bar_align: {value}')","typeGuard":"def is_window_title_bar_align(v: str) -> bool:\n    return v.lower() in ('left','center','right')","tryCatchPattern":null,"preventionTips":["No start/end here unlike tab_bar_align","Use 'center' not 'middle'"],"tags":["kitty","config","validation","title-bar"],"backgroundTag":"config-invalid-choice","analyzedSha":"6d5d0c440603ad9bdf6dcd599f73f6dde21acb44","analyzedAt":"2026-08-27T14:20:20.142Z","schemaVersion":2},"datasetVersion":"2026-08-27T19:17:21.184Z"}