diff --git a/src/modules/bar.tsx b/src/modules/bar.tsx index 05d7e9f3..97787fc9 100644 --- a/src/modules/bar.tsx +++ b/src/modules/bar.tsx @@ -125,7 +125,9 @@ const MediaPlaying = () => { }; const Workspace = ({ idx }: { idx: number }) => { - let wsId = Math.floor((hyprland.focusedWorkspace.id - 1) / config.wsPerGroup) * config.wsPerGroup + idx; + let wsId = hyprland.focusedWorkspace + ? Math.floor((hyprland.focusedWorkspace.id - 1) / config.wsPerGroup) * config.wsPerGroup + idx + : idx; return (