Skip to content

Special behavior for special workspace(hyprland/workspaces) [WIP but works in its basic form lol] #4029

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

acropolis914
Copy link

@acropolis914 acropolis914 commented Apr 4, 2025

This should not break anything. Just extended the functionality a bit. So I was tinkering with the workspaces buttons css and I wanted to have a separate active indicator for my special workspace as currently, you can only have one active indicator.

Also, it bothered me a lot that when my special workspace is turned on, the non-special active one is also colored and I want only the special one to be colored

My implementation

  • added a check to see if it is a special and active, if so, find the "special-active" format-icon and if not special, checks for "normal-active" and as a fallback and support for the old "active" format-icon, it is not removed.

  • added a check for when a special workspace is active. if true, append a class "has-special-active" to the workspace so you can select it with css as an additional indicator or whatever you like to do with it.

Before: Same active icons for normal and special workspaces, two highlighted workspaces

2025-04-05T04:02:40,774811781+08:00

After: Can have a separate active icon for special workspaces, can style workspace module and its elements if special is not active

2025-04-05T03:56:15,192195304+08:00
2025-04-05T03:53:21,477728137+08:00

My styling use case

#workspaces.has-special-active .active:not(.special) {
    background: none; /* Remove active highlight from normal workspaces */
    color: inherit;
}

How my configuration looks like

  "hyprland/workspaces": {
//truncated for simplicity
    "format-icons": {
    "special-active": "✨",
    "normal-active": "",
      "active": "", //for backwards compatibility
      "default": "",
      "special" : "",
      "empty" : ""
    },

Feel free to give any opinions. It's just for my personal satisfaction but I thought I might share it cause someone else might be itching a lot about it just like me.

Also, yay my first time ever contributing T.T

…pace is active, the parent workspace module has the class .has-special-active so you can turn off the active style of the non-special one
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