@@ -35,3 +35,61 @@ class PluginConfigSchema(TypedDict):
3535 tmuxp_min_version : NotRequired [str ]
3636 tmuxp_max_version : NotRequired [str ]
3737 tmuxp_version_incompatible : NotRequired [list [str ]]
38+
39+
40+ class ShellCommandConfig (TypedDict ):
41+ """Shell command configuration."""
42+
43+ cmd : str
44+ enter : NotRequired [bool ]
45+ suppress_history : NotRequired [bool ]
46+
47+
48+ ShellCommandValue = t .Union [str , ShellCommandConfig , list [t .Union [str , ShellCommandConfig ]]]
49+
50+
51+ class PaneConfig (TypedDict , total = False ):
52+ """Pane configuration."""
53+
54+ shell_command : NotRequired [ShellCommandValue ]
55+ shell_command_before : NotRequired [ShellCommandValue ]
56+ start_directory : NotRequired [str ]
57+ environment : NotRequired [dict [str , str ]]
58+ focus : NotRequired [t .Union [str , bool ]]
59+ suppress_history : NotRequired [bool ]
60+
61+
62+ PaneValue = t .Union [str , PaneConfig ]
63+
64+
65+ class WindowConfig (TypedDict , total = False ):
66+ """Window configuration."""
67+
68+ window_name : str
69+ start_directory : NotRequired [str ]
70+ shell_command_before : NotRequired [ShellCommandValue ]
71+ layout : NotRequired [str ]
72+ options : NotRequired [dict [str , t .Any ]]
73+ options_after : NotRequired [dict [str , t .Any ]]
74+ environment : NotRequired [dict [str , str ]]
75+ focus : NotRequired [t .Union [str , bool ]]
76+ suppress_history : NotRequired [bool ]
77+ panes : NotRequired [list [PaneValue ]]
78+
79+
80+ class WorkspaceConfig (TypedDict , total = False ):
81+ """Complete tmuxp workspace configuration."""
82+
83+ session_name : t .Union [str , None ] # Can be None during import
84+ start_directory : NotRequired [str ]
85+ before_script : NotRequired [str ]
86+ shell_command_before : NotRequired [ShellCommandValue ]
87+ shell_command : NotRequired [ShellCommandValue ] # Used in import
88+ environment : NotRequired [dict [str , str ]]
89+ global_options : NotRequired [dict [str , t .Any ]]
90+ options : NotRequired [dict [str , t .Any ]]
91+ config : NotRequired [str ] # tmux config file path
92+ socket_name : NotRequired [str ] # tmux socket name
93+ plugins : NotRequired [list [t .Union [str , PluginConfigSchema ]]]
94+ suppress_history : NotRequired [bool ]
95+ windows : list [WindowConfig ]
0 commit comments