aboutsummaryrefslogtreecommitdiffstats
path: root/hyperterm/themes/special.sh
blob: 7ad71f8ecb5b7e50de351c156d7730669b336ae4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
#!/bin/bash
# shellcheck disable=SC1117,SC2034,SC2154

unset special

# Import colors
_colors_bash "$@"

_prompt_local_name() {
    case ${LANG/_*/} in
        es)
            printf "Ubicación Actual:"
            ;;
        *)
            printf "Current Location:"
            ;;
    esac
}

PROMPT_COMMAND='
  last_status=$?
  ps1_status="$(exitstatus "$last_status")"
  ps1_loc="$(_prompt_local_name)"
  ps1_git="$(__prompt_git)"
'

special="\n\
\[$RESET\]\
\[${BOLD}${YELLOW}\][\${ps1_loc}\
\[$RESET\] \[${BOLD}${GREY}\]\w\
\[${BOLD}${YELLOW}\]]\[$RESET\] \
\[${BOLD}${CYAN}\]hist:\!\[$RESET\]\n\
\[${BOLD}${GREY}\]\
\D{%Y-%m-%d}@\D{%I:%M%p}\[$RESET\] \
\${ps1_status}\[$RESET\]\
\${ps1_git}\n\
\[${BOLD}${GREEN}\]$SYMBOL \[$RESET\]"

unset _psi
: "${_psi:=\[${BOLD}${CYAN}\]=>\[$RESET\] }"