From 373952684ac26a1604d5e9d99783c6139ea72a6c Mon Sep 17 00:00:00 2001 From: Foo Date: Sat, 29 Oct 2016 15:37:01 +0300 Subject: [PATCH] Provide another default theme with less troublesome characters Ref #1652 --- docs/source/configuration/reference.rst | 5 +- powerline/__init__.py | 2 +- powerline/config_files/themes/powerline.json | 8 +- .../themes/powerline_terminus.json | 146 ++++++++++++++++++ 4 files changed, 154 insertions(+), 7 deletions(-) create mode 100644 powerline/config_files/themes/powerline_terminus.json diff --git a/docs/source/configuration/reference.rst b/docs/source/configuration/reference.rst index c93cc0ce..6b622687 100644 --- a/docs/source/configuration/reference.rst +++ b/docs/source/configuration/reference.rst @@ -144,8 +144,8 @@ Common configuration is a subdictionary that is a value of ``common`` key in ``default_top_theme`` String, determines which top-level theme will be used as the default. - Defaults to ``powerline`` in unicode locales and ``ascii`` in non-unicode - locales. See `Themes`_ section for more details. + Defaults to ``powerline_terminus`` in unicode locales and ``ascii`` in + non-unicode locales. See `Themes`_ section for more details. Extension-specific configuration -------------------------------- @@ -331,6 +331,7 @@ powerline_unicode7 Theme with powerline dividers and unicode-7 symbols unicode Theme without any symbols from private use area unicode_terminus Theme containing only symbols from terminus PCF font unicode_terminus_condensed Like above, but occupies as less space as possible +powerline_terminus Like unicode_terminus, but with powerline symbols ascii Theme without any unicode characters at all ========================== ==================================================== diff --git a/powerline/__init__.py b/powerline/__init__.py index cd9e47d9..ac237595 100644 --- a/powerline/__init__.py +++ b/powerline/__init__.py @@ -310,7 +310,7 @@ def finish_common_config(encoding, common_config): ''' encoding = encoding.lower() if encoding.startswith('utf') or encoding.startswith('ucs'): - default_top_theme = 'powerline' + default_top_theme = 'powerline_terminus' else: default_top_theme = 'ascii' diff --git a/powerline/config_files/themes/powerline.json b/powerline/config_files/themes/powerline.json index db8246b7..8eb208ad 100644 --- a/powerline/config_files/themes/powerline.json +++ b/powerline/config_files/themes/powerline.json @@ -117,10 +117,10 @@ }, "powerline.segments.vim.visual_range": { "args": { - "CTRL_V_text": "{rows} × {vcols}", - "v_text_oneline": "C:{vcols}", - "v_text_multiline": "L:{rows}", - "V_text": "L:{rows}" + "CTRL_V_text": "↕{rows} ↔{vcols}", + "v_text_oneline": "↔{vcols}", + "v_text_multiline": "↕{rows}", + "V_text": "⇕{rows}" } }, "powerline.segments.vim.readonly_indicator": { diff --git a/powerline/config_files/themes/powerline_terminus.json b/powerline/config_files/themes/powerline_terminus.json new file mode 100644 index 00000000..caef6db3 --- /dev/null +++ b/powerline/config_files/themes/powerline_terminus.json @@ -0,0 +1,146 @@ +{ + "dividers": { + "left": { + "hard": " ", + "soft": " " + }, + "right": { + "hard": " ", + "soft": " " + } + }, + "spaces": 1, + "segment_data": { + "branch": { + "before": " " + }, + "stash": { + "before": "ST " + }, + "cwd": { + "args": { + "ellipsis": "…" + } + }, + + "line_current_symbol": { + "contents": " " + }, + "player": { + "args": { + "state_symbols": { + "fallback": "♫", + "play": "▶", + "pause": "▮▮", + "stop": "■" + } + } + }, + + "time": { + "before": "" + }, + + "powerline.segments.common.net.network_load": { + "args": { + "recv_format": "⇓ {value:>8}", + "sent_format": "⇑ {value:>8}" + } + }, + "powerline.segments.common.net.hostname": { + "before": " " + }, + "powerline.segments.common.bat.battery": { + "args": { + "full_heart": "♥", + "empty_heart": "♥", + "online": "⚡︎", + "offline": " " + } + }, + "powerline.segments.common.sys.uptime": { + "before": "↑ " + }, + "powerline.segments.common.mail.email_imap_alert": { + "before": "MAIL " + }, + "powerline.segments.common.env.virtualenv": { + "before": "(e) " + }, + "powerline.segments.common.wthr.weather": { + "args": { + "icons": { + "day": "DAY", + "blustery": "WIND", + "rainy": "RAIN", + "cloudy": "CLOUDS", + "snowy": "SNOW", + "stormy": "STORM", + "foggy": "FOG", + "sunny": "SUN", + "night": "NIGHT", + "windy": "WINDY", + "not_available": "NA", + "unknown": "UKN" + } + } + }, + "powerline.segments.common.time.fuzzy_time": { + "args": { + "unicode_text": true + } + }, + + "powerline.segments.vim.mode": { + "args": { + "override": { + "n": "NORMAL", + "no": "N·OPER", + "v": "VISUAL", + "V": "V·LINE", + "^V": "V·BLCK", + "s": "SELECT", + "S": "S·LINE", + "^S": "S·BLCK", + "i": "INSERT", + "R": "RPLACE", + "Rv": "V·RPLC", + "c": "COMMND", + "cv": "VIM·EX", + "ce": "NRM·EX", + "r": "PROMPT", + "rm": "-MORE-", + "r?": "CNFIRM", + "!": "!SHELL" + } + } + }, + "powerline.segments.vim.visual_range": { + "args": { + "CTRL_V_text": "↕{rows} ↔{vcols}", + "v_text_oneline": "↔{vcols}", + "v_text_multiline": "↕{rows}", + "V_text": "⇕{rows}" + } + }, + "powerline.segments.vim.readonly_indicator": { + "args": { + "text": "" + } + }, + "powerline.segments.vim.modified_indicator": { + "args": { + "text": "+" + } + }, + + "powerline.segments.i3wm.scratchpad": { + "args": { + "icons": { + "fresh": "●", + "changed": "○" + } + } + } + } +}