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:
2026-01-24 08:10:36 +00:00
parent 82039b35cd
commit 85074ee154
2 changed files with 24 additions and 2 deletions

View File

@@ -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
Want to help improve this project?

View File

@@ -123,18 +123,20 @@ ps1_on() {
# Status colors
local OK="\[\e[38;5;76m\]"
local BAD="\[\e[38;5;203m\]"
local BOLD="\[\e[1m\]"
local NOBOLD="\[\e[22m\]"
# Separators w/ fallback (NF vs non-NF)
local SEP_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 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="\
${FRAME}╭─${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} "
}