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

12 lines
344 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):
if os.getenv('SSH_CLIENT'):
powerline = self.powerline
powerline.append(' %s ' % powerline.network,
powerline.theme.SSH_FG,
powerline.theme.SSH_BG)