summaryrefslogtreecommitdiff
path: root/filebrowser
diff options
context:
space:
mode:
Diffstat (limited to 'filebrowser')
-rwxr-xr-xfilebrowser/backend-filebrowser.sh (renamed from filebrowser/filebrow.sh)7
-rwxr-xr-xfilebrowser/backend-gopher.sh14
-rwxr-xr-xfilebrowser/frontend-hackvr.sh2
-rwxr-xr-xfilebrowser/frontend-zenity.sh2
-rwxr-xr-xfilebrowser/hackvr-frontend.sh2
-rwxr-xr-xfilebrowser/list_to_cubes.sh9
-rwxr-xr-xfilebrowser/zenity-frontend.sh2
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