bin env python coding utf-8 from time import strftime sleep import os

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
#!/bin/env python
# -*- coding: utf-8 -*-
from time import strftime, sleep
import os
_time_format = "[ %a-%d/%m/%y | %H:%M ]"
_widgetName = "clock"
_awesome_client_path = "%s/bin/awesome-client" % os.environ.get('HOME')
if __name__ == "__main__":
while 1:
pipe = os.popen( _awesome_client_path, 'w')
pipe.write( "0 widget_tell %s %s\n" % (_widgetName, strftime(_time_format)) )
pipe.close()
sleep(1)