Tighten PS1 caps and emphasize prompt arrow
- Bold the prompt arrow for stronger line-break emphasis - Tighten spacing at the right end cap - Document PS1 design rationale and palette
This commit is contained in:
20
README.md
20
README.md
@@ -254,6 +254,26 @@ With exit-status colored arrow and emoji reflecting time of day.
|
|||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
## 🔥 Hvorfor dette er ekte high-end PS1-design
|
||||||
|
|
||||||
|
- Semantisk fargebruk (identitet vs lokasjon)
|
||||||
|
- Få farger, men med mening
|
||||||
|
- Path er synlig, men aldri dominerende
|
||||||
|
- Emoji er aksent, ikke gimmick
|
||||||
|
- Promptlinjen er rolig → kommandoen får fokus
|
||||||
|
|
||||||
|
### 🎨 Fargevalg (forklaring)
|
||||||
|
|
||||||
|
| Rolle | BG | Beskrivelse |
|
||||||
|
| --- | --- | --- |
|
||||||
|
| Sone 1 BG | 61 | grå-blå pastell |
|
||||||
|
| Sone 1 FG | 255 | ren hvit |
|
||||||
|
| Sone 2 BG | 37 | turkis / sval grønn |
|
||||||
|
| Path FG | 194 (FG) | lys grønn, nedtonet |
|
||||||
|
| Ramme | 60 | mørkere blå |
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
## 🛠️ Contribution
|
## 🛠️ Contribution
|
||||||
|
|
||||||
Want to help improve this project?
|
Want to help improve this project?
|
||||||
|
|||||||
@@ -123,18 +123,20 @@ ps1_on() {
|
|||||||
# Status colors
|
# Status colors
|
||||||
local OK="\[\e[38;5;76m\]"
|
local OK="\[\e[38;5;76m\]"
|
||||||
local BAD="\[\e[38;5;203m\]"
|
local BAD="\[\e[38;5;203m\]"
|
||||||
|
local BOLD="\[\e[1m\]"
|
||||||
|
local NOBOLD="\[\e[22m\]"
|
||||||
|
|
||||||
# Separators w/ fallback (NF vs non-NF)
|
# Separators w/ fallback (NF vs non-NF)
|
||||||
local SEP_EXPR='\$( [ "$__PS1_USE_NF" -eq 1 ] && printf "" || printf "▶" )'
|
local SEP_EXPR='\$( [ "$__PS1_USE_NF" -eq 1 ] && printf "" || printf "▶" )'
|
||||||
local LEFT_EXPR='\$( [ "$__PS1_USE_NF" -eq 1 ] && printf "" || printf "[" )'
|
local LEFT_EXPR='\$( [ "$__PS1_USE_NF" -eq 1 ] && printf "" || printf "[" )'
|
||||||
local RIGHT_EXPR='\$( [ "$__PS1_USE_NF" -eq 1 ] && printf "" || printf "]" )'
|
local RIGHT_EXPR='\$( [ "$__PS1_USE_NF" -eq 1 ] && printf "" || printf "]" )'
|
||||||
|
|
||||||
local PROMPT_SYM="\$( [ \$__PS1_STATUS -eq 0 ] && printf '${OK}' || printf '${BAD}' )➜${RST}"
|
local PROMPT_SYM="\$( [ \$__PS1_STATUS -eq 0 ] && printf '${OK}' || printf '${BAD}' )${BOLD}➜${NOBOLD}${RST}"
|
||||||
|
|
||||||
PS1="\
|
PS1="\
|
||||||
${FRAME}╭─${RST}\
|
${FRAME}╭─${RST}\
|
||||||
${Z1_BG}${Z1_FG}${LEFT_EXPR} \d \A \u ${RST}${Z1_BG}${Z2_BG}${Z2_FG}${SEP_EXPR}${RST}\
|
${Z1_BG}${Z1_FG}${LEFT_EXPR} \d \A \u ${RST}${Z1_BG}${Z2_BG}${Z2_FG}${SEP_EXPR}${RST}\
|
||||||
${Z2_BG}${Z2_FG} @\h ${PATH_FG}\${__PS1_PATH} ${RST}${Z2_BG}${Z2_FG}${RIGHT_EXPR}${RST}\
|
${Z2_BG}${Z2_FG} @\h ${PATH_FG}\${__PS1_PATH}${RST}${Z2_BG}${Z2_FG}${RIGHT_EXPR}${RST}\
|
||||||
\n${FRAME}╰── ${RST}${PROMPT_SYM} \${__PS1_SYM} "
|
\n${FRAME}╰── ${RST}${PROMPT_SYM} \${__PS1_SYM} "
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user