aboutsummaryrefslogtreecommitdiffstats
path: root/.i3/py3status/backup/whoami.py
diff options
context:
space:
mode:
authorAaron LI <aaronly.me@gmail.com>2016-01-06 15:11:44 +0800
committerAaron LI <aaronly.me@gmail.com>2016-01-06 15:11:44 +0800
commitdba767e8ff1599a0b4cf8fb3dc06ac0cce727748 (patch)
tree1c85bbf6409e1cb398da0dcb4cd5ad8a78644354 /.i3/py3status/backup/whoami.py
parentc07a9bd96fde28c0f672af8d1b4d345c2e34f1b3 (diff)
downloaddotfiles-dba767e8ff1599a0b4cf8fb3dc06ac0cce727748.tar.bz2
i3: update configuration for i3wm
* Update i3 wm config * Add i3blocks.conf * Remove py3status
Diffstat (limited to '.i3/py3status/backup/whoami.py')
-rw-r--r--.i3/py3status/backup/whoami.py26
1 files changed, 0 insertions, 26 deletions
diff --git a/.i3/py3status/backup/whoami.py b/.i3/py3status/backup/whoami.py
deleted file mode 100644
index f930991..0000000
--- a/.i3/py3status/backup/whoami.py
+++ /dev/null
@@ -1,26 +0,0 @@
-from getpass import getuser
-from time import time
-
-
-class Py3status:
- """
- Simply output the currently logged in user in i3bar.
-
- Inspired by i3 FAQ:
- https://faq.i3wm.org/question/1618/add-user-name-to-status-bar/
- """
- def whoami(self, i3status_output_json, i3status_config):
- """
- We use the getpass module to get the current user.
- """
- # the current user doesnt change so much, cache it good
- CACHE_TIMEOUT = 600
-
- # here you can change the format of the output
- # default is just to show the username
- username = '{}'.format(getuser())
-
- # set, cache and return the output
- response = {'full_text': username, 'name': 'whoami'}
- response['cached_until'] = time() + CACHE_TIMEOUT
- return (0, response)