diff --git a/.gitignore b/.gitignore index 08a3c77..f27e5f8 100644 --- a/.gitignore +++ b/.gitignore @@ -8,7 +8,11 @@ tags config.json powerline-shell.json .DS_Store + +# editors *sublime* +.vscode/ +.idea/ # Byte-compiled / optimized / DLL files __pycache__/ @@ -38,16 +42,6 @@ share/python-wheels/ *.egg MANIFEST -# PyInstaller -# Usually these files are written by a python script from a template -# before PyInstaller builds the exe, so as to inject date/other infos into it. -*.manifest -*.spec - -# Installer logs -pip-log.txt -pip-delete-this-directory.txt - # Unit test / coverage reports htmlcov/ .tox/ @@ -63,59 +57,6 @@ coverage.xml .pytest_cache/ cover/ -# Translations -*.mo -*.pot - -# Django stuff: -*.log -local_settings.py -db.sqlite3 -db.sqlite3-journal - -# Flask stuff: -instance/ -.webassets-cache - -# Scrapy stuff: -.scrapy - -# Sphinx documentation -docs/_build/ - -# PyBuilder -.pybuilder/ -target/ - -# Jupyter Notebook -.ipynb_checkpoints - -# IPython -profile_default/ -ipython_config.py - -# pyenv -# For a library or package, you might want to ignore these files since the code is -# intended to run in multiple environments; otherwise, check them in: -# .python-version - -# pipenv -# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control. -# However, in case of collaboration, if having platform-specific dependencies or dependencies -# having no cross-platform support, pipenv may install dependencies that don't work, or not -# install all needed dependencies. -#Pipfile.lock - -# PEP 582; used by e.g. github.com/David-OConnor/pyflow -__pypackages__/ - -# Celery stuff -celerybeat-schedule -celerybeat.pid - -# SageMath parsed files -*.sage.py - # Environments .env .venv @@ -125,26 +66,3 @@ ENV/ env.bak/ venv.bak/ -# Spyder project settings -.spyderproject -.spyproject - -# Rope project settings -.ropeproject - -# mkdocs documentation -/site - -# mypy -.mypy_cache/ -.dmypy.json -dmypy.json - -# Pyre type checker -.pyre/ - -# pytype static type analyzer -.pytype/ - -# Cython debug symbols -cython_debug/ diff --git a/powerline_shell/colortrans.py b/powerline_shell/colortrans.py index 6939259..c1e991b 100755 --- a/powerline_shell/colortrans.py +++ b/powerline_shell/colortrans.py @@ -100,7 +100,7 @@ RGB2SHORT_DICT = { (95, 135, 215): 68, (95, 135, 255): 69, (95, 175, 0): 70, - (95, 175, 95) : 71, + (95, 175, 95): 71, (95, 175, 135): 72, (95, 175, 175): 73, (95, 175, 215): 74, diff --git a/powerline_shell/segments/kubecontext.py b/powerline_shell/segments/kube_context.py similarity index 52% rename from powerline_shell/segments/kubecontext.py rename to powerline_shell/segments/kube_context.py index fde425e..8285b89 100644 --- a/powerline_shell/segments/kubecontext.py +++ b/powerline_shell/segments/kube_context.py @@ -8,8 +8,9 @@ import os class Segment(BasicSegment): def add_to_powerline(self): - kubecontext = os.environ.get("KUBECONFIG") - if kubecontext: - self.powerline.append(" kctx:%s " % os.path.basename(kubecontext), - self.powerline.theme.KUBECONFIG_FG, - self.powerline.theme.KUBECONFIG_BG) + kube_context = os.environ.get("KUBECONFIG") + if kube_context: + self.powerline.append(" kctx:%s " % os.path.basename(kube_context), + self.powerline.theme.KUBE_CONTEXT_FG, + self.powerline.theme.KUBE_CONTEXT_BG) + diff --git a/powerline_shell/themes/basic.py b/powerline_shell/themes/basic.py index 6163cab..71e32f1 100644 --- a/powerline_shell/themes/basic.py +++ b/powerline_shell/themes/basic.py @@ -44,5 +44,6 @@ class Color(DefaultColor): TIME_FG = 8 TIME_BG = 7 - KUBECONFIG_FG = 14 - KUBECONFIG_BG = 8 + KUBE_CONTEXT_FG = 14 + KUBE_CONTEXT_BG = 8 + diff --git a/powerline_shell/themes/default.py b/powerline_shell/themes/default.py index b971c2f..fa089ae 100644 --- a/powerline_shell/themes/default.py +++ b/powerline_shell/themes/default.py @@ -75,8 +75,9 @@ class DefaultColor(object): TIME_FG = 250 TIME_BG = 238 - KUBECONFIG_FG = 38 - KUBECONFIG_BG = 239 + KUBE_CONTEXT_FG = 38 + KUBE_CONTEXT_BG = 239 + class Color(DefaultColor): """ diff --git a/powerline_shell/themes/gruvbox.py b/powerline_shell/themes/gruvbox.py index 5cfdaa7..e5b9a03 100644 --- a/powerline_shell/themes/gruvbox.py +++ b/powerline_shell/themes/gruvbox.py @@ -110,5 +110,6 @@ class Color(DefaultColor): TIME_FG = light2 TIME_BG = dark4 - KUBECONFIG_BG = neutral_blue - KUBECONFIG_FG = dark2 + KUBE_CONTEXT_FG = neutral_blue + KUBE_CONTEXT_BG = dark2 + diff --git a/powerline_shell/themes/solarized_dark.py b/powerline_shell/themes/solarized_dark.py index 4ceb692..3f1dccb 100644 --- a/powerline_shell/themes/solarized_dark.py +++ b/powerline_shell/themes/solarized_dark.py @@ -43,5 +43,6 @@ class Color(DefaultColor): TIME_FG = 15 TIME_BG = 10 - KUBECONFIG_FG = 7 - KUBECONFIG_BG = 2 + KUBE_CONTEXT_FG = 7 + KUBE_CONTEXT_BG = 2 + diff --git a/powerline_shell/themes/washed.py b/powerline_shell/themes/washed.py index bda6b8a..19f06df 100644 --- a/powerline_shell/themes/washed.py +++ b/powerline_shell/themes/washed.py @@ -43,5 +43,5 @@ class Color(DefaultColor): TIME_FG = 8 TIME_BG = 7 - KUBECONFIG_FG = 0 - KUBECONFIG_BG = 7 + KUBE_CONTEXT_FG = 0 + KUBE_CONTEXT_BG = 7 diff --git a/setup.py b/setup.py index 465fea2..87482e2 100755 --- a/setup.py +++ b/setup.py @@ -2,7 +2,7 @@ from setuptools import setup, find_packages setup( - name="powerline-shell-test", + name="powerline-shell", version="0.7.0", description="A pretty prompt for your shell", author="Buck Ryan", @@ -27,6 +27,6 @@ setup( ], entry_points=""" [console_scripts] - powerline-shell-test=powerline_shell:main + powerline-shell=powerline_shell:main """, )