tmux_styler.Statusbar.Segments
1from ...ContextVars import * 2 3DefinedSegment = str | ContextVar | list[str | ContextVar] 4""" 5A segment is a part of the statusbar that displays some content. It is simply a python 6function that returns a "DefinedSegment" type. A segment can display a string, a ContextVar, 7or a list of strings and/or ContextVars that will get joined together. 8""" 9 10# TODO: Find a better way to do this, dynamic generation via CI? 11# Default/included segments, format "segment_name": "module_name" 12DEFAULT_SEGMENTS = { 13 "window_info": "TmuxInfo", 14 "session_name": "TmuxInfo", 15 "cwd": "TmuxInfo", 16 "date_day": "DateTime", 17 "date": "DateTime", 18 "time": "DateTime", 19}
DefinedSegment =
str | tmux_styler.ContextVars.ContextVar | list[str | tmux_styler.ContextVars.ContextVar]
A segment is a part of the statusbar that displays some content. It is simply a python function that returns a "DefinedSegment" type. A segment can display a string, a ContextVar, or a list of strings and/or ContextVars that will get joined together.
DEFAULT_SEGMENTS =
{'window_info': 'TmuxInfo', 'session_name': 'TmuxInfo', 'cwd': 'TmuxInfo', 'date_day': 'DateTime', 'date': 'DateTime', 'time': 'DateTime'}