Skip to content

feat(glazewm): animate workspace icons like the taskbar - #1252

Open
n-crespo wants to merge 1 commit into
amnweb:mainfrom
n-crespo:feat/glazewm-workspace-animation
Open

n-crespo wants to merge 1 commit into
amnweb:mainfrom
n-crespo:feat/glazewm-workspace-animation

Conversation

@n-crespo

@n-crespo n-crespo commented Nov 22, 2026 •

Copy link
Copy Markdown

Adds an opt-in animation option to the GlazeWM workspaces widget, using the same approach as the taskbar widget's open/close animation.

What it does

  • App icons grow in when a window opens and shrink out when it closes. Each icon is animated on its own maximumWidth (like taskbar buttons), so the other icons are never squeezed.
  • Icons are now tied to their window, so existing icons keep their place when a window opens or closes in the middle of a workspace.
  • Workspace buttons grow in when they appear and shrink out when they disappear.
  • With animation enabled, the widget also subscribes to window_managed / window_unmanaged, so a closed window's icon shrinks out right away instead of on the next focus change.

As in the taskbar, the first batch of buttons at startup isn't animated, and an icon whose window closes while it's still growing is removed immediately.

Config

glazewm_workspaces:
  options:
    animation:
      enabled: true   # default: false
      duration: 200

Off by default, so existing configs behave the same as before.

Testing

  • Existing test suite passes (no existing tests cover this widget).
  • Tested on a real bar with GlazeWM, opening/closing windows and switching workspaces.

Assisted-by: Claude Code noreply@anthropic.com

@n-crespo
n-crespo force-pushed the feat/glazewm-workspace-animation branch from 2ee1fba to 184495f Compare November 22, 2026 05:22
n-crespo added a commit to n-crespo/yasb that referenced this pull request Nov 22, 2026
@n-crespo
n-crespo force-pushed the feat/glazewm-workspace-animation branch from 184495f to be9d077 Compare November 23, 2026 03:07
n-crespo added a commit to n-crespo/yasb that referenced this pull request Nov 23, 2026
@n-crespo
n-crespo marked this pull request as ready for review November 23, 2026 03:56
- Add an opt-in `animation` option (enabled, duration) to the GlazeWM workspaces widget
- Grow new app icons from zero width and shrink closed ones before removing them, like taskbar buttons
- Key icon labels by window handle so existing icons keep their place when windows open or close
- Move icons instantly when windows are reordered or moved between workspaces
- Animate workspace buttons when they appear or disappear
- Keep the workspace container at least as wide as its buttons so a growing icon doesn't squeeze the others
- When animating, subscribe to window_managed and window_unmanaged so closed windows update immediately
- Document the option on the GlazeWM Workspaces page

Assisted-by: Claude Code <noreply@anthropic.com>
n-crespo added a commit to n-crespo/yasb that referenced this pull request Nov 24, 2026
@n-crespo
n-crespo force-pushed the feat/glazewm-workspace-animation branch from be9d077 to 2cb066b Compare November 24, 2026 07:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant