Permalink
Browse files

Underline the counter titles.

  • Loading branch information...
1 parent 2009a03 commit 3b033ccc878f59b194571467947b482276982065 @dagwieers committed Nov 21, 2006
Showing with 7 additions and 8 deletions.
  1. +1 −0 ChangeLog
  2. +6 −8 dstat
View
@@ -2,6 +2,7 @@
- Fixed dstat_clock to use localtime() instead of gmtime()
- Added external plugin dstat_vz for openvz cpu statistics
- Removed the underscoring of the counter titles
+- Added underlining for the counter titles
* 0.6.3 - Amsterdam - released 26/06/2006
- Changed default (silver) color of delimiter to gray
View
14 dstat
@@ -309,30 +309,28 @@ class dstat:
if isinstance(self.name, types.StringType):
max = self.statwidth()
return ansi['darkblue'] + self.name[0:max].center(max).replace(' ', '-') + ansi['default']
- ret = ''
+ ret = ansi['darkblue']
for i, name in enumerate(self.name):
max = self.width()
ret = ret + name[0:max].center(max).replace(' ', '-')
if i + 1 != len(self.name): ret = ret + ansi['blue'] + char['dash'] + ansi['darkblue']
- return ansi['darkblue'] + ret
+ return ret
def title2(self):
if isinstance(self.name, types.StringType):
ret = ''
for i, nick in enumerate(self.nick):
-# ret = ret + nick.center(self.format[1]).replace(' ', '_')
- ret = ret + nick.center(self.format[1])
+ ret = ret + ansi['blue'] + ansi['underline'] + nick.center(self.format[1]) + ansi['default']
if i + 1 != len(self.nick): ret = ret + char['space']
- return ansi['blue'] + ret
+ return ret
else:
ret = ''
for i, name in enumerate(self.name):
for j, nick in enumerate(self.nick):
-# ret = ret + ansi['blue'] + nick.center(self.format[1]).replace(' ', '_')
- ret = ret + ansi['blue'] + nick.center(self.format[1])
+ ret = ret + ansi['blue'] + ansi['underline'] + nick.center(self.format[1]) + ansi['default']
if j + 1 != len(self.nick): ret = ret + char['space']
if i + 1 != len(self.name): ret = ret + ansi['gray'] + char['colon']
- return ansi['blue'] + ret
+ return ret
def titlecsv(self, nr):
if nr == 1:

0 comments on commit 3b033cc

Please sign in to comment.