dotfiles/config/powerline-shell/segments/env.py

11 lines
346 B
Python
Raw Normal View History

2021-04-20 11:12:35 +00:00
import os
from ..utils import BasicSegment
class Segment(BasicSegment):
def add_to_powerline(self):
self.powerline.append(
" %s " % os.getenv(self.segment_def["var"]),
self.segment_def.get("fg_color", self.powerline.theme.PATH_FG),
self.segment_def.get("bg_color", self.powerline.theme.PATH_BG))