From 41ab840ce392aa951bbd86f3ae902523296b3819 Mon Sep 17 00:00:00 2001 From: epoch Date: Tue, 11 Feb 2020 23:22:10 -0600 Subject: added another example of a clock that uses nonblocktail --- share/hackvr/examples/clock/set_clock.sh | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100755 share/hackvr/examples/clock/set_clock.sh (limited to 'share/hackvr/examples/clock/set_clock.sh') diff --git a/share/hackvr/examples/clock/set_clock.sh b/share/hackvr/examples/clock/set_clock.sh new file mode 100755 index 0000000..14abeaf --- /dev/null +++ b/share/hackvr/examples/clock/set_clock.sh @@ -0,0 +1,7 @@ +#!/usr/bin/env bash +hour=$(date +%H | sed 's/^0//') +minute=$(date +%M | sed 's/^0//') +second=$(date +%S | sed 's/^0//') +printf "_clock_face_hand_hour_ rotate 0 0 -%s\n" "$[hour * 30]" +printf "_clock_face_hand_minute_ rotate 0 0 -%s\n" "$[minute * 6]" +printf "_clock_face_hand_second_ rotate 0 0 -%s\n" "$[second * 6]" -- cgit v1.2.3