Skip to content
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

[hyprland/workspaces] special-only option? #3846

Closed
SaltyBooty opened this issue Dec 26, 2024 · 6 comments
Closed

[hyprland/workspaces] special-only option? #3846

SaltyBooty opened this issue Dec 26, 2024 · 6 comments
Labels
bug Something isn't working custom hyprland sway

Comments

@SaltyBooty
Copy link

Hi,

Here is what I am trying to accomplish. Have two hyprland/workspace modules, one displaying normal workspaces only and one displaying special workspaces only. Similarly to sway/workspaces and sway/scratchpad separation.

I have managed to do that somewhat using this code below. However, I have run into and issue that my second module is always displaying current active normal workspace number. I have somewhat managed to hide it with "default": "", line. But it creates an artificial gap that looks wrong.

"hyprland/workspaces": {
    "active-only": true,
    "on-click": "activate",
    "on-scroll-up": "hyprctl dispatch workspace e+1",
    "on-scroll-down": "hyprctl dispatch workspace e-1",

    "persistent-workspaces": {
      "*": 5, // 5 workspaces by default on every monitor
    },
  },

  "hyprland/workspaces#special": {
    "active-only": false,
    "show-special": true,
    "special-visible-only": false,
    "on-click": "activate",
    "format": "{icon}",
    "format-icons": {
      "terminal": "",
      "web": "",
      "code": "",
      "spotify": "",
      "discord": "",
      "default": "",
    },
  },

Is there any current solution to this? I've searched for similar issues, however, it seems I am the only lunatic who wants this to work in such a way.

Thanks

@github-actions github-actions bot added bug Something isn't working custom hyprland sway labels Dec 26, 2024
@UnaTried
Copy link

UnaTried commented Dec 28, 2024

Try to replace line 3 of hyprland/workspaces#special to
"special-visible-only": true,

"on-click": "activate", won't work because it executes a command. Waybar defaults to activating the workspace you click on

@SaltyBooty
Copy link
Author

Try to replace line 3 of hyprland/workspaces#special to "special-visible-only": true,

"on-click": "activate", won't work because it executes a command. Waybar defaults to activating the workspace you click on

Sorry it took me so long to check back in. Holidays and all. After adjusting as you recommended it didn't seem to have stopped the problem from appearing, it did however hide all of the special workspaces. The extra module is still showing at least current normal workspace at all times. Thank you though!

@UnaTried
Copy link

UnaTried commented Jan 5, 2025

I also had the problem with it showing the current normal workspace at all times.

You could try to use ignore-workspaces and set 1-9 in an array. It would look like this:

ignore-workspaces: [
    1,
    2,
    3,
    4,
    5,
    6,
    7,
    8,
    9,
]

It might be 0-9 or 0-8

@SaltyBooty
Copy link
Author

I also had the problem with it showing the current normal workspace at all times.

You could try to use ignore-workspaces and set 1-9 in an array. It would look like this:

ignore-workspaces: [
    1,
    2,
    3,
    4,
    5,
    6,
    7,
    8,
    9,
]

It might be 0-9 or 0-8

Okay that worked very well. Had to get the syntax correct, but got there in the end. Thank you very much for the help!

Final code looks something like this. No errors, does exactly what's needed.
2025-01-06T01:31:33,362156415+11:00

"hyprland/workspaces": {
    "active-only": true,
    "on-scroll-up": "hyprctl dispatch workspace e+1",
    "on-scroll-down": "hyprctl dispatch workspace e-1",
    "format": "{icon}",
    "format-icons": {
        "active": "",
        "default": "",
        "empty": "",
    },
        "persistent-workspaces": {
            "*": [ 1,2,3,4,5 ]
    },
  },

  "hyprland/workspaces#special": {
    "active-only": false,
    "ignore-workspaces": ["1","2","3","4","5","6","7","8","9",],
    "show-special": true,
    "special-visible-only": false,
    "on-click": "activate",
    "format": "{icon}",
    "format-icons": {
      "terminal": "",
      "web": "",
      "code": "",
      "spotify": "",
      "discord": "",
      },
  },

Once again thank you so much for the help! Now I'm off to fight with .css.

@UnaTried
Copy link

UnaTried commented Jan 5, 2025

No problem! The css will be a bit annoying, but not too hard. I hope all of your problems are fixed. You can now close this repo ( I cannot do this )

@SaltyBooty
Copy link
Author

Closed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working custom hyprland sway
Projects
None yet
Development

No branches or pull requests

2 participants