added Notifications for Desktop Mode

This commit is contained in:
Roy 2025-01-04 10:09:58 -08:00 committed by GitHub
parent 3c65cbfd15
commit 414e92d162
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1551,12 +1551,20 @@ if new_shortcuts_added or shortcuts_updated:
except IOError as e:
print(f"Error writing to shortcuts.vdf: {e}")
# Print the created shortcuts
if created_shortcuts:
print("Created Shortcuts:")
for name in created_shortcuts:
print(name)
# Combine the names of created shortcuts into a single notification message
notification_text = "Added the following games to your Steam library:\n" + "\n".join(created_shortcuts)
time.sleep(1)
subprocess.run(['zenity', '--notification', '--text', notification_text, '--timeout=5'])
# Create the path to the output file
output_file_path = f"{logged_in_home}/.config/systemd/user/NSLGameScanner_output.log"
# Open the output file in write mode