taffybar / gtk-sni-tray

A StatusNotifierHost widget written using the gtk+3 bindings for haskell provided by gi-gtk.
BSD 3-Clause "New" or "Revised" License
36 stars 2 forks source link

Pattern match failure in GIGtkStrut.hs user error #33

Closed IllustratedMan-code closed 2 years ago

IllustratedMan-code commented 2 years ago

I get this error when I try to run gtk-sni-tray-standalone after starting the watcher. I am using hyprland if that matters. I am able to get it to open a window with the --no-strut flag, but then it just opens like a regular window.

colonelpanic8 commented 2 years ago

Can you paste the actual error?

IllustratedMan-code commented 2 years ago

Sorry, completely slipped my mind. I'm using the nix packages for gtk-sni-tray and status-notifier-item

Error in item building at startup:
MethodError {methodErrorName = ErrorName "org.freedesktop.DBus.Error.UnknownMethod", methodErrorSerial = Serial 12, methodErrorSender = Just (BusName ":1.227"), methodErrorDestination = Just (BusName ":1.461"), methodErrorBody = [Variant "No such method \8220GetObjectPathForItemName\8221"]}
gtk-sni-tray-standalone: user error (Pattern match failure in do expression at src/Graphics/UI/GIGtkStrut.hs:59:3-14)
colonelpanic8 commented 2 years ago

It's likely that one of these is failing:

  Just display <- maybe Gdk.displayGetDefault Gdk.displayOpen displayName
  Just monitor <- maybe (Gdk.displayGetPrimaryMonitor display)
                  (Gdk.displayGetMonitor display) monitorNumber

This probably means that gdk is not functioning properly for some reason, or something about your monitor setup is strange. I suppose that this error message is not the most friendly, but there's really no way to proceed at that point.

What WM/DE are you using? What does your X configuration look like?

ribosomerocker commented 2 years ago

I get this same error. I use Wayland (specifically Hyprland), and I get gtk-sni-tray via nix shell github:taffybar/gtk-sni-tray --no-write-lock-file (i need to include that --no-write-lock-file for whatever reason...) this is the error:

gtk-sni-tray-standalone: user error (Pattern match failure in do expression at src/Graphics/UI/GIGtkStrut.hs:59:3-14)

@IvanMalison I had this issue a while ago as well but I just gave up on gtk-sni-tray at that time, since I thought it was unmaintained.

colonelpanic8 commented 2 years ago

Is gyperland a Wayland setup?

ribosomerocker commented 2 years ago

Hyperland is a Wayland compositor.

colonelpanic8 commented 2 years ago

Hyperland is a Wayland compositor.

Yeah I wouldn't expect this to work without at least a few changes. Gtk.strut relies on ewmh stuff which is distinctly x11 based.

ribosomerocker commented 2 years ago

Ah, I see. It should likely be clarified that this (and I imagine Taffybar too) doesn't support Wayland compositors.

colonelpanic8 commented 2 years ago

@MonAaraj well it should be possible to add support in theory, but yes, that makes sense.

ribosomerocker commented 2 years ago

If you are able to do that, I would really appreciate it. It would make having trays on Wayland much nicer. I have a separate idea for this project as well, but it's fairly different and it shouldn't be put into this issue, so I'll put that feature request in a new issue though. Thank you very much for your response.

IllustratedMan-code commented 2 years ago

I'll go ahead and close. I didn't realize it didn't support Wayland.