Waybar icon indicating copy to clipboard operation
Waybar copied to clipboard

Show invisible and occupied workspace for sway.

Open ahmadraniri1994 opened this issue 3 years ago • 7 comments

Is that possible ? If this have been asked before, feel free to close it. Thanks.

ahmadraniri1994 avatar Mar 09 '22 10:03 ahmadraniri1994

Does it because sway only show workspaces that contain windows? Then waybar has nothing to do with.

tmpm697 avatar Mar 10 '22 04:03 tmpm697

Well, other bar seems able to do it (e.g yambar), I tried tho. So, waybar doesn't have such configurations for it yet.

ahmadraniri1994 avatar Mar 10 '22 06:03 ahmadraniri1994

Have you tried the persistent_workspaces setting?

RobertMueller2 avatar Mar 10 '22 20:03 RobertMueller2

Have you tried the persistent_workspaces setting?

That's not what I want to achieve, I'll post a picture to describe it.

ahmadraniri1994 avatar Mar 11 '22 09:03 ahmadraniri1994

So, it's yambar, I want to achieve something like this, for example workspace one where some windows opened but unfocused and workspace 3 with window and focused and the rest is from persistent workspace. Waybar just have persistent workspace, visible, and focused for style, but waybar doesn't have something like unfocused. 2022-03-13T05:36:17,783757583+07:00

lidgnulinux avatar Mar 12 '22 22:03 lidgnulinux

So, it's yambar, I want to achieve something like this, for example workspace one where some windows opened but unfocused and workspace 3 with window and focused and the rest is from persistent workspace. Waybar just have persistent workspace, visible, and focused for style, but waybar doesn't have something like unfocused. 2022-03-13T05:36:17,783757583+07:00

Sorry, It's my second GitHub account.

ahmadraniri1994 avatar Mar 13 '22 10:03 ahmadraniri1994

Try the following. In your waybar config, use:

    "sway/workspaces": {
        "disable-scroll": true,
        "persistent_workspaces": {
            "1": [],
            "2": [],
            "3": [],
            "4": [],
        },
    },

and in your style.css, use:

#workspaces button {
    transition: none;
    color: white;
    background: transparent;
    padding: 5px;
    font-size: 18px;
}

#workspaces button.persistent {
    color: yellow;
    font-size: 12px;
}

#workspaces button.focused {
    color: lightgreen;
}

2022-09-04T12:05:41,109285935-05:00

  • Large green number indicates focused workspace with or without opened window(s). Note: being focused, it enables the user to see if the workspace has opened windows.
  • Large white number indicates unfocused workspace(s) with opened window(s).
  • Small yellow number indicates unfocused workspace(s) without opened window.

Maybe not exactly what you are looking for but should do the trick. Simply adjust the styles as you see fit and add persistent workspaces for your requirement.

lgaboury avatar Sep 04 '22 17:09 lgaboury