tabbed.sh (663B)
1 #!/bin/bash 2 3 prompt="tabbed dir:" 4 5 # exclude git repos which have lots of sub-dirs, 6 # .cache which has a ton of firefox crap 7 # .local because I never really go there and lots 8 # of crap there too, and finally .firefox. 9 10 directory=$(find ~ -type d \ 11 ! -path '*/.local/*' \ 12 ! -path '*/.cache/*' \ 13 ! -path '*/.firefox/*' \ 14 ! -path '*/.mozilla/*' \ 15 ! -path '*/.git/*' \ 16 | dmenu -p "$prompt" ) 17 18 # Check if a directory was selected 19 if [ -z "$directory" ]; then 20 echo "No directory selected." 21 exit 1 22 fi 23 24 # Check if the directory exists 25 if [ ! -d "$directory" ]; then 26 echo "Directory not found!" 27 exit 1 28 fi 29 30 cd "$directory" 31 32 tabbed -r 2 st -w ''