From b4dddad64122649d9da6340032275d1756930e74 Mon Sep 17 00:00:00 2001 From: epoch Date: Fri, 9 Dec 2016 15:54:33 -0600 Subject: LOTS OF SHIT --- filebrowser/backend-filebrowser.sh | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100755 filebrowser/backend-filebrowser.sh (limited to 'filebrowser/backend-filebrowser.sh') diff --git a/filebrowser/backend-filebrowser.sh b/filebrowser/backend-filebrowser.sh new file mode 100755 index 0000000..9cbf11a --- /dev/null +++ b/filebrowser/backend-filebrowser.sh @@ -0,0 +1,19 @@ +#!/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. + echo .. + echo .. + find . -maxdepth 1 #| tr ' ' '\n' #wut? no? + read -r selection + if [ -f "$selection" ];then + xdg-open "$selection" #good enough? + fi + if [ -d "$selection" ];then + cd "$selection" + fi + echo +done -- cgit v1.2.3