eww icon indicating copy to clipboard operation
eww copied to clipboard

[FEATURE] Timeout duration for windows to be temporarily shown and then automatically hidden

Open isti115 opened this issue 2 years ago • 3 comments

Description of the requested feature

I am creating a volume indicator, that I would like to appear on screen whenever I make adjustments to the audio levels, but only for about three seconds, and disappear afterwards. (Yes, I know about wob, but I'd also like to display media information on the popup.)

My current workaround is to have the widget call a delayed close command for itself like this:

(defpoll dummy
  :interval "0s"
  'sleep 3; eww --config $HOME/.config/eww/volume/ close volume')

Which is a bit hacky and impractical. I think that it would also be a useful behavior to have the timeout period reset if a new open call arrives, e.g. keeping the volume panel open during adjustments and only hiding it three seconds after the last interaction. Sort of debouncing to the trailing edge.

Proposed configuration syntax

I think that in terms of configuration syntax, it would be enough to add a numeric :timeout property to defwindow.

Or, on a second thought, maybe this should be a parameter given to the open command instead? (Like --toggle.)


ps.: I'd be happy to work on this myself, if you agree with the inclusion of this feature and could give me some pointers in case I get stuck.

isti115 avatar Jul 13 '23 16:07 isti115

Definitely planning to implement this, probably via a command line flag like "--duration" on the eww open command!

elkowar avatar Aug 11 '23 10:08 elkowar

so how do we actually use the dummy named variable I want to use it for my volbar

Harsh-007-max avatar Aug 17 '23 19:08 Harsh-007-max

This was implemented in #884

bbb651 avatar Nov 27 '24 14:11 bbb651