From 6492ba6b4107a4da228e18db4fc5fc871bfb0579 Mon Sep 17 00:00:00 2001 From: epoch Date: Wed, 17 Aug 2022 21:34:02 -0500 Subject: updated README to show that everything that got deleted went to an -extras repo. also, hackvr script updated to be better bash --- share/hackvr/examples/clock/Makefile | 11 ----- share/hackvr/examples/clock/generate.py | 10 ----- share/hackvr/examples/clock/hackvr-clock | 72 -------------------------------- share/hackvr/examples/clock/run.pre | 24 ----------- share/hackvr/examples/clock/set_clock.sh | 10 ----- 5 files changed, 127 deletions(-) delete mode 100644 share/hackvr/examples/clock/Makefile delete mode 100755 share/hackvr/examples/clock/generate.py delete mode 100755 share/hackvr/examples/clock/hackvr-clock delete mode 100755 share/hackvr/examples/clock/run.pre delete mode 100755 share/hackvr/examples/clock/set_clock.sh (limited to 'share/hackvr/examples/clock') diff --git a/share/hackvr/examples/clock/Makefile b/share/hackvr/examples/clock/Makefile deleted file mode 100644 index ea7944a..0000000 --- a/share/hackvr/examples/clock/Makefile +++ /dev/null @@ -1,11 +0,0 @@ -PREFIX:=/usr/local - -.PHONY: all install - -hackvr-clock: run.pre generate.py - ./generate.py | cat run.pre /dev/stdin > hackvr-clock - chmod +x hackvr-clock -all: hackvr-clock - -install: all - install -t $(PREFIX)/bin hackvr-clock diff --git a/share/hackvr/examples/clock/generate.py b/share/hackvr/examples/clock/generate.py deleted file mode 100755 index f3db105..0000000 --- a/share/hackvr/examples/clock/generate.py +++ /dev/null @@ -1,10 +0,0 @@ -#!/usr/bin/env python3 -import math - -for i in range(1,13): - x=math.floor(math.sin(math.pi / 6 * i) * 1000) / 100 - y=math.floor(math.cos(math.pi / 6 * i) * 1000) / 100 - print("_clock_face_digit_{}_ addshape 2 4 {} {} 0 {} {} 0 {} {} 0 {} {} 0".format(i,x-1,y-1,x+1,y-1,x+1,y+1,x-1,y+1)) - print("_clock_face_hand_hour_ addshape 2 3 -1 -1 0 0 5 0 1 -1 0") - print("_clock_face_hand_minute_ addshape 2 3 -.75 -.75 0 0 8 0 .75 -.75 0") - print("_clock_face_hand_second_ addshape 2 3 -.25 -.25 0 0 10 0 .25 -.25 0") diff --git a/share/hackvr/examples/clock/hackvr-clock b/share/hackvr/examples/clock/hackvr-clock deleted file mode 100755 index 95ba948..0000000 --- a/share/hackvr/examples/clock/hackvr-clock +++ /dev/null @@ -1,72 +0,0 @@ -#!/usr/bin/env bash -if [ "$1" = "init" ];then - grep -A1000 '^___CUT___' "$0" | tail -n+2 - exit -elif [ "$1" = "set" ];then - 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 + ($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]" - #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]" -else - nonblocktail \ - <(echo $USER move 0 0 -30) \ - <("$0" init) \ - <(while true;do "$0" set;sleep 1;done) \ - /dev/stdin 2>/dev/null \ - | hackvr 2>/dev/null -fi -exit 0 -___CUT___ -_clock_face_digit_1_ addshape 2 4 3.99 7.66 0 5.99 7.66 0 5.99 9.66 0 3.99 9.66 0 -_clock_face_hand_hour_ addshape 2 3 -1 -1 0 0 5 0 1 -1 0 -_clock_face_hand_minute_ addshape 2 3 -.75 -.75 0 0 8 0 .75 -.75 0 -_clock_face_hand_second_ addshape 2 3 -.25 -.25 0 0 10 0 .25 -.25 0 -_clock_face_digit_2_ addshape 2 4 7.66 4.0 0 9.66 4.0 0 9.66 6.0 0 7.66 6.0 0 -_clock_face_hand_hour_ addshape 2 3 -1 -1 0 0 5 0 1 -1 0 -_clock_face_hand_minute_ addshape 2 3 -.75 -.75 0 0 8 0 .75 -.75 0 -_clock_face_hand_second_ addshape 2 3 -.25 -.25 0 0 10 0 .25 -.25 0 -_clock_face_digit_3_ addshape 2 4 9.0 -1.0 0 11.0 -1.0 0 11.0 1.0 0 9.0 1.0 0 -_clock_face_hand_hour_ addshape 2 3 -1 -1 0 0 5 0 1 -1 0 -_clock_face_hand_minute_ addshape 2 3 -.75 -.75 0 0 8 0 .75 -.75 0 -_clock_face_hand_second_ addshape 2 3 -.25 -.25 0 0 10 0 .25 -.25 0 -_clock_face_digit_4_ addshape 2 4 7.66 -6.0 0 9.66 -6.0 0 9.66 -4.0 0 7.66 -4.0 0 -_clock_face_hand_hour_ addshape 2 3 -1 -1 0 0 5 0 1 -1 0 -_clock_face_hand_minute_ addshape 2 3 -.75 -.75 0 0 8 0 .75 -.75 0 -_clock_face_hand_second_ addshape 2 3 -.25 -.25 0 0 10 0 .25 -.25 0 -_clock_face_digit_5_ addshape 2 4 4.0 -9.67 0 6.0 -9.67 0 6.0 -7.67 0 4.0 -7.67 0 -_clock_face_hand_hour_ addshape 2 3 -1 -1 0 0 5 0 1 -1 0 -_clock_face_hand_minute_ addshape 2 3 -.75 -.75 0 0 8 0 .75 -.75 0 -_clock_face_hand_second_ addshape 2 3 -.25 -.25 0 0 10 0 .25 -.25 0 -_clock_face_digit_6_ addshape 2 4 -1.0 -11.0 0 1.0 -11.0 0 1.0 -9.0 0 -1.0 -9.0 0 -_clock_face_hand_hour_ addshape 2 3 -1 -1 0 0 5 0 1 -1 0 -_clock_face_hand_minute_ addshape 2 3 -.75 -.75 0 0 8 0 .75 -.75 0 -_clock_face_hand_second_ addshape 2 3 -.25 -.25 0 0 10 0 .25 -.25 0 -_clock_face_digit_7_ addshape 2 4 -6.0 -9.67 0 -4.0 -9.67 0 -4.0 -7.67 0 -6.0 -7.67 0 -_clock_face_hand_hour_ addshape 2 3 -1 -1 0 0 5 0 1 -1 0 -_clock_face_hand_minute_ addshape 2 3 -.75 -.75 0 0 8 0 .75 -.75 0 -_clock_face_hand_second_ addshape 2 3 -.25 -.25 0 0 10 0 .25 -.25 0 -_clock_face_digit_8_ addshape 2 4 -9.67 -6.01 0 -7.67 -6.01 0 -7.67 -4.01 0 -9.67 -4.01 0 -_clock_face_hand_hour_ addshape 2 3 -1 -1 0 0 5 0 1 -1 0 -_clock_face_hand_minute_ addshape 2 3 -.75 -.75 0 0 8 0 .75 -.75 0 -_clock_face_hand_second_ addshape 2 3 -.25 -.25 0 0 10 0 .25 -.25 0 -_clock_face_digit_9_ addshape 2 4 -11.0 -1.01 0 -9.0 -1.01 0 -9.0 0.99 0 -11.0 0.99 0 -_clock_face_hand_hour_ addshape 2 3 -1 -1 0 0 5 0 1 -1 0 -_clock_face_hand_minute_ addshape 2 3 -.75 -.75 0 0 8 0 .75 -.75 0 -_clock_face_hand_second_ addshape 2 3 -.25 -.25 0 0 10 0 .25 -.25 0 -_clock_face_digit_10_ addshape 2 4 -9.67 3.99 0 -7.67 3.99 0 -7.67 5.99 0 -9.67 5.99 0 -_clock_face_hand_hour_ addshape 2 3 -1 -1 0 0 5 0 1 -1 0 -_clock_face_hand_minute_ addshape 2 3 -.75 -.75 0 0 8 0 .75 -.75 0 -_clock_face_hand_second_ addshape 2 3 -.25 -.25 0 0 10 0 .25 -.25 0 -_clock_face_digit_11_ addshape 2 4 -6.01 7.66 0 -4.01 7.66 0 -4.01 9.66 0 -6.01 9.66 0 -_clock_face_hand_hour_ addshape 2 3 -1 -1 0 0 5 0 1 -1 0 -_clock_face_hand_minute_ addshape 2 3 -.75 -.75 0 0 8 0 .75 -.75 0 -_clock_face_hand_second_ addshape 2 3 -.25 -.25 0 0 10 0 .25 -.25 0 -_clock_face_digit_12_ addshape 2 4 -1.01 9.0 0 0.99 9.0 0 0.99 11.0 0 -1.01 11.0 0 -_clock_face_hand_hour_ addshape 2 3 -1 -1 0 0 5 0 1 -1 0 -_clock_face_hand_minute_ addshape 2 3 -.75 -.75 0 0 8 0 .75 -.75 0 -_clock_face_hand_second_ addshape 2 3 -.25 -.25 0 0 10 0 .25 -.25 0 diff --git a/share/hackvr/examples/clock/run.pre b/share/hackvr/examples/clock/run.pre deleted file mode 100755 index ed0e68b..0000000 --- a/share/hackvr/examples/clock/run.pre +++ /dev/null @@ -1,24 +0,0 @@ -#!/usr/bin/env bash -if [ "$1" = "init" ];then - grep -A1000 '^___CUT___' "$0" | tail -n+2 - exit -elif [ "$1" = "set" ];then - 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 + ($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]" - #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]" -else - nonblocktail \ - <(echo $USER move 0 0 -30) \ - <("$0" init) \ - <(while true;do "$0" set;sleep 1;done) \ - /dev/stdin 2>/dev/null \ - | hackvr 2>/dev/null -fi -exit 0 -___CUT___ diff --git a/share/hackvr/examples/clock/set_clock.sh b/share/hackvr/examples/clock/set_clock.sh deleted file mode 100755 index 36c3fb4..0000000 --- a/share/hackvr/examples/clock/set_clock.sh +++ /dev/null @@ -1,10 +0,0 @@ -#!/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 + ($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]" -#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]" -- cgit v1.2.3