Closed dgtlife closed 1 year ago
Can you post a screenshot with the new (and old) behaviours?
I can do that later today.
Here are some window shots to illustrate this "raw" prompt option.
Following is a window shot of the default Trueline prompt, i.e. nothing in .bashrc
Following is a window shot of the Trueline prompt adding the newline segment enabled with following lines in .bashrc:
declare -a TRUELINE_SEGMENTS=(
'user,black,white,bold'
'working_dir,mono,black,normal'
'newline,black,light_blue,bold'
)
Following is a window shot of the Trueline prompt with the newline segment using default_fg and default_bg with the following lines in .bashrc:
declare -a TRUELINE_SEGMENTS=(
'user,black,white,bold'
'working_dir,mono,black,normal'
'newline,default_fg,default_bg,bold'
)
Following is a window shot of the Trueline prompt with the newline segment using default_fg and default_bg and enabling the TRUELINE_NEWLINE_PROMPT_WITHOUT_SEGMENT option with the following lines in .bashrc:
declare -a TRUELINE_SEGMENTS=(
'user,black,white,bold'
'working_dir,mono,black,normal'
'newline,default_fg,default_bg,bold'
)
TRUELINE_NEWLINE_PROMPT_WITHOUT_SEGMENT=true
Using:
declare -a TRUELINE_SEGMENTS=(
'user,black,white,bold'
'working_dir,mono,black,normal'
'newline,default_fg,black,bold'
)
I get:
which keeps the separator but hides it by using the same color as the default background. Isn't this good enough? I want to avoid adding more options/configs unless it's strictly necessary
This tactic does not produce the results I want, and have achieved through my modification. I want to remove segments from the second line in order to reclaim maximum space for commands, which can sometimes be long.
Your suggestion requires the black color to be exactly the same as the terminal background. This is an unnecessary constraint. What if I want 95% transparency on the terminal background. What if I want a terminal theme with a slightly lighter background.
Anyway, I think the most significant portion of your response is this:
"Isn't this good enough? I want to avoid adding more options/configs unless it's strictly necessary"
No user preference is ever "strictly necessary", and "good enough" means settling for your preferences. The more options you provide, the more user preferences you can support, and the more people can, and will, use Trueline.
Ok. Let's add this but simplify it in a single conditional (no else branch), rename it to TREUELINE_SHOW_TRAILING_SEPARATOR=true
and add default configs and a readme entry.
OK, my last commit should be mutually acceptable.
Closing due to inactivity
I use the newline option, and prefer a "raw" prompt on the second line as opposed to one wrapped in a segment with non-default background and segment separator. Perhaps there may be others who have this preference.
In order to enable this choice I added a TRUELINE_NEWLINE_PROMPT_WITHOUT_SEGMENT option and the logic to process the choices. If the option is "true", then the segment separator is removed and the user can enable the "newline" prompt segment with default_bg and default_fg in order to get the raw prompt on the default terminal background. If the option is false, then the "newline" segment operates as it does now with a segment-enclosed prompt character on the second line.