summaryrefslogtreecommitdiff
path: root/share/hackvr/examples/clock
diff options
context:
space:
mode:
authorepoch <epoch@hacking.allowed.org>2020-02-13 16:42:08 -0600
committerepoch <epoch@hacking.allowed.org>2020-02-13 16:42:08 -0600
commit78dc60ef3859a70582c8def1fc33c003997da9b7 (patch)
treef658eecd794752b38ba5c17baa2071bbee5dd50d /share/hackvr/examples/clock
parent1a72f02d3633216d7eac41ba4b6308e69fcb6873 (diff)
downloadhackvr-78dc60ef3859a70582c8def1fc33c003997da9b7.tar.gz
hackvr-78dc60ef3859a70582c8def1fc33c003997da9b7.zip
the hour hand placement is now based on minutes too
Diffstat (limited to 'share/hackvr/examples/clock')
-rwxr-xr-xshare/hackvr/examples/clock/set_clock.sh6
1 files changed, 3 insertions, 3 deletions
diff --git a/share/hackvr/examples/clock/set_clock.sh b/share/hackvr/examples/clock/set_clock.sh
index 14abeaf..45db14c 100755
--- a/share/hackvr/examples/clock/set_clock.sh
+++ b/share/hackvr/examples/clock/set_clock.sh
@@ -2,6 +2,6 @@
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]"
+printf "_clock_face_hand_hour_ rotate 0 0 -%s\n" "$[$hour * 30 + ($minute / 2)]"
+printf "_clock_face_hand_minute_ rotate 0 0 -%s\n" "$[$minute * 6]"
+printf "_clock_face_hand_second_ rotate 0 0 -%s\n" "$[$second * 6]"