Tweaks to zsh
This commit is contained in:
parent
285165913d
commit
89dbb2fccf
3 changed files with 53 additions and 2 deletions
|
|
@ -98,7 +98,7 @@ function prompt_project() {
|
|||
local current_project_name="$(project current)"
|
||||
local background=""
|
||||
if [[ "$parent_process" == "/usr/bin/script" ]]; then
|
||||
segment_content="辶"
|
||||
segment_content=" "
|
||||
fi
|
||||
# If there is a current project
|
||||
if [ -n "$current_project_name" ]; then
|
||||
|
|
@ -157,6 +157,14 @@ prompt_git(){
|
|||
echo "$color"
|
||||
}
|
||||
|
||||
prompt_edinburughairport(){
|
||||
if [ -n "$(find ~/.local/share/airportwait -mmin '+1')" ]; then
|
||||
https https://blip-api.edinburghairport.com/blip-api/blip | jq -r '" " + (.queue | tostring) + " " + (.minutes | tostring)' > ~/.local/share/airportwait
|
||||
fi
|
||||
cat ~/.local/share/airportwait
|
||||
echo "yellow3"
|
||||
}
|
||||
|
||||
prompt_last_exit_code() {
|
||||
local LAST_EXIT_CODE="$1"
|
||||
if [[ $LAST_EXIT_CODE -ne 0 ]]; then
|
||||
|
|
@ -262,6 +270,13 @@ set_prompts(){
|
|||
PROMPT="$PROMPT$(echo "$segment" | sed -n '1p')"
|
||||
background="$(echo "$segment" | sed -n '2p')"
|
||||
fi
|
||||
#
|
||||
# Airport
|
||||
#segment="$(draw_segment "prompt_edinburughairport" "$background")"
|
||||
#if [ -n "$(echo "$segment" | sed -n '1p')" ];then
|
||||
# PROMPT="$PROMPT$(echo "$segment" | sed -n '1p')"
|
||||
# background="$(echo "$segment" | sed -n '2p')"
|
||||
#fi
|
||||
|
||||
PROMPT="$PROMPT $(seperator "$background")$(resetColor)"
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue