projects bin added

This commit is contained in:
James Tomasino 2022-10-03 15:32:34 +00:00
parent 86da408781
commit 136e58a8a9
1 changed files with 18 additions and 0 deletions

18
bin/projects Executable file
View File

@ -0,0 +1,18 @@
#!/bin/bash
# projects inspried by "spotlight" by gtlsgamr on tilde.team
project_path="/home/*/.project"
blue="$(tput setaf 12)"
reset_color="$(tput sgr0)"
{
for i in $project_path; do
if [ -f "$i" ]; then
username="$(basename "$(dirname "$i")")"
printf "%s---------------------------------%s\n" "$blue" "$reset_color"
printf "%s- %s%s\n" "$blue" "$username" "$reset_color"
printf "%s---------------------------------%s\n" "$blue" "$reset_color"
fold -w 80 -s "$i"
printf "\n\n"
fi
done
} | more