Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
a129ed3
feat: Implement Steam Animation Manager daemon
yogeshvar Aug 7, 2025
8b5f25b
Remove animation management, configuration, and video processing modules
yogeshvar Aug 7, 2025
35adb69
fix: Ensure proper environment for systemd service management commands
yogeshvar Aug 7, 2025
554e6d3
feat: Enhance systemd service installation for user-specific management
yogeshvar Aug 7, 2025
2142d80
feat: Improve system event monitoring and daemon management in Steam …
yogeshvar Aug 7, 2025
7371f03
fix: Update paths in installation and daemon scripts to reflect new d…
yogeshvar Aug 7, 2025
f20ba5a
feat: Enhance animation mounting process with bind mount fallback and…
yogeshvar Aug 7, 2025
85c076b
fix: Improve cache cleanup process with detailed logging and simplifi…
yogeshvar Aug 7, 2025
d0fb110
feat: Enhance suspend and throbber animation handling with boot anima…
yogeshvar Aug 7, 2025
2a5a99c
feat: Implement SteamOS readonly handling during installation and res…
yogeshvar Aug 7, 2025
f6c0e90
feat: Add suspend animation hook and delay handling during system sus…
yogeshvar Aug 7, 2025
3a4abd5
refactor: Simplify animation configuration and selection process
yogeshvar Aug 7, 2025
a42f3c5
fix: Standardize suspend animation delay to 10 seconds and clear anim…
yogeshvar Aug 7, 2025
52e4629
Remove Bash Daemon and related service files
yogeshvar Aug 9, 2025
cacbdce
feat: add auto-shuffle toggle to settings
yogeshvar Aug 9, 2025
68cd211
Implement code changes to enhance functionality and improve performance
yogeshvar Aug 9, 2025
b5093b1
feat: implement auto-shuffle toggle with 2-minute interval
yogeshvar Aug 9, 2025
c13d099
feat: enhance auto-shuffle functionality with user-defined intervals …
yogeshvar Aug 9, 2025
e000761
feat: enhance AutoShuffleToggle to include backend state refresh and …
yogeshvar Aug 9, 2025
a2dad38
refactor: remove periodic state refresh from AutoShuffleToggle for im…
yogeshvar Aug 9, 2025
98fec03
fix: add 'dist/' to .gitignore to prevent output folder from being tr…
yogeshvar Aug 9, 2025
04532bc
Implement feature X to enhance user experience and fix bug Y in module Z
yogeshvar Aug 9, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ tmp
# Coverage reports
coverage

dist/
# API keys and secrets
.env

Expand All @@ -31,9 +32,6 @@ bower_components
.DS_Store
Thumbs.db

# Ignore built ts files
dist/

__pycache__/

/.yalc
Expand Down
65 changes: 63 additions & 2 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
local_sets = []
animation_cache = []
unloaded = False
auto_shuffle_task = None


async def get_steamdeckrepo():
Expand Down Expand Up @@ -109,7 +110,9 @@ async def load_config():
'custom_animations': [],
'custom_sets': [],
'shuffle_exclusions': [],
'force_ipv4': False
'force_ipv4': False,
'auto_shuffle_enabled': False,
'auto_shuffle_interval': 10
}

async def save_new():
Expand Down Expand Up @@ -274,6 +277,46 @@ def randomize_all():
config['current_set'] = ''


async def auto_shuffle_daemon():
"""Background daemon that shuffles animations at user-defined intervals when enabled"""
global unloaded
while not unloaded:
try:
interval = config.get('auto_shuffle_interval', 120) # Default to 2 minutes
await asyncio.sleep(interval)
if unloaded or not config.get('auto_shuffle_enabled', False):
continue

decky_plugin.logger.info('Auto-shuffle: Shuffling animations')
randomize_all()
save_config()
apply_animations()
await load_config()
load_local_animations()
decky_plugin.logger.info('Auto-shuffle: Configuration reloaded')

except Exception as e:
decky_plugin.logger.error('Auto-shuffle daemon error', exc_info=e)
await asyncio.sleep(60) # Wait 1 minute before retry


def start_auto_shuffle_daemon():
"""Start the auto shuffle daemon if enabled"""
global auto_shuffle_task
if config.get('auto_shuffle_enabled', False) and (auto_shuffle_task is None or auto_shuffle_task.done()):
auto_shuffle_task = asyncio.create_task(auto_shuffle_daemon())
decky_plugin.logger.info('Auto-shuffle daemon started')


def stop_auto_shuffle_daemon():
"""Stop the auto shuffle daemon"""
global auto_shuffle_task
if auto_shuffle_task and not auto_shuffle_task.done():
auto_shuffle_task.cancel()
auto_shuffle_task = None
decky_plugin.logger.info('Auto-shuffle daemon stopped')


class Plugin:

async def getState(self):
Expand All @@ -292,7 +335,9 @@ async def getState(self):
'suspend': config['suspend'],
'throbber': config['throbber'],
'shuffle_exclusions': config['shuffle_exclusions'],
'force_ipv4': config['force_ipv4']
'force_ipv4': config['force_ipv4'],
'auto_shuffle_enabled': config['auto_shuffle_enabled'],
'auto_shuffle_interval': config['auto_shuffle_interval']
}
}
except Exception as e:
Expand Down Expand Up @@ -413,9 +458,21 @@ async def deleteAnimation(self, anim_id):
async def saveSettings(self, settings):
""" Save settings to config file """
try:
# Check if auto_shuffle_enabled changed
old_auto_shuffle = config.get('auto_shuffle_enabled', False)
config.update(settings)
new_auto_shuffle = config.get('auto_shuffle_enabled', False)

save_config()
apply_animations()

# Handle auto-shuffle daemon based on setting change
if old_auto_shuffle != new_auto_shuffle:
if new_auto_shuffle:
start_auto_shuffle_daemon()
else:
stop_auto_shuffle_daemon()

except Exception as e:
decky_plugin.logger.error('Failed to save settings', exc_info=e)
raise e
Expand Down Expand Up @@ -477,6 +534,9 @@ async def _main(self):
decky_plugin.logger.error('Failed to apply animations', exc_info=e)
raise e

# Start auto-shuffle daemon if enabled
start_auto_shuffle_daemon()

await asyncio.sleep(5.0)
if unloaded:
return
Expand All @@ -491,6 +551,7 @@ async def _main(self):
async def _unload(self):
global unloaded
unloaded = True
stop_auto_shuffle_daemon()
decky_plugin.logger.info('Unloaded')

async def _migration(self):
Expand Down
Loading