prasanthrangan / hyprdots

// Aesthetic, dynamic and minimal dots for Arch hyprland
GNU General Public License v3.0
7.2k stars 850 forks source link

[FEATURE REQUEST] Live Wallpaper. #440

Closed ghost closed 8 months ago

ghost commented 11 months ago

Can you add live wallpaper feature to your dotfiles?

kRHYME7 commented 11 months ago

For some info, I can add .gif to the swww directories and they worked as expected on swww.

ghost commented 11 months ago

For some info, I can add .gif to the swww directories and they worked as expected on swww. what's the path of swww? Can i add .mp4?

kRHYME7 commented 11 months ago

sadly no .mp4 for now on swww Look from https://github.com/Horus645/swww image

But i guess the maintainer can pull off something just like this great repo.

ghost commented 11 months ago

For some info, I can add .gif to the swww directories

what's path of swww in your dotfiles? i saw it installed but i dunno where's the path.

kRHYME7 commented 11 months ago

~/.config/swww/

if you like to add wallpaper you can put it inside the folders.

image

T-Crypt commented 11 months ago

~/.config/swww/(themename)

ghost commented 11 months ago

Uploading 2023-11-04 22-09-03.mp4…

I didn't saw my gif appear on mod + shift + T or mod + shift + W

T-Crypt commented 11 months ago

It's because it's not cached. And make sure you're in the correct theme directory.

You can run the create_cache.sh script in the Hyprdots repo that you cloned to your $HOME folder

ghost commented 11 months ago

https://github.com/prasanthrangan/hyprdots/assets/137863476/058c7281-84bc-40f2-bcb9-1fb0b0da1552

I tried but i didn't see anything.

kRHYME7 commented 11 months ago

@T-Crypt can this be the culprit.? image

kRHYME7 commented 11 months ago

Ow sorry @Akie3301 I think the script has been optimized to use to get jpg jpeg and png If you're comfortable to add "gif " yourself

here is the line

mapfile -d '' wpArray < <(find "${wallPath}" -type f \( -iname "*.jpg" -o -iname "*.jpeg" -o -iname "*.png" -iname "*.gif" \) -print0 | sort -z)
ghost commented 11 months ago

Ow sorry @Akie3301 I think the script has been optimized to use to get jpg jpeg and png If you're comfortable to add "gif " yourself

here is the line

mapfile -d '' wpArray < <(find "${wallPath}" -type f \( -iname "*.jpg" -o -iname "*.jpeg" -o -iname "*.png" -iname "*.gif" \) -print0 | sort -z)

Where's this line for me to change it?

T-Crypt commented 11 months ago

He's right.

You need to change line 88 in

Hyprdots/Scripts/create_cache.sh

kRHYME7 commented 11 months ago

I guess I wont recommend to try it because our notification and wall bash relied on the image we can disable the wallbash but our notification is built to use wallbash script you may get inviisible notifications

image image

But gif can absolutely be supported soon.

T-Crypt commented 11 months ago

You could try this

~/.config/hypr/scripts/swwwallpaper.sh -s path/to/wallpaper

https://github.com/prasanthrangan/hyprdots/issues/400

ghost commented 11 months ago

I guess I wont recommend to try it because our notification and wall bash relied on the image we can disable the wallbash but our notification is built to use wallbash script you may get inviisible notifications

image image

But gif can absolutely be supported soon.

yes, i hope you also add webm.

kRHYME7 commented 11 months ago

BTW can I know where you got those sick .gifs?

ghost commented 11 months ago

BTW can I know where you got those sick .gifs?

https://safebooru.donmai.us/ I like to search the tags "animated scenery"

ghost commented 11 months ago

You could try this

~/.config/hypr/scripts/swwwallpaper.sh -s path/to/wallpaper

400

it works, but: ❯ ~/.config/hypr/scripts/swwwallpaper.sh -s /home/akie3301/Downloads/Gif/original_drawn_by_wujing_f45b1f7c94badf252a99007477e0d4ed2.gif

