Hyprland icon indicating copy to clipboard operation
Hyprland copied to clipboard

Option to clear configuration error popup after some time

Open m-bartlett opened this issue 11 months ago • 7 comments

Description

Configuration errors stay on screen persistently. If there are many errors leading to a large popup, it obscures the screen underneath which makes it hard to troubleshoot. Here is a screenshot of this issue:

errors

One idea is under the debug section a variable could be added such as error_popup_timeout or similar whose value would indicate to hide the error popup after that much time has elapsed.

m-bartlett avatar Mar 05 '24 22:03 m-bartlett

damn bro xD

vaxerski avatar Mar 05 '24 22:03 vaxerski

Timeout is not a good idea, as it's easy to miss an error that way. Also you will still wait a while with obscured screen, easier just switch to tty and fix it. Max size maybe and optionally some interactivity like expand/collapse or scrolling.

Ligthiago avatar Mar 05 '24 22:03 Ligthiago

I'd say max size.

vaxerski avatar Mar 05 '24 22:03 vaxerski

Timeout is not a good idea, as it's easy to miss an error that way. Also you will still wait a while with obscured screen, easier just switch to tty and fix it. Max size maybe and optionally some interactivity like expand/collapse or scrolling.

That's a fair argument. I did try to fix from another tty but my machine kept freezing when switching back to the hyprland session, not exactly sure what was causing that. But yeah perhaps maybe a dispatcher that toggles the error popup's visibility? Or max size would work as well

m-bartlett avatar Mar 05 '24 23:03 m-bartlett

dispatcher that toggles the error popup's visibility

Maybe a nice addition, yes, but it will not solve the problem for all users who may encounter this, because keybind with this dispatcher will not come out of the box like default max size and you need to add it manually in your config. And since such a mess does not happen often, you will probably not be prepared for it with special keybind, especially first time.

Ligthiago avatar Mar 05 '24 23:03 Ligthiago

That's a good point as well, given that I think max size + scrolling seems to be the most practical solution

m-bartlett avatar Mar 06 '24 06:03 m-bartlett

The popup is also kinda annoying when you change hyprland versions and you have plugins that add keywords/dispatchers. (And if I'm being picky it's still sorta annoying it flashes briefly even when the plugins are good)

I crapped out a plugin earlier today that suppresses the error popup and exposes the errors via hyprctl configerrors. The second part of that is writing a bar plugin (waybar,ewww wtf ever) that queries it and yells at you about config problems. (or some quick hack with notify-send maybe?).

I could turn the hyprctl part into a real PR if there's interest in exposing that stuff for scripting in the default install.

zakk4223 avatar Mar 08 '24 06:03 zakk4223

Here I was with my 4K screen fully covered...

The worst part about it is that it follows focus. Like a real troll. You try opening an editor to fix your configs on the secondary monitor and the pop-up promptly jumps to that display to cover it in turn.

I like the idea to have a dispatcher to get the error, though I think a simple time-stamped log file could be already enough to retain the information. Personally I was thinking maybe a way to dismiss them manually (like right-clicking into them) or even better: collapsing.

Imagine you've really screwed up and find yourself with 200 lines of error. Having them displayed like so would be very nice:

Errors: 200  [See details]

  Error blabla: something in file /some/where/hypr/hyprland.conf: lorem ipsum
  Error blabla: something in file /some/where/hypr/hyprland.conf: amet sit dolor
  Error blabla: something in file /some/where/hypr/hyprland.conf: consectetur adipiscing elit
  ...

[See details] would be a link to unroll the whole thing, and would change to [Hide details] to collapse everything. :thinking:

SirWrexes avatar Mar 27 '24 14:03 SirWrexes

going to add it should be reserved area, so it doesn't cover the tiled windows

MightyPlaza avatar Mar 27 '24 15:03 MightyPlaza

This https://github.com/hyprwm/Hyprland/pull/5165 is already fix stuff, so issue should be closed I guess.

Ligthiago avatar Mar 27 '24 15:03 Ligthiago

yea

vaxerski avatar Mar 27 '24 16:03 vaxerski