commit 6042eddb00edbaa88124a0e033ad02c891c65d61 parent 992d173aabdb9ea57b6c09802c00e5808e04709f Author: AndrewLockVI <andrew@laack.co> Date: Tue, 18 Feb 2025 11:50:20 -0600 Updated scripts Diffstat:
| A | dvtm.sh | | | 35 | +++++++++++++++++++++++++++++++++++ |
1 file changed, 35 insertions(+), 0 deletions(-)
diff --git a/dvtm.sh b/dvtm.sh @@ -0,0 +1,35 @@ +#!/bin/bash + +background=$1 +foreground=$2 +highlight=$3 +prompt="Select a directory to start tabbed in:" + +# exclude git repos which have lots of sub-dirs, +# .cache which has a ton of firefox crap +# .local because I never really go there and lots +# of crap there too, and finally .firefox. + +directory=$(find ~ -type d \ + ! -path '*/.local/*' \ + ! -path '*/.cache/*' \ + ! -path '*/.firefox/*' \ + ! -path '*/.mozilla/*' \ + ! -path '*/.git/*' \ + | dmenu -i -p "$prompt" -nb "$background" -nf "$foreground" -sb "$highlight" -sf "$foreground") + +# Check if a directory was selected +if [ -z "$directory" ]; then + echo "No directory selected." + exit 1 +fi + +# Check if the directory exists +if [ ! -d "$directory" ]; then + echo "Directory not found!" + exit 1 +fi + +cd "$directory" + +st -e dvtm