{"record":{"id":"d52c065650049a06","repo":"kovidgoyal/kitty","slug":"the-value-val-is-not-a-valid-choice-for-window-t","errorCode":null,"errorMessage":"The value {val} is not a valid choice for window_title_bar","messagePattern":"The value (.+?) is not a valid choice for window_title_bar","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"kitty/options/parse.py","lineNumber":1571,"sourceCode":"    def window_logo_scale(self, val: str, ans: dict[str, typing.Any]) -> None:\n        ans['window_logo_scale'] = window_logo_scale(val)\n\n    def window_margin_width(self, val: str, ans: dict[str, typing.Any]) -> None:\n        ans['window_margin_width'] = edge_width(val)\n\n    def window_padding_width(self, val: str, ans: dict[str, typing.Any]) -> None:\n        ans['window_padding_width'] = edge_width(val)\n\n    def window_resize_step_cells(self, val: str, ans: dict[str, typing.Any]) -> None:\n        ans['window_resize_step_cells'] = positive_int(val)\n\n    def window_resize_step_lines(self, val: str, ans: dict[str, typing.Any]) -> None:\n        ans['window_resize_step_lines'] = positive_int(val)\n\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","sourceCodeStart":1553,"sourceCodeEnd":1589,"githubUrl":"https://github.com/kovidgoyal/kitty/blob/6d5d0c440603ad9bdf6dcd599f73f6dde21acb44/kitty/options/parse.py#L1553-L1589","documentation":"window_title_bar positions the macOS/optional title bar and accepts only top or bottom. The parser lowercases and validates; other values raise ValueError during config parsing.","triggerScenarios":"Setting `window_title_bar hidden`, `window_title_bar left`, or `window_title_bar up` in kitty.conf.","commonSituations":"Trying to hide the title bar with 'hidden' (hiding is done differently, e.g. macos_titlebar_color or hide_window decorations options); typos; non-macOS users setting an macOS-only option with guessed values.","solutions":["Use top or bottom","To hide the title bar use the appropriate decoration options for your OS instead of this option","Fix typos — only the two vertical positions are valid"],"exampleFix":"# before\nwindow_title_bar hidden\n# after\nwindow_title_bar top","handlingStrategy":"validation","validationCode":"value = value.lower()\nif value not in ('top','bottom'):\n    raise SystemExit(f'bad window_title_bar: {value}')","typeGuard":"def is_window_title_bar(v: str) -> bool:\n    return v.lower() in ('top','bottom')","tryCatchPattern":null,"preventionTips":["To hide decorations use the OS-specific decoration options, not this one","Only two valid values exist"],"tags":["kitty","config","validation","title-bar","macos"],"backgroundTag":"config-invalid-choice","analyzedSha":"6d5d0c440603ad9bdf6dcd599f73f6dde21acb44","analyzedAt":"2026-08-27T14:20:20.142Z","schemaVersion":2},"datasetVersion":"2026-08-27T19:17:21.184Z"}