From 83e567a28cfa5d8bc987a58728757b8dbb2a5010 Mon Sep 17 00:00:00 2001 From: Jonas Gunz Date: Fri, 29 Mar 2019 18:29:02 +0100 Subject: Added hostname and PWD --- templte.bashrc | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/templte.bashrc b/templte.bashrc index 29efe3f..28b6e8d 100644 --- a/templte.bashrc +++ b/templte.bashrc @@ -33,6 +33,11 @@ RIGHT_PRONPT() printf "%*s" 240 "$(tput setaf 199)$(tput bold)$(CPU_USAGE)$(tput sgr0) $(tput setaf 2)$(DISK_USAGE) $(tput setaf 123)[TENKI:$(GET_WEATHER)]$(tput sgr0)" } +GET_PWD() +{ + echo ${PWD##*/} +} + export PS1='$(free_mem) prompt > ' GREEN="\[$(tput setaf 2)\]" PINK="\[$(tput setaf 199)\]" @@ -48,4 +53,6 @@ STIM="\[$(tput sitm)\]" # 斜線開始 RTIM="\[$(tput ritm)\]" # 斜線終了 BCC_T="\[$(tput setb 7)\]" WHOAMI="⚡ " -export PS1="\[\$(tput sc; RIGHT_PRONPT; tput rc)\]$WHOAMI${BCC_T}${BOLD}${YELLOW}@${RESET} ${STIM}${CYAN}[\$(FREE_MEM)]${RESET}${RTIM} ${ULINE}${ORANGE}192.168.15.19${RESET}${EULINE} ${BOLD}${BLUE}=>${RESET}" +HST="$(hostname)" + +export PS1="\[\$(tput sc; RIGHT_PRONPT; tput rc)\]$WHOAMI${BCC_T}${BOLD}${YELLOW}@${RESET} ${STIM}${CYAN}[\$(FREE_MEM)]${RESET}${RTIM} ${ULINE}${ORANGE}${HST}${RESET}${EULINE} \$(GET_PWD) ${BOLD}${BLUE}=>${RESET}" -- cgit v1.2.3