From 414e92d1627259fa597cea41f27652590fa656b0 Mon Sep 17 00:00:00 2001 From: Roy <88516395+moraroy@users.noreply.github.com> Date: Sat, 4 Jan 2025 10:09:58 -0800 Subject: [PATCH] added Notifications for Desktop Mode --- NSLGameScanner.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/NSLGameScanner.py b/NSLGameScanner.py index 0147130..e802903 100644 --- a/NSLGameScanner.py +++ b/NSLGameScanner.py @@ -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