17 lines
377 B
Python
Executable file
17 lines
377 B
Python
Executable file
#!/usr/bin/env python3
|
|
|
|
import json
|
|
import subprocess
|
|
import sys
|
|
|
|
cmd = ['date', "+%H:%M"]
|
|
result = subprocess.run(cmd, capture_output=True, text=True)
|
|
|
|
time = result.stdout.strip('\n')
|
|
|
|
cmd = ['date', "+%a, %d.%m.%Y"]
|
|
result = subprocess.run(cmd, capture_output=True, text=True)
|
|
date = result.stdout.strip('\n')
|
|
|
|
sys.stdout.write(json.dumps({'text': time, 'tooltip': date}))
|
|
|