irongit

a bin full of cool programs

hygobin/bin/prompt_themes
27 lines925 B
1#!/bin/bash
2
3# Check if an argument (theme name) is provided
4if [[ -n $1 ]]; then
5 case "$1" in
6 "default")
7 echo '\e[0;38;5;166m\u\e[0m@\e[4;38;5;231m\h\e[0m \e[6;38;5;14m\w\e[0m $(git_branch_str)\e[0m\n🚀 '
8 ;;
9 "infomax")
10 echo '\e[0;38;5;166m\u\e[0m@\e[4;38;5;231m\h\e[0m \e[0;38;5;51m🕗 \d \t\n\e[0;38;5;51m$(random_quote)\n\e[6;38;5;14m\w\e[0m $(git_branch_str) $ \e[0m'
11 ;;
12 "minimal")
13 echo '\e[1;33m\u\e[0m:\e[1;36m\w\e[0m $ '
14 ;;
15 "colorful")
16 echo '\e[1;31m\u\e[0m@\e[1;34m\h\e[0m:\e[1;36m\w\e[0m $(random_quote) 🌟 '
17 ;;
18 *)
19 echo "Error: Unknown theme '$1'. Available themes: default, minimal, colorful."
20 exit 1
21 ;;
22 esac
23else
24 echo "Usage: prompt_themes [theme_name]"
25 echo "Available themes: default, minimal, colorful."
26 exit 1
27fi