mirror of
https://github.com/LazoCoder/Pokemon-Terminal
synced 2025-02-16 21:08:32 +00:00
Fix message, adds documentation
- fixes consistency of '__' in inports in the wallpapers sub modules
This commit is contained in:
parent
b035b4f212
commit
66fd636845
4 changed files with 14 additions and 9 deletions
|
@ -43,7 +43,7 @@ def change_wallpaper(image_file_path):
|
|||
print("Invalid number, try again!")
|
||||
target = providers[inp]
|
||||
elif len(providers) <= 0:
|
||||
print("Your desktop environment isn't supported by this time.")
|
||||
print("Your desktop environment isn't supported at this time.")
|
||||
sys.exit()
|
||||
else:
|
||||
target = providers[0]
|
||||
|
|
|
@ -11,6 +11,11 @@ def _is_adapter(member) -> bool:
|
|||
|
||||
|
||||
def _get_adapter_classes() -> [WallpaperProvider]:
|
||||
"""
|
||||
This methods reads all the modules in the adapters folder searching for
|
||||
all the implementing wallpaper adapter classes
|
||||
thanks for/adapted from https://github.com/cclauss/adapter_pattern/
|
||||
"""
|
||||
dirname = os.path.join(os.path.dirname(
|
||||
os.path.abspath(__file__)), 'adapters')
|
||||
adapter_classes = []
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
from . import WallpaperProvider as _WProv
|
||||
from . import WallpaperProvider as __WProv
|
||||
import subprocess as __sp
|
||||
import sys as __sys
|
||||
|
||||
|
||||
class DarwinProvider(_WProv):
|
||||
class DarwinProvider(__WProv):
|
||||
__osa_script_fmt = """tell application "System Events"
|
||||
\ttell current desktop
|
||||
\t\tset picture to "{}"
|
||||
|
|
|
@ -1,14 +1,14 @@
|
|||
from . import WallpaperProvider as _WProv
|
||||
import os as _os
|
||||
from . import WallpaperProvider as __WProv
|
||||
import os as __os
|
||||
|
||||
|
||||
class GnomeProvider(_WProv):
|
||||
class GnomeProvider(__WProv):
|
||||
def change_wallpaper(path: str) -> None:
|
||||
_os.system('gsettings set org.gnome.desktop.background ' +
|
||||
f'picture-uri "file://{path}"')
|
||||
__os.system('gsettings set org.gnome.desktop.background ' +
|
||||
f'picture-uri "file://{path}"')
|
||||
|
||||
def is_compatible() -> bool:
|
||||
return "gnome" in _os.environ.get("GDMSESSION")
|
||||
return "gnome" in __os.environ.get("GDMSESSION")
|
||||
|
||||
def __str__():
|
||||
return "GNOME Shell Desktop"
|
||||
|
|
Loading…
Add table
Reference in a new issue