eww icon indicating copy to clipboard operation
eww copied to clipboard

[FEATURE] How about scrolling text?

Open ariealerr opened this issue 4 years ago • 17 comments

Description of the requested feature

So we have limit_width which is really nice. But what if you wanted to shorten the name, but still want it to display the whole text? Just like scrolling text. Where it scrolls through the text, then goes back to the start of the text.

Proposed configuration syntax

<label text="hello i am very long text haha yes thank you" limit_width="10" scrolling="true"/>?

Additional context

lol idk

ariealerr avatar Jan 22 '21 17:01 ariealerr

This though... this. This is what we didn’t know we needed.

Axarva avatar Jan 24 '21 12:01 Axarva

Is vertical text rotation/scrolling possible? for trending lists/posts/watch-list etc? I would like to experiment with this. Something like this: https://www.cssscript.com/demo/vertical-text-rotator/

And @Axarva thanks for the examples configs on your repo.

bhanurapelly avatar Jan 24 '21 16:01 bhanurapelly

Sounds like a great proposal, although i'm not quite sure how i'd go about implementing that with GTK. I'll do some research!

elkowar avatar Jan 24 '21 20:01 elkowar

This would be nice to have

undefinedDarkness avatar Jan 26 '21 13:01 undefinedDarkness

Sounds like a great proposal, although i'm not quite sure how i'd go about implementing that with GTK. I'll do some research!

According to the documentation on gnome developer pages, the CSS transform property is added into gtk+4. I've checked the CSS properties on gtk+3.16 and gtk+3.20, but could not find any reference to the transform property with the exception of -gtk-icon-tranform which can be applied to builtin or application-loaded icons. The links for documents are provided below.

gtk+4 CSS Properties: https://developer.gnome.org/gtk4/unstable/ch39s04.html gtk+3CSS properties: https://developer.gnome.org/gtk3/stable/chap-css-properties.html

I shall do some more research regarding this.

bhanurapelly avatar Jan 26 '21 13:01 bhanurapelly

Thats great, eww will be using gtk4 soon, see #109

legendofmiracles avatar Feb 07 '21 07:02 legendofmiracles

Awesome. Will be waiting.

bhanurapelly avatar Feb 10 '21 12:02 bhanurapelly

nvm gtk4 was canceled 😔

legendofmiracles avatar Mar 08 '21 09:03 legendofmiracles

rest in peace

undefinedDarkness avatar Mar 08 '21 10:03 undefinedDarkness

There should be other, probably better ways to implement this tho, so hope is not lost 👍🏻

elkowar avatar Mar 08 '21 21:03 elkowar

It's already easily doable by using zscroll. You can use script-var to call a script like the following one (no interval required) :

#/bin/bash zscroll -l 30 \ --delay 0.1 \ --match-command "playerctl status" \ --match-text "Playing" "--scroll 1" \ --match-text "Paused" "--scroll 0" \ --update-check true 'playerctl metadata --format "{{ title }} - {{ artist }} "'

And from your eww.xml : <script-var name="music_player_scroll">/home/dwarfpriest/.config/eww/scripts/playerctl_scroll.sh</script-var>

Here I simply scroll the text returned by the playerctl metdata command.

RationalG avatar Apr 27 '21 16:04 RationalG

I mean that works, but it has a couple issues:

  1. it scrolls letter by letter rather than pixel by pixel
  2. Compared to a proper builtin solution it has some overhead and is significantly more effort to implement, ig

The main reason i haven't started to work on issues like these is that I'm still largely unhappy with how state and widget construction is managed in the code currently, thus I am planning to do more changes there. More complex widgets that require a lot of custom logic will be worked on after these refactors have been done, as otherwise they may unnecessarily increase the effort/complexity of said changes

elkowar avatar Apr 28 '21 07:04 elkowar

What are the steps that should be taken in order to support this? Would it be hard to implement? (Not asking for an ETA, just wanted to know the status of this issue.)

fufexan avatar Oct 14 '22 14:10 fufexan

What are the steps that should be taken in order to support this? Would it be hard to implement? (Not asking for an ETA, just wanted to know the status of this issue.)

No idea, but this is STILL something I'm waiting for :pensive:

ariealerr avatar Jan 08 '23 23:01 ariealerr

I searched and found this, it might be helpful.

fufexan avatar May 15 '23 01:05 fufexan