R.I.P. Tycho Station
This commit is contained in:
@@ -48,7 +48,9 @@ class Workspace:
|
||||
self.alerted = False
|
||||
|
||||
@classmethod
|
||||
def parse_file(cls: type, filename: str) -> Tuple[WorkspaceTree, WorkspaceList]:
|
||||
def parse_file(
|
||||
cls: type, filename: str
|
||||
) -> Tuple[WorkspaceTree, WorkspaceList, str]:
|
||||
result = {}
|
||||
|
||||
initial: dict = None
|
||||
@@ -75,7 +77,9 @@ class Workspace:
|
||||
for context, groups in initial["contexts"].items()
|
||||
}
|
||||
|
||||
return result, workspaces
|
||||
default_context = initial.get("default_context", "personal")
|
||||
|
||||
return result, workspaces, default_context
|
||||
|
||||
@staticmethod
|
||||
def full_dictify(tree: WorkspaceTree):
|
||||
@@ -99,7 +103,7 @@ class Workspace:
|
||||
}
|
||||
|
||||
|
||||
workspace_tree, workspace_list = Workspace.parse_file(
|
||||
workspace_tree, workspace_list, default_context = Workspace.parse_file(
|
||||
f"{os.environ['HOME']}/.config/sway/workspaces.json"
|
||||
)
|
||||
|
||||
@@ -107,7 +111,7 @@ data = {
|
||||
"ws": {},
|
||||
"mode": "default",
|
||||
"current": {},
|
||||
"context": "work" if gethostname() == "tycho.vpn.ezri.dev" else "personal",
|
||||
"context": default_context,
|
||||
"visible": {},
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user