cosmic/bin/projects

19 lines
545 B
Bash
Executable File

#!/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