eww
eww copied to clipboard
[WIDGET] Rotation-Box
Description of the widget
Rotation-Box
The rotation box can contain an arbitrary number of widgets but only ever displays one.
Properties
-
index
:int
The index of the widget to display. -
transition
:string
the name of the transition. Possible values: "slideright", "slideleft", "slideup", "slidedown", "none" -
transitionback
:string
the name of the back transition. Possible values: "slideright", "slideleft", "slideup", "slidedown", "none" -
duration
:duration
the duration of the transition -
durationback
:duration
the duration of the back transition
Example
(defvar varIndex 0)
(eventbox
:onhover "eww update varIndex=1"
:onhoverlost "eww update varIndex=0"
(rotationbox
:index varIndex
:transition "slideright"
:transitionback "slideleft"
"0"
"1"))
Implementation proposal
No response
Example usage
I've got the idea when i was implementing a clock/date widget. I wanted the numbers to slide from time to date on hover and back. Something like this:
active onhover
______ ______
| %H | <--> | %d |
---
| %M | <--> | %m |
---
| %S | <--> | %y |
I first tried to implement it with to revealers, where one reveals when the other hides but couldn't quite get it to work because they were both taking their own space while I wanted them to use the same space. (Hope that makes sense)
Additional context
If there is another way of doing this I'll gladly use it. I'm new to eww and couldn't find an easy way.
hmmmmmmm this would be really cool to have, although implementation wouldn't be all that trivial, and it's definitely a niche usecase. I'm pretty sure it should be possible to do something like this with revealers currently, although I'm painfully aware of how weird the revealer spacing issues are -- GTK really doesn't like us ^^'
I think that cycle
widget might be a more appropriate name