generated from SteamDeckHomebrew/Plugin-Template
-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Split off settings in different file
- Loading branch information
1 parent
239efa8
commit 19e0b51
Showing
5 changed files
with
43 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
import os | ||
from css_utils import get_theme_path, store_write, store_read, is_steam_beta_active | ||
|
||
def store_or_file_config(key : str) -> bool: | ||
if os.path.exists(os.path.join(get_theme_path(), key.upper())): | ||
return True | ||
|
||
read = store_read(key) | ||
return read == "True" or read == "1" | ||
|
||
def setting_beta_mappings() -> bool: | ||
setting = store_read("beta_translations") | ||
|
||
return ((len(setting.strip()) <= 0 or setting == "-1" or setting == "auto") and is_steam_beta_active()) or (setting == "1" or setting == "true") | ||
|
||
def setting_redirect_logs() -> bool: | ||
return not store_or_file_config("no_redirect_logs") | ||
|
||
def setting_watch_files() -> bool: | ||
return store_or_file_config("watch") | ||
|
||
def set_setting_watch_files(watch : bool): | ||
store_write("watch", "1" if watch else "0") | ||
|
||
def setting_run_server() -> bool: | ||
return store_or_file_config("server") | ||
|
||
def setting_install_dependencies() -> bool: | ||
return not store_or_file_config("no_deps_install") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters