summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorepoch <epoch@hacking.allowed.org>2018-03-29 18:20:49 -0500
committerepoch <epoch@hacking.allowed.org>2018-03-29 18:20:49 -0500
commit52dd0d6fd34e3ad8bef1cd9e613c71f28c48c33a (patch)
treefa58f2fb8bcdf276630146f5ffdb963083201c29
parent114f10e727bd9fa75d0810cc593ba620d769a03f (diff)
downloadhackvr-52dd0d6fd34e3ad8bef1cd9e613c71f28c48c33a.tar.gz
hackvr-52dd0d6fd34e3ad8bef1cd9e613c71f28c48c33a.zip
moved filebrowser stuff to examples dir
-rwxr-xr-xexamples/filebrowser/action_to_target.sh (renamed from filebrowser/action_to_target.sh)0
-rwxr-xr-xexamples/filebrowser/backend-filebrowser.sh (renamed from filebrowser/backend-filebrowser.sh)0
-rwxr-xr-xexamples/filebrowser/backend-gopher.sh (renamed from filebrowser/backend-gopher.sh)0
-rwxr-xr-xexamples/filebrowser/backend-ps.sh12
-rw-r--r--examples/filebrowser/camera.pos (renamed from filebrowser/camera.pos)0
-rwxr-xr-xexamples/filebrowser/frontend-hackvr.sh (renamed from filebrowser/frontend-hackvr.sh)4
-rwxr-xr-xexamples/filebrowser/frontend-zenity.sh (renamed from filebrowser/frontend-zenity.sh)4
-rwxr-xr-xexamples/filebrowser/list_to_cubes.sh (renamed from filebrowser/list_to_cubes.sh)0
-rwxr-xr-xexamples/filebrowser/run (renamed from filebrowser/run)0
9 files changed, 20 insertions, 0 deletions
diff --git a/filebrowser/action_to_target.sh b/examples/filebrowser/action_to_target.sh
index 2abbe58..2abbe58 100755
--- a/filebrowser/action_to_target.sh
+++ b/examples/filebrowser/action_to_target.sh
diff --git a/filebrowser/backend-filebrowser.sh b/examples/filebrowser/backend-filebrowser.sh
index 789b601..789b601 100755
--- a/filebrowser/backend-filebrowser.sh
+++ b/examples/filebrowser/backend-filebrowser.sh
diff --git a/filebrowser/backend-gopher.sh b/examples/filebrowser/backend-gopher.sh
index e606667..e606667 100755
--- a/filebrowser/backend-gopher.sh
+++ b/examples/filebrowser/backend-gopher.sh
diff --git a/examples/filebrowser/backend-ps.sh b/examples/filebrowser/backend-ps.sh
new file mode 100755
index 0000000..b06ff99
--- /dev/null
+++ b/examples/filebrowser/backend-ps.sh
@@ -0,0 +1,12 @@
+#!/bin/bash
+#give a list of files.
+#wait for a selection on stdin
+#cd or start that file
+#repeat.
+while true;do
+#not sure why this needs to be printed to show up every time.
+ ps | tail -n+2
+ read -r selection
+ echo $selection
+ echo
+done
diff --git a/filebrowser/camera.pos b/examples/filebrowser/camera.pos
index 718923c..718923c 100644
--- a/filebrowser/camera.pos
+++ b/examples/filebrowser/camera.pos
diff --git a/filebrowser/frontend-hackvr.sh b/examples/filebrowser/frontend-hackvr.sh
index 6a26af0..2b262a9 100755
--- a/filebrowser/frontend-hackvr.sh
+++ b/examples/filebrowser/frontend-hackvr.sh
@@ -1,2 +1,6 @@
#!/bin/bash
+if [ "_$1" = "_" ];then
+ echo "I need an argument for what my backend is." >&2
+ exit 1
+fi
cat camera.pos <(stdbuf -oL $1 < p | ./list_to_cubes.sh) | hackvr USER | ./action_to_target.sh > p
diff --git a/filebrowser/frontend-zenity.sh b/examples/filebrowser/frontend-zenity.sh
index acb7cd7..cb1fa9d 100755
--- a/filebrowser/frontend-zenity.sh
+++ b/examples/filebrowser/frontend-zenity.sh
@@ -1,2 +1,6 @@
#!/bin/bash
+if [ "_$1" = "_" ];then
+ echo "I need a backend script passed as first argument." >&2
+ exit 1
+fi
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/list_to_cubes.sh b/examples/filebrowser/list_to_cubes.sh
index 2cdbe92..2cdbe92 100755
--- a/filebrowser/list_to_cubes.sh
+++ b/examples/filebrowser/list_to_cubes.sh
diff --git a/filebrowser/run b/examples/filebrowser/run
index c3bc1d3..c3bc1d3 100755
--- a/filebrowser/run
+++ b/examples/filebrowser/run