Alexays / Waybar

Highly customizable Wayland bar for Sway and Wlroots based compositors. :v: :tada:
MIT License
6.61k stars 705 forks source link

On ubuntu 23.10 workspaces doesn't work #3158

Open 88srzh opened 6 months ago

88srzh commented 6 months ago

1713799180_grim

1713800196_grim


 "modules-left": [
        "custom/logo",
        "custom/updates",
        "hyprland/workspaces"
    ],

 "hyprland/workspaces": {
        "all-outputs": true,
        "disable-scroll": false,
        "on-click": "activate",
        "show-special": true,
        "format": "{icon}",
        "format-icons": {
            "default": "-",
            "1": "1",
            "2": "2",
            "3": "3",
            "4": "4",
            "5": "5",
            "6": "6",
            "7": "7",
            "8": "8",
            "9": "9",
            "active": "-",
            "urgent": "-",
        },
       "persistent_workspaces": {
            "1": [],
            "2": [],
            "3": [],
            "4": [],
            "5": [],
        },
        "sort-by-number": true,
    },

style.css:

#workspaces {
  background-color: transparent;
}

#workspaces button {
  all: initial; /* Remove GTK theme values (waybar #1351) */
  min-width: 0; /* Fix weird spacing in materia (waybar #450) */
  box-shadow: inset 0 -3px transparent; /* Use box-shadow instead of border so the text isn't offset 
  padding: 6px 18px;
  margin: 6px 3px;
  border-radius: 4px; */
  background-color: @sky;
  color: @text;
}

#workspaces button.active {
  color: @text;
  background-color: #cdd6f4;
}

#workspaces button:hover {
 box-shadow: inherit;
 text-shadow: inherit;
 color: @sky;
 background-color: #cdd6f4;
}

#workspaces button.urgent {
  background-color: #f38ba8;
}
ikkihou commented 6 months ago

same as me

(waybar:8476): Gtk-WARNING **: 14:32:00.296: Theme parsing error: gtk.css:6583:68: Invalid name of pseudo-class
[2024-04-30 14:32:00.325] [info] Using configuration file /home/paul/.config/waybar/config.jsonc
[2024-04-30 14:32:00.329] [info] Discovered appearance 'dark'
[2024-04-30 14:32:00.329] [info] Using CSS file /home/paul/.config/waybar/style.css
[2024-04-30 14:32:00.335] [info] Hyprland IPC starting
[2024-04-30 14:32:00.335] [error] Hyprland IPC: Unable to connect?
[2024-04-30 14:32:00.336] [error] Hyprland IPC: Couldn't connect to /tmp/hypr/f2b03e9679bc1a091fecffd98b50a4179b5c7d43_1714458711_242867233/.socket.sock. (3)
[2024-04-30 14:32:00.336] [warning] module hyprland/workspaces: Disabling module "hyprland/workspaces", Error parsing JSON: * Line 1, Column 1
  Syntax error: value, object or array expected.

[2024-04-30 14:32:00.337] [error] Hyprland IPC: Couldn't connect to /tmp/hypr/f2b03e9679bc1a091fecffd98b50a4179b5c7d43_1714458711_242867233/.socket.sock. (3)
[2024-04-30 14:32:00.337] [warning] module hyprland/window: Disabling module "hyprland/window", Error parsing JSON: * Line 1, Column 1
  Syntax error: value, object or array expected.

[2024-04-30 14:32:00.357] [error] Hyprland IPC: Couldn't connect to /tmp/hypr/f2b03e9679bc1a091fecffd98b50a4179b5c7d43_1714458711_242867233/.socket.sock. (3)
[2024-04-30 14:32:00.357] [warning] module hyprland/workspaces: Disabling module "hyprland/workspaces", Error parsing JSON: * Line 1, Column 1
  Syntax error: value, object or array expected.
[2024-04-30 14:32:00.516] [info] Bar configured (width: 1893, height: 30) for output: eDP-1
[2024-04-30 14:32:00.518] [info] Bar configured (width: 1900, height: 30) for output: HDMI-A-1

(waybar:8476): Gtk-CRITICAL **: 14:32:00.525: gtk_widget_set_accel_path: assertion 'GTK_IS_ACCEL_GROUP (accel_group)' failed

(waybar:8476): Gtk-CRITICAL **: 14:32:00.525: gtk_widget_add_accelerator: assertion 'GTK_IS_ACCEL_GROUP (accel_group)' failed
dwilliam62 commented 6 months ago

I am running NIXOS with Hyprland and when I updated hyprland/waybar I get this same error. If I revert the workspaces are restored. Please let me know if you need more information but this is preventing people from upgrading other packages like pyprland, browsers, etc Thank you

YaroKasear commented 6 months ago

I am running NIXOS with Hyprland and when I updated hyprland/waybar I get this same error. If I revert the workspaces are restored. Please let me know if you need more information but this is preventing people from upgrading other packages like pyprland, browsers, etc Thank you

Since Hyprland changed where its socket is located Waybar had been updated to the new location, but nixpkgs has not yet updated Waybar with the fix.

I fixed it by using Waybar's flake instead and using the package in the flake in the home-manager modules "package" option, e.g.:

programs.waybar =  {
  enable = true;
  package = inputs.waybar.packages.x86_64-linux.waybar;
};

You may have to use a slightly different package setting. I use snowfall-lib, so it might change how one gets to the package.