SDH-AnimationChanger icon indicating copy to clipboard operation
SDH-AnimationChanger copied to clipboard

Feature request: Add shuffle to Steam client restart and upon returning to game mode

Open Insperatus opened this issue 2 years ago • 8 comments

It seems as though videos are only shuffled upon reboot or cold boot and not upon restarting the Steam client from game mode or returning to game mode from desktop mode. Is it possible to implement shuffle under the latter two scenarios?

Insperatus avatar Oct 16 '22 02:10 Insperatus

Hi, that should be correct, the shuffling only takes place when the Python side of the plugin is loaded, which seems to persist past Steam Client restarts. I'm not aware of any mechanisms for the plugins to get events for when the client loads, but I could imagine that it could be done when the quick access menu first loads. Not sure if that would require opening the quick access menu first, though.

TheLogicMaster avatar Oct 16 '22 02:10 TheLogicMaster

Perhaps the shuffle could take place whenever game mode is exited? Then a new one would be ready upon return to gaming mode.

Insperatus avatar Oct 16 '22 03:10 Insperatus

Perhaps the shuffle could take place whenever game mode is exited? Then a new one would be ready upon return to gaming mode.

As far as I know, there isn't any way for plugins to detect game mode exiting at the moment, though.

TheLogicMaster avatar Oct 16 '22 04:10 TheLogicMaster

Perhaps the shuffle could take place whenever game mode is exited? Then a new one would be ready upon return to gaming mode.

As far as I know, there isn't any way for plugins to detect game mode exiting at the moment, though.

There is a way using systemd and another service. I did it in my repo if you want to take a look. It triggers on a graphical session launch (switch to desktop) and swaps the symlink. Idk if I'll keep continuing with my project because I like the gui aspect of yours.

hummelm10 avatar Oct 16 '22 19:10 hummelm10

I had considered doing something similar with a desktop startup file of some sort. Not sure how best to communicate back to the plugin, though. I suppose it could open/watch some sort of file/socket and just listen for an event. Also not sure what their position is on installing additional services and such over in the Steamdeck Homebrew Discord, since the plugin doesn't know what it gets uninstalled and can't clean up after itself, as far as I know.

TheLogicMaster avatar Oct 16 '22 20:10 TheLogicMaster

Depending on when plugins in the quick access menu are loaded/rendered, I could probably have an event when the plugin first gets loaded or potentially seen. Might require opening the quick access menu, but it would be a much cleaner approach.

TheLogicMaster avatar Oct 16 '22 20:10 TheLogicMaster

Any update on this? Steam now has the option to play boot animations on every wake, would be awesome if we could have different boot animations play every wake instead of every reboot.

El-Chivo979 avatar Apr 29 '23 19:04 El-Chivo979

I looked into it a bit, the general method would be listening to the PrepareForSleep signal from the org.freedesktop.login1.Manager dbus interface; however, neither dbus or dbus_next modules load correctly in DeckyLoader at the current moment due to the python dependencies being frozen by PyInstaller.

Some ways around this could be:

  • adding all the requisite dependencies to the repo (possibly as submodules)
  • bundling parts of this plugin as an executable that then talks to the actual plugin code

BobobUnicorn avatar Dec 18 '23 01:12 BobobUnicorn