[core/theme] add support for XDG_DATA_DIRS
read theme information from $XDG_DATA_DIRS/bumblebee-status/themes see #821
This commit is contained in:
parent
f462102439
commit
326e2f9318
1 changed files with 10 additions and 2 deletions
|
@ -14,11 +14,19 @@ log = logging.getLogger(__name__)
|
||||||
THEME_BASE_DIR = os.path.dirname(os.path.realpath(__file__))
|
THEME_BASE_DIR = os.path.dirname(os.path.realpath(__file__))
|
||||||
PATHS = [
|
PATHS = [
|
||||||
".",
|
".",
|
||||||
os.path.join(THEME_BASE_DIR, "../../themes"),
|
os.path.join(THEME_BASE_DIR, "../../themes")
|
||||||
|
]
|
||||||
|
|
||||||
|
if os.environ.get("XDG_DATA_DIRS"):
|
||||||
|
PATHS.extend([
|
||||||
|
os.path.join(p, "bumblebee-status/themes") for p in os.environ["XDG_DATA_DIRS"].split(":")
|
||||||
|
])
|
||||||
|
|
||||||
|
PATHS.extend([
|
||||||
os.path.expanduser("~/.config/bumblebee-status/themes"),
|
os.path.expanduser("~/.config/bumblebee-status/themes"),
|
||||||
os.path.expanduser("~/.local/share/bumblebee-status/themes"), # PIP
|
os.path.expanduser("~/.local/share/bumblebee-status/themes"), # PIP
|
||||||
"/usr/share/bumblebee-status/themes",
|
"/usr/share/bumblebee-status/themes",
|
||||||
]
|
])
|
||||||
|
|
||||||
|
|
||||||
def themes():
|
def themes():
|
||||||
|
|
Loading…
Reference in a new issue