dotfiles/config/powerline-shell/segments/env.py
2021-04-20 13:12:35 +02:00

10 lines
346 B
Python

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))