hyprlock icon indicating copy to clipboard operation
hyprlock copied to clipboard

animation support for background image

Open nothingHereReally opened this issue 11 months ago • 8 comments

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 avatar Jan 02 '25 06:01 nothingHereReally

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

nothingHereReally avatar Jan 02 '25 07:01 nothingHereReally

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.

PointerDilemma avatar Jan 02 '25 08:01 PointerDilemma

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.

PointerDilemma avatar Jan 02 '25 08:01 PointerDilemma

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

nothingHereReally avatar Jan 03 '25 06:01 nothingHereReally

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?

XenGi avatar Jan 05 '25 18:01 XenGi

@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 https://github.com/hyprwm/hyprlock/pull/583, so it is available in 0.6.1. Not in 0.6.0

PointerDilemma avatar Jan 06 '25 10:01 PointerDilemma

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.

PointerDilemma avatar Jan 06 '25 11:01 PointerDilemma

I am searching for same, would like mp4 support for background

gondhijagapathi avatar Jan 21 '25 11:01 gondhijagapathi