Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

animation support for background image #632

Open
nothingHereReally opened this issue Jan 2, 2025 · 7 comments
Open

animation support for background image #632

nothingHereReally opened this issue Jan 2, 2025 · 7 comments
Labels
enhancement New feature or request

Comments

@nothingHereReally
Copy link

Description

is it already possible to have some screensaver like on hyprlock?

on your wiki page( https://wiki.hyprland.org/Hypr-Ecosystem/hyprlock/ ) on Widget list has this statement Supported image formats are png, jpg and webp (no animations though) which seems that it's not supported,

but on Background which has this parameter reload_cmd and a description of command to get new path. If empty, old path will be used. with a type of str and the default is [[Empty]]

  1. i tried reload_cmd=$HOME/pics/blah_002.png( and i also have path=$HOME/pics/blah_001.png ) and set reload_time=2, crossfade_time=2
  2. i tried reload_cmd= cmd[update:1000] echo "$HOME/pics/blah_002.png"( and i also have path=$HOME/pics/blah_001.png ) and set reload_time=2, crossfade_time=2

both didn't work( what i expect from reload_cmd is that it should change my background image from blah_001.png to blah_002.png ), or am i using reload_cmd the wrong way, sorry i don't really understand on how to use this reload_cmd, if someone could explain to me the use of it, that would be great

if currently( 2025-1-2 ) hyprlock doesn't support screensaver( to change on multiple images, maybe support gif file ) like feature, please consider adding this feature to hyprlock

@nothingHereReally nothingHereReally added the enhancement New feature or request label Jan 2, 2025
@nothingHereReally
Copy link
Author

found a way to have screensaver on hyprlock

  1. on your hyprlock config don't include the background, this
background{
}

don't include it and also on general add this settings

general{
    hide_cursor= true
    ignore_empty_input= true
}

i just think hiding the cursor and ignoring empty input are safer

  1. install a cli image viewer package that can do slideshow, i recommend imv if already using wayland, on Arch just run pacman -S imv to get imv, then create a directory where inside it are just image files, say on $HOME/pics/ directory are just png and jpg files

  2. to have screensaver like, run( this is using imv )

imv -ft 1.5 $HOME/pics/* &
hyprlock -c $HOME/.config/hypr/hyprlock.conf

on imv -f is for full screen at start, -t 1.5 is for slideshow on for each image be taking only 1.5seconds

@PaideiaDilemma
Copy link
Collaborator

Please don't do this. This will break at some point when hyprland stops to rendering the full workspace below session-lock

@nothingHereReally
The reload_cmd is intended to be used for this. The schematics seem confuse some people.
It is a command, so it will be ran in you shell. So if you try to do reload_cmd=$HOME/pics/blah_002.png it will try to execute $HOME/pics/bla_002.png. What you want is reload_cmd=echo "$HOME/pics/blah_002.png". That way the output of the command will be a path, which is what you need.

There are a bunch of people that use reload_cmd to cycle trough images.

@PaideiaDilemma
Copy link
Collaborator

To me that is not an "animated background". That is being able to "change the background".
We don't support gifs or any real animated backgrounds. We can leave this issue open, if you want to suggest that as an enhancement, otherwise we already support what you want with reload_cmd.

@nothingHereReally
Copy link
Author

nothingHereReally commented Jan 3, 2025

To me that is not an "animated background". That is being able to "change the background". We don't support gifs or any real animated backgrounds. We can leave this issue open, if you want to suggest that as an enhancement, otherwise we already support what you want with reload_cmd.

yes please, having support for real animated background like gif files( or maybe even mp4 files ) would be great

also this reload_cmd on background seems to not exist upon using it and running hyprlock -c hyrprlock.conf
file but on Image reload_cmd works, i'm on Arch GNU/Linux already on Wayland and using Hyprland, running hyprlock --version result:Hyprlock version 0.6.0

@XenGi
Copy link

XenGi commented Jan 5, 2025

I would also be interested in simple GIF or MP4 support. Is this the right issue to support or should we create a dedicated one?

@PaideiaDilemma
Copy link
Collaborator

@nothingHereReally

also this reload_cmd on background seems to not exist upon using it and running hyprlock -c hyrprlock.conf

Background reload is supported since #583, so it is available in 0.6.1.
Not in 0.6.0

@PaideiaDilemma
Copy link
Collaborator

I would also be interested in simple GIF or MP4 support. Is this the right issue to support or should we create a dedicated one?

I would say make a new one, because this issue is already a bit bloated and while "reload" and "animated" are related, they are not the same and would work very different.
There is also #131 which mentions gifs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants