generated from SteamDeckHomebrew/Plugin-Template
-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #89 from suchmememanyskill/dev
V1.7.1
- Loading branch information
Showing
7 changed files
with
127 additions
and
51 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,25 @@ | ||
import os | ||
from css_inject import Inject, to_inject | ||
|
||
SFP_DEFAULT_FILES = { | ||
"libraryroot.custom.css": ["desktop", "desktopoverlay"], | ||
"bigpicture.custom.css": ["bigpicture", "bigpictureoverlay"], | ||
"friends.custom.css": ["desktopchat"], | ||
"webkit.css": ["store"] | ||
} | ||
|
||
def is_folder_sfp_theme(dir : str) -> bool: | ||
for x in SFP_DEFAULT_FILES: | ||
if os.path.exists(os.path.join(dir, x)): | ||
return True | ||
|
||
return False | ||
|
||
def convert_to_css_theme(dir : str, theme) -> None: | ||
theme.name = os.path.basename(dir) | ||
theme.id = theme.name | ||
theme.version = "v1.0" | ||
theme.author = "" | ||
theme.require = 1 | ||
theme.dependencies = [] | ||
theme.injects = [to_inject(x, SFP_DEFAULT_FILES[x], dir, theme) for x in SFP_DEFAULT_FILES if os.path.exists(os.path.join(dir, x))] |
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
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