Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

+SubtleWM +Hide blank +Centered list #8

Open
wants to merge 1 commit into from

1 participant

@frostyfrog

Added Subtle WM to the list of WMs
Hid blank fields
Vertically centered the list

(If you want, I can make the list centering toggleable ;) )

@frostyfrog frostyfrog Added the Subtle WM to the list
Hid blank fields
Vertically centered the list
9c7872d
@frostyfrog frostyfrog commented on the diff
@@ -98,7 +99,7 @@ processes = str(subprocess.check_output(('ps', '-u', getuser(), '-o', 'comm',
class Output:
results = []
- results.extend(['']*(18-len(output)))
+ #results.extend(['']*(18-len(output)))

Doh! I meant to remove that >.<

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
@frostyfrog frostyfrog commented on the diff
@@ -252,5 +259,7 @@ classes = {
out = Output()
for x in output:
- out.append(classes[x]())
+ result = classes[x]()
+ if result.value and result.value != '':

Only show fields in the list that aren't blank/empty

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on May 16, 2013
  1. @frostyfrog

    Added the Subtle WM to the list

    frostyfrog authored
    Hid blank fields
    Vertically centered the list
This page is out of date. Refresh to see the latest.
Showing with 12 additions and 3 deletions.
  1. +12 −3 archey
View
15 archey
@@ -62,6 +62,7 @@ wmDict = {
'pekwm': 'PekWM',
'ratpoison': 'ratpoison',
'scrotwm': 'ScrotWM',
+ 'subtle': 'Subtle',
'wmaker': 'Window Maker',
'wmfs': 'Wmfs',
'wmii': 'wmii',
@@ -98,7 +99,7 @@ processes = str(subprocess.check_output(('ps', '-u', getuser(), '-o', 'comm',
class Output:
results = []
- results.extend(['']*(18-len(output)))
+ #results.extend(['']*(18-len(output)))

Doh! I meant to remove that >.<

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
def __init__(self):
self.distro = self.__detectDistro()
@@ -113,7 +114,13 @@ class Output:
self.results.append('%s%s: %s%s' % (colorDict[self.distro][1], display.key, colorDict['Clear'][0], display.value))
def output(self):
- print(logosDict[self.distro].format(color = colorDict[self.distro], results = self.results))
+ from math import floor
+ results = []
+ results.extend(['']*floor((18-len(self.results))/2))
+ results.extend(self.results[:])
+ if len(results) < 18:
+ results.extend(['']*(18-len(results)))
+ print(logosDict[self.distro].format(color = colorDict[self.distro], results = results))
class User:
def __init__(self):
@@ -252,5 +259,7 @@ classes = {
out = Output()
for x in output:
- out.append(classes[x]())
+ result = classes[x]()
+ if result.value and result.value != '':

Only show fields in the list that aren't blank/empty

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
+ out.append(result)
out.output()
Something went wrong with that request. Please try again.