init-screen.sh (1174B)
1 #!/bin/bash 2 3 # this is a shell script that takes in a given directory and lays out 4 # a basic setup I use for doing school work. This setup has a tmux session on 5 # the right, qute in the middle, and a basic terminal emulator on the left. 6 7 prompt="init dir:" 8 9 # exclude git repos which have lots of sub-dirs, 10 # .cache which has a ton of firefox crap 11 # .local because I never really go there and lots 12 # of crap there too, and finally .firefox. 13 14 dmenu_cmd="dmenu -p \"$prompt\"" 15 16 directory=$(find ~ -type d \ 17 ! -path '*/.local/*' \ 18 ! -path '*/.cache/*' \ 19 ! -path '*/.firefox/*' \ 20 ! -path '*/.mozilla/*' \ 21 ! -path '*/.git/*' \ 22 | eval $dmenu_cmd) 23 24 # Check if a directory was selected 25 if [ -z "$directory" ]; then 26 echo "No directory selected." 27 exit 1 28 fi 29 30 # Check if the directory exists 31 if [ ! -d "$directory" ]; then 32 echo "Directory not found!" 33 exit 1 34 fi 35 36 librewolf 37 #qutebrowser --target window & 38 39 cd "$directory" 40 st & 41 42 # wait long enough for browser to load in 43 sleep 1.25s 44 dirWO=$(echo $directory | sed "s/\// /g"| cut -c 2- | awk '{print $NF}') 45 # st -e abduco -A "$dirWO" dvtm 46 st -e tmux new-session -A -s $dirWO & 47 sleep .2s 48 # emacsclient -c & 49 st &