Skip to content
New issue

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

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

Already on GitHub? # to your account

waybar tip is broken for me recently #2870

Closed
colemickens opened this issue Jan 31, 2024 · 7 comments
Closed

waybar tip is broken for me recently #2870

colemickens opened this issue Jan 31, 2024 · 7 comments
Labels
bug Something isn't working

Comments

@colemickens
Copy link
Contributor

I don't think I changed anything here related to waybar config, just updates to tip as usual.

Suddenly I can't start waybar:

Jan 30 20:56:15 zeph waybar[3264]: [2024-01-30 20:56:15.572] [info] Using configuration file /home/cole/.config/waybar/config
Jan 30 20:56:15 zeph waybar[3264]: [2024-01-30 20:56:15.574] [info] Unable to receive desktop appearance: GDBus.Error:org.freedesktop.DBus.Error.UnknownMethod: No
such interface “org.freedesktop.portal.Settings” on object at path /org/freedesktop/portal/desktop
Jan 30 20:56:15 zeph waybar[3264]: [2024-01-30 20:56:15.574] [info] Using CSS file /home/cole/.config/waybar/style.css
Jan 30 20:56:15 zeph waybar[3264]: [2024-01-30 20:56:15.574] [error] in Json::Value::resolveReference(key, end): requires objectValue
Jan 30 20:56:15 zeph systemd[2283]: waybar.service: Main process exited, code=exited, status=1/FAILURE
Jan 30 20:56:15 zeph systemd[2283]: waybar.service: Failed with result 'exit-code'.
Jan 30 20:56:15 zeph systemd[2283]: waybar.service: Scheduled restart job, restart counter is at 5.
Jan 30 20:56:15 zeph systemd[2283]: waybar.service: Start request repeated too quickly.
Jan 30 20:56:15 zeph systemd[2283]: waybar.service: Failed with result 'exit-code'.
Jan 30 20:56:15 zeph systemd[2283]: Failed to start Highly customizable Wayland bar for Sway and Wlroots based compositors..
@colemickens
Copy link
Contributor Author

jq and jless don't complain about my config:

[
  {
    "backlight": {
      "format": "nit {percent}",
      "on-scroll-down": "/nix/store/c0xk815ibsbz09q9cf0kdnaa6cayk9m5-brightnessctl-0.5.1/bin/brightnessctl set 2%-",
      "on-scroll-up": "/nix/store/c0xk815ibsbz09q9cf0kdnaa6cayk9m5-brightnessctl-0.5.1/bin/brightnessctl set 2%+"
    },
    "battery": {
      "format": "bat {}",
      "states": {
        "critical": 15,
        "warning": 25
      }
    },
    "clock": {
      "format": "{:%b-%d %H:%M}"
    },
    "cpu": {
      "format": "cpu {usage}",
      "interval": 2
    },
    "custom/ppp": {
      "exec": "/nix/store/x97klsl0km7nfr18080sgr2fv9n6h1zb-waybar-ppp.sh",
      "interval": 10,
      "return-type": "json"
    },
    "custom/rog": {
      "exec": "/nix/store/spdfmzf631ca547k1mq77vxqhlyl2cls-waybar-rog.sh",
      "interval": 10,
      "return-type": "json"
    },
    "idle_inhibitor": {
      "format": "iil {icon}",
      "format-icons": {
        "activated": "[x]",
        "deactivated": "[ ]"
      }
    },
    "layer": "top",
    "memory": {
      "format": "mem {}"
    },
    "modules-center": [
      "wlr/workspaces"
    ],
    "modules-left": [
      "sway/mode",
      "sway/workspaces"
    ],
    "modules-right": [
      "pulseaudio",
      "backlight",
      "tray",
      "custom/ppp",
      "custom/rog",
      "cpu",
      "memory",
      "network",
      "temperature",
      "battery",
      "clock"
    ],
    "network": {
      "format-ethernet": "eth",
      "format-wifi": "net {signalStrength}"
    },
    "pulseaudio": {
      "format": "vol {volume}",
      "on-click-middle": "/nix/store/h4bkx908ihvfaszgi3s3kwsh4wd23p5z-sway-+c8676fa/bin/swaymsg exec \"/nix/store/inj6ly5g2siq1632lh3mq9xszw8yvgjw-pavucontrol-5.0/bin/pavucontrol\""
    },
    "sway/mode": {
      "tooltip": false
    },
    "sway/workspaces": {
      "all-outputs": true,
      "disable-scroll-wraparound": true
    },
    "temperature": {
      "format": "tmp {temperatureC}"
    },
    "tray": {
      "spacing": 10
    },
    "wlr/taskbar": {}
  }
]

@Hellzbellz123
Copy link

i too have been experiencing this, it seems too be related too the outer braces
removing [] should fix the issue, but this means 2 bars in one config is impossible which im unsure is intended

@cyrinux
Copy link
Contributor

cyrinux commented Jan 31, 2024

i too have been experiencing this, it seems too be related too the outer braces removing [] should fix the issue, but this means 2 bars in one config is impossible which im unsure is intended

I confirm, same bug, same workaround, but this still looks like an issue/regression 👍🏻

@jlaunay
Copy link

jlaunay commented Jan 31, 2024

Same here since this commit, configuration of multiple outputs fails

@SrEstegosaurio
Copy link

Same error here.

@rtoijala
Copy link

Actually the faulty commit is 20fa578 which introduces the following code:

if (config.getConfig()["reload_style_on_change"].asBool()) {
    m_cssReloadHelper->monitorChanges();
}

The ["reload_style_on_change"] throws since it expects the result of getConfig() to be either a JSON null or a JSON object, but with multiple outputs, it's an array.

The ideal solution would be for the config format to be changed so that there is a possibility for global config instead of just per-bar config, i.e.

{
    "reload_style_on_change": false,
    "bars": [
        { ... first bar ...  },
        { ... second bar ... }
    ]
}

This would also help pave the way for defining modules globally so they can be shared between bars.

@Alexays Alexays added the bug Something isn't working label Jan 31, 2024
@Alexays
Copy link
Owner

Alexays commented Jan 31, 2024

Should be fixed with #2874

@Alexays Alexays closed this as completed Jan 31, 2024
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

7 participants