diff options
author | epoch <epoch@hacking.allowed.org> | 2016-12-09 15:54:33 -0600 |
---|---|---|
committer | epoch <epoch@hacking.allowed.org> | 2016-12-09 15:54:33 -0600 |
commit | b4dddad64122649d9da6340032275d1756930e74 (patch) | |
tree | afcfff52545fce1c7713f24e7a28904230fa8671 /filebrowser | |
parent | fa1b447ef684e5eadda27d8870de6a6e09292a18 (diff) | |
download | hackvr-b4dddad64122649d9da6340032275d1756930e74.tar.gz hackvr-b4dddad64122649d9da6340032275d1756930e74.zip |
LOTS OF SHIT
Diffstat (limited to 'filebrowser')
-rwxr-xr-x | filebrowser/backend-filebrowser.sh (renamed from filebrowser/filebrow.sh) | 7 | ||||
-rwxr-xr-x | filebrowser/backend-gopher.sh | 14 | ||||
-rwxr-xr-x | filebrowser/frontend-hackvr.sh | 2 | ||||
-rwxr-xr-x | filebrowser/frontend-zenity.sh | 2 | ||||
-rwxr-xr-x | filebrowser/hackvr-frontend.sh | 2 | ||||
-rwxr-xr-x | filebrowser/list_to_cubes.sh | 9 | ||||
-rwxr-xr-x | filebrowser/zenity-frontend.sh | 2 |
7 files changed, 32 insertions, 6 deletions
diff --git a/filebrowser/filebrow.sh b/filebrowser/backend-filebrowser.sh index ef6911a..9cbf11a 100755 --- a/filebrowser/filebrow.sh +++ b/filebrowser/backend-filebrowser.sh @@ -4,8 +4,10 @@ #cd or start that file #repeat. while true;do - echo - echo .* * | tr ' ' '\n' +#not sure why this needs to be printed to show up every time. + echo .. + echo .. + find . -maxdepth 1 #| tr ' ' '\n' #wut? no? read -r selection if [ -f "$selection" ];then xdg-open "$selection" #good enough? @@ -13,4 +15,5 @@ while true;do if [ -d "$selection" ];then cd "$selection" fi + echo done diff --git a/filebrowser/backend-gopher.sh b/filebrowser/backend-gopher.sh new file mode 100755 index 0000000..69e1bbe --- /dev/null +++ b/filebrowser/backend-gopher.sh @@ -0,0 +1,14 @@ +#!/bin/bash +#give a list of files. +#wait for a selection on stdin +#cd or start that file +#repeat. +server=192.168.0.2 +port=70 +selection=/ +while true;do +#not sure why this needs to be printed to show up every time. + printf '%s\n' "$selection" | ncat "$server" "$port" + read -r selection + echo +done diff --git a/filebrowser/frontend-hackvr.sh b/filebrowser/frontend-hackvr.sh new file mode 100755 index 0000000..f04e534 --- /dev/null +++ b/filebrowser/frontend-hackvr.sh @@ -0,0 +1,2 @@ +#!/bin/sh +stdbuf -oL $1 < p | ./list_to_cubes.sh | ../hackvr epoch | ./action_to_target.sh > p diff --git a/filebrowser/frontend-zenity.sh b/filebrowser/frontend-zenity.sh new file mode 100755 index 0000000..acb7cd7 --- /dev/null +++ b/filebrowser/frontend-zenity.sh @@ -0,0 +1,2 @@ +#!/bin/bash +stdbuf -oL $1 < p | stdbuf -oL tr '\n' ' ' | sed -u 's/$/_/' | stdbuf -oL tr '_' '\n' | xargs -L1 zenity --list --column file > p diff --git a/filebrowser/hackvr-frontend.sh b/filebrowser/hackvr-frontend.sh deleted file mode 100755 index 002ba42..0000000 --- a/filebrowser/hackvr-frontend.sh +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/sh -stdbuf -oL ./filebrow.sh < p | ./list_to_cubes.sh | ../hackvr epoch | ./action_to_target.sh > p diff --git a/filebrowser/list_to_cubes.sh b/filebrowser/list_to_cubes.sh index 5de89a6..d4ad688 100755 --- a/filebrowser/list_to_cubes.sh +++ b/filebrowser/list_to_cubes.sh @@ -1,4 +1,13 @@ #!/bin/bash +# blank lines deleteallexcept epoch +# expected input format: +# +# line1 +# line2 +# line3 +# +# line1 +# line2 while read -r line;do if [ "_$line" != '_' ];then # ../tools/obj2hackvr.pl "$line" ../meshes/cube.obj diff --git a/filebrowser/zenity-frontend.sh b/filebrowser/zenity-frontend.sh deleted file mode 100755 index 0ba5efb..0000000 --- a/filebrowser/zenity-frontend.sh +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/sh -cat p | ./filebrow.sh | tr -d '\n' | xargs -L1 zenity --list --column file > p |