diff --git a/lib/renderers/__init__.py b/lib/renderers/__init__.py deleted file mode 100644 index 3c7c2387..00000000 --- a/lib/renderers/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -class SegmentRenderer: - def hl(self, fg=None, bg=None, attr=None): - raise NotImplementedError - -from lib.renderers.terminal import TerminalSegmentRenderer -from lib.renderers.tmux import TmuxSegmentRenderer -from lib.renderers.vim import VimSegmentRenderer diff --git a/lib/__init__.py b/powerline/__init__.py similarity index 100% rename from lib/__init__.py rename to powerline/__init__.py diff --git a/lib/colors.py b/powerline/colorscheme.py similarity index 99% rename from lib/colors.py rename to powerline/colorscheme.py index c0a34e45..cb345904 100644 --- a/lib/colors.py +++ b/powerline/colorscheme.py @@ -1,3 +1,5 @@ +# -*- coding: utf-8 -*- + cterm_to_hex = { 16: 0x000000, 17: 0x00005f, 18: 0x000087, 19: 0x0000af, 20: 0x0000d7, 21: 0x0000ff, 22: 0x005f00, 23: 0x005f5f, 24: 0x005f87, 25: 0x005faf, 26: 0x005fd7, 27: 0x005fff, diff --git a/lib/core.py b/powerline/core.py similarity index 100% rename from lib/core.py rename to powerline/core.py diff --git a/vim/__init__.py b/powerline/ext/__init__.py similarity index 100% rename from vim/__init__.py rename to powerline/ext/__init__.py diff --git a/powerline/ext/terminal/__init__.py b/powerline/ext/terminal/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/lib/renderers/terminal.py b/powerline/ext/terminal/renderer.py similarity index 100% rename from lib/renderers/terminal.py rename to powerline/ext/terminal/renderer.py diff --git a/powerline/ext/tmux/__init__.py b/powerline/ext/tmux/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/lib/renderers/tmux.py b/powerline/ext/tmux/renderer.py similarity index 100% rename from lib/renderers/tmux.py rename to powerline/ext/tmux/renderer.py diff --git a/powerline/ext/vim/__init__.py b/powerline/ext/vim/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/vim/bindings.py b/powerline/ext/vim/bindings.py similarity index 100% rename from vim/bindings.py rename to powerline/ext/vim/bindings.py diff --git a/lib/renderers/vim.py b/powerline/ext/vim/renderer.py similarity index 100% rename from lib/renderers/vim.py rename to powerline/ext/vim/renderer.py diff --git a/vim/segments/__init__.py b/powerline/ext/vim/segments/__init__.py similarity index 100% rename from vim/segments/__init__.py rename to powerline/ext/vim/segments/__init__.py diff --git a/vim/segments/core.py b/powerline/ext/vim/segments/core.py similarity index 97% rename from vim/segments/core.py rename to powerline/ext/vim/segments/core.py index e5586d96..a08d1443 100644 --- a/vim/segments/core.py +++ b/powerline/ext/vim/segments/core.py @@ -74,7 +74,7 @@ def readonly_indicator(text=u'⭤'): return text if int(vim.eval('&readonly')) else None -def branch(symbol=u'⭠'): +def branch(): '''Return VCS branch. TODO: Expand this function to handle several VCS plugins. @@ -87,7 +87,7 @@ def branch(symbol=u'⭠'): except TypeError: pass - return symbol + ' ' + branch if branch else None + return branch if branch else None def file_directory(): diff --git a/powerline/renderer.py b/powerline/renderer.py new file mode 100644 index 00000000..40a96afc --- /dev/null +++ b/powerline/renderer.py @@ -0,0 +1 @@ +# -*- coding: utf-8 -*- diff --git a/powerline/segment.py b/powerline/segment.py new file mode 100644 index 00000000..40a96afc --- /dev/null +++ b/powerline/segment.py @@ -0,0 +1 @@ +# -*- coding: utf-8 -*- diff --git a/powerline/theme.py b/powerline/theme.py new file mode 100644 index 00000000..40a96afc --- /dev/null +++ b/powerline/theme.py @@ -0,0 +1 @@ +# -*- coding: utf-8 -*-