Skip to content

Commit

Permalink
minor code cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
aarron-lee committed Sep 20, 2024
1 parent 864cd47 commit c65e1c9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 21 deletions.
23 changes: 3 additions & 20 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
from plugin_settings import merge_tdp_profiles, get_saved_settings, get_tdp_profile, get_active_tdp_profile, per_game_profiles_enabled, set_setting as persist_setting
from gpu_utils import get_gpu_frequency_range
import plugin_utils
import migrations
# import migrations
import steam_info
import device_utils

Expand Down Expand Up @@ -222,11 +222,11 @@ async def get_ac_power_status(self):

# Asyncio-compatible long-running code, executed in a task when the plugin is loaded
async def _main(self):
decky_plugin.logger.info("Hello World!")
decky_plugin.logger.info("SimpleDeckyTDP Starting")

# Function called first during the unload process, utilize this to handle your plugin being removed
async def _unload(self):
decky_plugin.logger.info("Goodbye World!")
decky_plugin.logger.info("SimpleDeckyTDP Unloading")
pass

# Migrations that should be performed before entering `_main()`.
Expand All @@ -235,20 +235,3 @@ async def _migration(self):

# migrations.migrate_smt()
# migrations.disable_steam_patch()

# Here's a migration example for logs:
# - `~/.config/decky-template/template.log` will be migrated to `decky_plugin.DECKY_PLUGIN_LOG_DIR/template.log`
# decky_plugin.migrate_logs(os.path.join(decky_plugin.DECKY_USER_HOME,
# ".config", "decky-template", "template.log"))
# Here's a migration example for settings:
# - `~/homebrew/settings/template.json` is migrated to `decky_plugin.DECKY_PLUGIN_SETTINGS_DIR/template.json`
# - `~/.config/decky-template/` all files and directories under this root are migrated to `decky_plugin.DECKY_PLUGIN_SETTINGS_DIR/`
# decky_plugin.migrate_settings(
# os.path.join(decky_plugin.DECKY_HOME, "settings", "template.json"),
# os.path.join(decky_plugin.DECKY_USER_HOME, ".config", "decky-template"))
# Here's a migration example for runtime data:
# - `~/homebrew/template/` all files and directories under this root are migrated to `decky_plugin.DECKY_PLUGIN_RUNTIME_DIR/`
# - `~/.local/share/decky-template/` all files and directories under this root are migrated to `decky_plugin.DECKY_PLUGIN_RUNTIME_DIR/`
# decky_plugin.migrate_runtime(
# os.path.join(decky_plugin.DECKY_HOME, "template"),
# os.path.join(decky_plugin.DECKY_USER_HOME, ".local", "share", "decky-template"))
2 changes: 1 addition & 1 deletion py_modules/plugin_utils.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import logging
import file_timeout
from time import sleep
import advanced_options
# import advanced_options
from plugin_settings import bootstrap_profile, merge_tdp_profiles, get_tdp_profile, set_setting as persist_setting
from cpu_utils import ryzenadj, set_cpu_boost, get_scaling_driver, set_smt, supports_cpu_boost
from gpu_utils import set_gpu_frequency_range
Expand Down

0 comments on commit c65e1c9

Please sign in to comment.