summary refs log tree commit diff
path: root/home/.local/bin/clock
blob: ef8cd6d8f8b3d14837a662c18c3651e641e217a7 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#!/bin/sh
set -eu

tput civis
sleep=$(( 60 - $(date +'%S' | sed 's/^0//') ))
while :; do
	if [ $(apm -a) -eq 1 ]; then
		printf '%3s%%' "$(apm -l)"
	else
		test $(apm -b) -eq 2 && tput setaf 1 bold
		printf '%3.3sm' "$(apm -m)"
		tput sgr0
	fi
	printf ' %s\r' "$(date +'%a %H:%M')"
	sleep $sleep
	sleep=60
done
f='/src/commit/bin/1sh/histedit.c?id=5d1059241f9ba7a0be0852dc98a307b9fa560c47&follow=1'>Remove reference to FreeBSD-specific libedit hackJune McEnroe 2020-06-08Prefix mandoc with exec in about-filterJune McEnroe 2020-06-07Remove mktemp options from mkbuiltins, mktokensJune McEnroe 2020-06-07Cast z_stream fields to size_tJune McEnroe 2020-06-07Call static_assert by _Static_assertJune McEnroe 2020-06-07Add OpenBSD to install.shJune McEnroe 2020-06-03Add The Song of AchillesJune McEnroe 2020-06-01Allow redirecting input in everJune McEnroe 2020-05-31Add %c conversion to c scriptJune McEnroe 2020-05-31Add c script to READMEJune McEnroe 2020-05-31Add c scriptJune McEnroe 2020-05-31Update mdoc source URLsJune McEnroe 2020-05-26Remove unfinished PSF fontsJune McEnroe