Hyprland clients are now fetched from a binding instead of get_clients(). (#642)

* Get clients from bindings.

* Active workspaces now show properly on all workspace configurations.

* Filter clients by current workspace.
This commit is contained in:
Jas Singh
2024-12-27 01:03:40 -08:00
committed by GitHub
parent 188af390cd
commit 45cb701b3b
2 changed files with 12 additions and 15 deletions

View File

@@ -194,25 +194,25 @@ export const renderClassnames = (
monitor: number,
i: number,
): string => {
const isWorkspaceActive = hyprlandService.focusedWorkspace?.id === i || isWorkspaceActiveOnMonitor(monitor, i);
const isActive = isWorkspaceActive ? 'active' : '';
if (showIcons) {
return 'workspace-icon txt-icon bar';
return `workspace-icon txt-icon bar ${isActive}`;
}
if (showNumbered || showWsIcons) {
const numActiveInd =
hyprlandService.focusedWorkspace?.id === i || isWorkspaceActiveOnMonitor(monitor, i)
? numberedActiveIndicator
: '';
const numActiveInd = isWorkspaceActive ? numberedActiveIndicator : '';
const wsIconClass = showWsIcons ? 'txt-icon' : '';
const smartHighlightClass = smartHighlight ? 'smart-highlight' : '';
const className = `workspace-number can_${numberedActiveIndicator} ${numActiveInd} ${wsIconClass} ${smartHighlightClass}`;
const className = `workspace-number can_${numberedActiveIndicator} ${numActiveInd} ${wsIconClass} ${smartHighlightClass} ${isActive}`;
return className.trim();
}
return 'default';
return `default ${isActive}`;
};
/**