Skip to content

Commit

Permalink
Merge pull request #145 from guilhermechapiewski/master
Browse files Browse the repository at this point in the history
Added space after hostname to prevent cutting the last character
  • Loading branch information
banga committed May 26, 2014
2 parents e830022 + 4eb3738 commit b9478c8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion powerline-shell.py.template
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ class Powerline:

def draw(self):
return (''.join(self.draw_segment(i) for i in range(len(self.segments)))
+ self.reset).encode('utf-8')
+ self.reset).encode('utf-8') + ' '

def draw_segment(self, idx):
segment = self.segments[idx]
Expand Down
2 changes: 1 addition & 1 deletion segments/hostname.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ def add_hostname_segment():
hostname = gethostname()
FG, BG = stringToHashToColorAndOpposite(hostname)
FG, BG = (rgb2short(*color) for color in [FG, BG])
host_prompt = ' %s' % hostname.split('.')[0]
host_prompt = ' %s ' % hostname.split('.')[0]

powerline.append(host_prompt, FG, BG)
else:
Expand Down

0 comments on commit b9478c8

Please sign in to comment.