/home/akie3301/.config/hypr/scripts/swwwallbash.sh: line 34: /home/akie3301/.config/spicetify/Themes/Sleek/Wall-Dcol.ini: No such file or directory sed: can't read /home/akie3301/.config/spicetify/Themes/Sleek/Wall-Dcol.ini: No such file or directory sed: can't read /home/akie3301/.config/spicetify/Themes/Sleek/Wall-Dcol.ini: No such file or directory sed: can't read /home/akie3301/.config/spicetify/Themes/Sleek/Wall-Dcol.ini: No such file or directory sed: can't read /home/akie3301/.config/spicetify/Themes/Sleek/Wall-Dcol.ini: No such file or directory eDP-1: 1280x720, scale: 2, currently displaying: image: /home/akie3301/Pictures/wallpapers/wallhaven-y8982k_1920x1080.png ❯ image

T-Crypt commented 11 months ago

@Akie3301

Just place those gifs in your pictures and run the command below

Swww img /home/(user)/Pictures/*.gif

Replace (user) with your user name and * with the name of the gif

On Monday, I'll work on adding gif support to the repo. I'm just on my mobile during the weekends

kRHYME7 commented 11 months ago

Yey, Looking forward for this.

ghost commented 11 months ago

https://github.com/prasanthrangan/hyprdots/assets/137863476/41d8dff2-acbd-405f-a24b-180e5911b005

Yey, Looking forward for this.

Do you know how to use gifgen? I use it for convert mp4 to gif (i don't use ffmpeg because my gif can have low quality.) I tried it but it has some error:

prasanthrangan commented 11 months ago

ya currently the scripts does not scan for gif files, this will require a rewrite to process gif files! I tied to use gifs initially, but swww does not play well with gif files as it slows down significantly...

Oskar-Idland commented 9 months ago

I tried to just add in -o -iname "*.gif" in both swwwallpaper.sh and swwwallselect.sh. It showed up in the menu, but without any preview, and when selected all my cpu cores went 100% until the screen shut off. I barely managed to revert the changes before rebooting! Did not show up as a new wallpaper, just froze on the old one.

RookiexCookie commented 8 months ago

yea i did that too same thing happened to me Even my swap got eatten, well dude said he have to rewrite the code to make it properly scan gifs.

kRHYME7 commented 8 months ago

I'll attempt first to rewrite... If someone already started a WIP maybe I can help with testing.

ArikRahman commented 8 months ago

Would it be possible to fix mp4 the same way as gifs?

kRHYME7 commented 8 months ago

I'll attempt first to rewrite... If someone already started a WIP maybe I can help with testing.

UPDATES GIF : Made it work. Added [0] to each wallpaper calls to make the converter extract the very first frame

caveats: + swww might be Buggy on GIF. 2 Gifs overlap

MR is here so you everyone can test https://github.com/prasanthrangan/hyprdots/pull/849

to fix glitches swww kill ; swww init

kRHYME7 commented 8 months ago

@ArikRahman

Would it be possible to fix mp4 the same way as gifs?

image

So in swww it would not be possible. Might be possible to turn mp4 into gif or other types supported by swww but IMO user might more suitable converting it manually instead.

Read more : https://github.com/LGFae/swww?tab=readme-ov-file#features

kRHYME7 commented 8 months ago

BTW CPU usage peaks at 40%. averages between 10 % -20% CPU usage reading at 1000 ms

Preview: https://github.com/prasanthrangan/hyprdots/pull/849#issuecomment-1937008380

https://github.com/prasanthrangan/hyprdots/assets/53417443/8db771e0-8537-4b61-9a15-58577c213dbf

kRHYME7 commented 8 months ago

@Oskar-Idland @RookiexCookie @ArikRahman

The .gif support is out now! Try it out.

to fetch updates you guys can follow this too https://github.com/prasanthrangan/hyprdots/discussions/863#discussioncomment-8438180

Closing this for now as the title is fulfilled.