Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Add auto-run functionality to the Windows app #74

Merged
merged 28 commits into from
Nov 11, 2024

Conversation

bl4ckswordsman
Copy link
Owner

@bl4ckswordsman bl4ckswordsman commented Nov 10, 2024

Fixes #58

Add auto-run functionality to the Windows app.

  • Add set_auto_run and remove_auto_run functions in monitor-app/src/core/app_settings.py to create and remove registry entries for auto-run.
  • Modify SettingsLoader class in monitor-app/src/core/app_settings.py to include auto_run setting.
  • Add a checkbox in monitor-app/src/gui/settings_dialog.py to enable/disable auto-run functionality.
  • Modify the save_settings method in monitor-app/src/gui/settings_dialog.py to save the auto_run setting.
  • Import set_auto_run and remove_auto_run in monitor-app/main.py.
  • Modify the initialize_application function in monitor-app/main.py to call set_auto_run or remove_auto_run based on the setting.

For more details, open the Copilot Workspace session.

Fixes #58

Add auto-run functionality to the Windows app.

* Add `set_auto_run` and `remove_auto_run` functions in `monitor-app/src/core/app_settings.py` to create and remove registry entries for auto-run.
* Modify `SettingsLoader` class in `monitor-app/src/core/app_settings.py` to include `auto_run` setting.
* Add a checkbox in `monitor-app/src/gui/settings_dialog.py` to enable/disable auto-run functionality.
* Modify the `save_settings` method in `monitor-app/src/gui/settings_dialog.py` to save the `auto_run` setting.
* Import `set_auto_run` and `remove_auto_run` in `monitor-app/main.py`.
* Modify the `initialize_application` function in `monitor-app/main.py` to call `set_auto_run` or `remove_auto_run` based on the setting.

---

For more details, open the [Copilot Workspace session](https://copilot-workspace.githubnext.com/bl4ckswordsman/disco-beacon/issues/58?shareId=XXXX-XXXX-XXXX-XXXX).
Copy link

vercel bot commented Nov 10, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

1 Skipped Deployment
Name Status Preview Comments Updated (UTC)
disco-beacon ⬜️ Ignored (Inspect) Visit Preview Nov 11, 2024 1:47am

bl4ckswordsman and others added 27 commits November 10, 2024 14:19
* **Core Settings**:
  - Add `set_auto_run` and `remove_auto_run` functions to manage registry entries for auto-run.
  - Modify `SettingsLoader` class to include `auto_run` setting.

* **GUI Settings Dialog**:
  - Add a checkbox to enable/disable auto-run functionality.
  - Modify `save_settings` method to save the `auto_run` setting.

* **Main Application**:
  - Import `set_auto_run` and `remove_auto_run` from `app_settings`.
  - Import `os` module.
  - Modify `initialize_application` function to call `set_auto_run` or `remove_auto_run` based on the setting.
* **Core settings**:
  - Add `set_auto_run` and `remove_auto_run` functions to manage registry entries for auto-run.
  - Modify `SettingsLoader` class to include `auto_run` setting.

* **GUI settings dialog**:
  - Add a checkbox to enable/disable auto-run functionality.
  - Modify `save_settings` method to save the `auto_run` setting.

* **Main application**:
  - Import `set_auto_run` and `remove_auto_run` functions.
  - Modify `initialize_application` function to call `set_auto_run` or `remove_auto_run` based on the setting.

* **Platform utilities**:
  - Add `is_windows` function to check if the current platform is Windows.
* **`app_settings.py`**
  - Add `is_windows` check in `set_auto_run` and `remove_auto_run` functions
  - Import `is_windows` from `platform_utils`

* **`main.py`**
  - Add `is_windows` check before setting or removing auto-run
  - Import `is_windows` from `platform_utils`
* Wrap `winreg.OpenKey` and `winreg.DeleteValue` in a try-except block
* Catch `FileNotFoundError` and pass
…inux

refactor: Remove unused imports in main.py and settings_dialog.py
@bl4ckswordsman bl4ckswordsman merged commit 5c41e7c into master Nov 11, 2024
3 checks passed
@bl4ckswordsman bl4ckswordsman deleted the add-auto-run branch November 11, 2024 01:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add auto-run functionality to the Windows app
1 participant