File: clock

package info (click to toggle)
py3status 3.63-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,456 kB
  • sloc: python: 20,758; makefile: 9; sh: 5
file content (13 lines) | stat: -rwxr-xr-x 257 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
#!/bin/sh

CONF_FILE=/tmp/config

echo 'order += "clock"' > $CONF_FILE

export LC_TIME=C
output=$(timeout 1 py3status --standalone --config $CONF_FILE)

# Fri Sep 19 09:17:00 2025
echo $output | grep -qP '([A-Z][a-z]{2,} ){2,}\d\d? \d\d:\d\d:\d\d \d{4,}'