Skip to content

feat (hyprland/workspaces): expose workspace name as CSS class#4958

Open
v-dermichev wants to merge 1 commit intoAlexays:masterfrom
v-dermichev:feature/workspace-name-css-class
Open

feat (hyprland/workspaces): expose workspace name as CSS class#4958
v-dermichev wants to merge 1 commit intoAlexays:masterfrom
v-dermichev:feature/workspace-name-css-class

Conversation

@v-dermichev
Copy link
Copy Markdown

@v-dermichev v-dermichev commented Mar 27, 2026

Enable per-workspace styling by adding the workspace name as a CSS class to each workspace button. The name is sanitized to a valid CSS identifier: lowercased, non-alphanumeric characters collapsed to hyphens, digit-leading names prefixed with "ws-".

Examples: "IDE" → .ide, "special:messenger" → .messenger, "1" → .ws-1

This would allow users to apply styles for partial class name and would be more stable then using :nth-child().
Example:

#workspaces button.obsidian { color: rgba(163, 132, 214, 0.5); }
#workspaces button.obsidian.active { color: rgba(163, 132, 214, 1.0); }                                                                                                                                 
image

@v-dermichev v-dermichev changed the title hyprland/workspaces: expose workspace name as CSS class feat (hyprland/workspaces): expose workspace name as CSS class Mar 27, 2026
Enable per-workspace styling by adding the workspace name as a
CSS class to each workspace button. The name is sanitized to a
valid CSS identifier: lowercased, non-alphanumeric characters
collapsed to hyphens, digit-leading names prefixed with "ws-".

Examples: "IDE" → .ide, "special:telegram" → .telegram, "1" → .ws-1

Allows users to style individual workspaces:
  #workspaces button.telegram { color: #54a0e0; }
@v-dermichev v-dermichev force-pushed the feature/workspace-name-css-class branch from 560df19 to 2c2901e Compare April 5, 2026 09:45
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