Skip to content

Commit

Permalink
Merge pull request #3 from drmikecrowe/master
Browse files Browse the repository at this point in the history
Support xonsh>=0.9.18 -- fixes #2 (ptk_shell_type)
  • Loading branch information
vaaaaanquish authored May 9, 2020
2 parents c4a7e2e + 30fb38d commit 7b6ed71
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions xontrib/powerline2.xsh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,11 @@ import os
from os import path
from collections import namedtuple
from time import strftime
from xonsh.platform import ptk_shell_type
try:
from xonsh.platform import ptk_shell_type
ptk2 = ptk_shell_type() == 'prompt_toolkit2'
except ImportError:
ptk2 = True


__all__ = ()
Expand Down Expand Up @@ -30,7 +34,7 @@ $PL_DEFAULT_COLORS = {
"full_rtns": ("WHITE", "RED", "#444"),
}

if ptk_shell_type() == 'prompt_toolkit2':
if ptk2:
$PTK_STYLE_OVERRIDES['bottom-toolbar'] = 'noreverse'

modes = {
Expand Down

0 comments on commit 7b6ed71

Please sign in to comment.