whoami: annihilate the lines
Display logged-in username.
Configuration parameters:
- format: display format for whoami (default '{username}')
+ format: display format for this module (default '{username}')
Format placeholders:
{username} display current username
@@ -26,25 +26,11 @@ class Py3status:
# available configuration parameters
format = '{username}'
- class Meta:
- deprecated = {
- 'remove': [
- {
- 'param': 'cache_timeout',
- 'msg': 'obsolete parameter',
- },
- ],
- }
-
def whoami(self):
- """
- We use the getpass module to get the current user.
- """
- username = '{}'.format(getuser())
-
return {
'cached_until': self.py3.CACHE_FOREVER,
- 'full_text': self.py3.safe_format(self.format, {'username': username})
+ 'full_text': self.py3.safe_format(
+ self.format, {'username': getuser()})
}
