diff options
| author | 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> | 2025-04-30 13:52:02 +1000 |
|---|---|---|
| committer | 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> | 2025-04-30 13:52:02 +1000 |
| commit | 96c8226def4c30aa884f47a95e8a0cd845e4e566 (patch) | |
| tree | 476c367c10ecde5684fa7e756042807bf7d43c12 /modules/bar/components | |
| parent | feat: bar workspaces show windows (diff) | |
| download | caelestia-shell-96c8226def4c30aa884f47a95e8a0cd845e4e566.tar.gz caelestia-shell-96c8226def4c30aa884f47a95e8a0cd845e4e566.tar.bz2 caelestia-shell-96c8226def4c30aa884f47a95e8a0cd845e4e566.zip | |
bar: some workspaces optimisations
Diffstat (limited to 'modules/bar/components')
| -rw-r--r-- | modules/bar/components/workspaces/ActiveIndicator.qml | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/modules/bar/components/workspaces/ActiveIndicator.qml b/modules/bar/components/workspaces/ActiveIndicator.qml index f8b0deb..7e7ad8d 100644 --- a/modules/bar/components/workspaces/ActiveIndicator.qml +++ b/modules/bar/components/workspaces/ActiveIndicator.qml @@ -14,10 +14,9 @@ Rectangle { required property real maskHeight required property int groupOffset - property int currentIdx: (Hyprland.activeWorkspace?.id ?? 1) - 1 - groupOffset - property int lastIdx: currentIdx + property int currentIdx: Hyprland.activeWsId - 1 - groupOffset property real leading: workspaces[currentIdx][vertical ? "y" : "x"] - property real trailing: workspaces[lastIdx][vertical ? "y" : "x"] + property real trailing: workspaces[currentIdx][vertical ? "y" : "x"] property real currentSize: workspaces[currentIdx][vertical ? "height" : "width"] property real size: Math.abs(leading - trailing) + currentSize property real offset: Math.min(leading, trailing) |