diff options
-rwxr-xr-x | examples/filebrowser/action_to_target.sh (renamed from filebrowser/action_to_target.sh) | 0 | ||||
-rwxr-xr-x | examples/filebrowser/backend-filebrowser.sh (renamed from filebrowser/backend-filebrowser.sh) | 0 | ||||
-rwxr-xr-x | examples/filebrowser/backend-gopher.sh (renamed from filebrowser/backend-gopher.sh) | 0 | ||||
-rwxr-xr-x | examples/filebrowser/backend-ps.sh | 12 | ||||
-rw-r--r-- | examples/filebrowser/camera.pos (renamed from filebrowser/camera.pos) | 0 | ||||
-rwxr-xr-x | examples/filebrowser/frontend-hackvr.sh (renamed from filebrowser/frontend-hackvr.sh) | 4 | ||||
-rwxr-xr-x | examples/filebrowser/frontend-zenity.sh (renamed from filebrowser/frontend-zenity.sh) | 4 | ||||
-rwxr-xr-x | examples/filebrowser/list_to_cubes.sh (renamed from filebrowser/list_to_cubes.sh) | 0 | ||||
-rwxr-xr-x | examples/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 |