From 3f38f0c3abdd866223f0059ad7677f9cf66b48c7 Mon Sep 17 00:00:00 2001 From: Tobias Witek Date: Sat, 1 Feb 2020 14:04:34 +0100 Subject: [PATCH] [pip] Add themes & icons and make lookup work Really ugly hack (extending the lookup logic in theme.py) to make pip themes work, but for now, I am unable to come up with anything better. --- bumblebee/theme.py | 1 + setup.py | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/bumblebee/theme.py b/bumblebee/theme.py index 2b52f73..9b09231 100644 --- a/bumblebee/theme.py +++ b/bumblebee/theme.py @@ -22,6 +22,7 @@ def theme_path(): """Return the path of the theme directory""" return [ os.path.dirname("{}/../themes/".format(os.path.dirname(os.path.realpath(__file__)))), + os.path.dirname("{}/../../../../share/bumblebee-status/themes/".format(os.path.dirname(os.path.realpath(__file__)))), os.path.dirname(os.path.expanduser("~/.config/bumblebee-status/themes/")), ] diff --git a/setup.py b/setup.py index ed950ff..1dc6adb 100755 --- a/setup.py +++ b/setup.py @@ -42,10 +42,14 @@ EXTRAS_REQUIREMENTS_MAP = { "yubikey": read_module("yubikey"), } +import glob setup( install_requires=INSTALL_REQS, extras_require=EXTRAS_REQUIREMENTS_MAP, version=versioneer.get_version(), cmdclass=versioneer.get_cmdclass(), zip_safe=False, + data_files=[('share/bumblebee-status/themes', glob.glob('themes/*.json')), + ('share/bumblebee-status/themes/icons', glob.glob('themes/icons/*.json')) + ] )