I've started the process of redesigning the colours.
This commit is contained in:
@ -80,6 +80,7 @@ set bright_white="$csi$ansi_bright;$ansi_white$ansi_color"
|
||||
# You process true colour by evaluating `__make_color_sequence` on the environment variable.
|
||||
alias __make_color_sequence ${CSHENV_DIR}/bin/__hex_to_ansi
|
||||
|
||||
set sgr_reset="[`__build_sgr_code no-csi reset`m"
|
||||
|
||||
###########################
|
||||
# vim:filetype=tcsh
|
||||
|
@ -3,15 +3,15 @@
|
||||
######################
|
||||
|
||||
|
||||
set date_color="${dim_magenta}"
|
||||
set time_color="${bright_magenta}"
|
||||
set date_color="ansi:5"
|
||||
set time_color="ansi:13"
|
||||
set text_color="${bright_white}"
|
||||
set oldp_color="${dim}"
|
||||
set brace_color="${bright_yellow}"
|
||||
set host_color="${bright_blue}"
|
||||
set name_color="${bright_cyan}"
|
||||
set at_color="${dim_cyan}"
|
||||
set path_color="${bright_green}"
|
||||
set path_color="ansi:10"
|
||||
set line_color="${dim_red}"
|
||||
set prompt_color="${dim}"
|
||||
set depth_color="${dim_yellow}"
|
||||
@ -20,15 +20,12 @@ set command_color="${dim}"
|
||||
set color_start="%{"
|
||||
set color_end="%}"
|
||||
|
||||
set date_color_seq="${color_start}${date_color}${color_end}"
|
||||
set time_color_seq="${color_start}${time_color}${color_end}"
|
||||
set text_color_seq="${color_start}${text_color}${color_end}"
|
||||
set oldp_color_seq="${color_start}${oldp_color}${color_end}"
|
||||
set brace_color_seq="${color_start}${brace_color}${color_end}"
|
||||
set host_color_seq="${color_start}${host_color}${color_end}"
|
||||
set name_color_seq="${color_start}${name_color}${color_end}"
|
||||
set at_color_seq="${color_start}${at_color}${color_end}"
|
||||
set path_color_seq="${color_start}${path_color}${color_end}"
|
||||
set line_color_seq="${color_start}${line_color}${color_end}"
|
||||
set prompt_color_seq="${color_start}${prompt_color}${color_end}"
|
||||
set depth_color_seq="${color_start}${depth_color}${color_end}"
|
||||
|
@ -19,6 +19,7 @@ if( ! $?unknown_tty ) then
|
||||
endif
|
||||
|
||||
|
||||
|
||||
# R G Y B C M
|
||||
set reference_colors=( ${csi}91m ${csi}92m ${csi}93m ${csi}38\;5\;33m ${csi}95m ${csi}96m )
|
||||
|
||||
@ -112,9 +113,8 @@ set prompt_simple="${oldp_color_seq}[%n@%m: %c]%# "
|
||||
set align_prefix="%{${csi}A${csi}1000000G${csi}18D%}"
|
||||
set align_suffix="%{${csi}G${csi}1B%}"
|
||||
#set screen_return="%{8%}"
|
||||
set date_prompt_core="${date_color_seq}%{%Y-%W-%D %}${time_color_seq}%{%P%}"
|
||||
set date_prompt_left="${date_prompt_core}"
|
||||
set date_prompt="${date_prompt_core}"
|
||||
set date_prompt="%{%Y-%W-%D%}"
|
||||
set time_prompt="%{%P%}"
|
||||
#unset edit
|
||||
|
||||
if( $?CSHENV_DEBUG ) then
|
||||
@ -128,7 +128,7 @@ set depth_prompt="${depth_color_seq}(${shlvl})"
|
||||
set line_prompt="${line_color_seq}`tty | sed -e 's;/dev/tty;;' -e 's;/dev/pts/;p/;' -e 's;/dev/;;' -e 's/not a tty/${unknown_tty}/'`"
|
||||
set user_prompt="${name_color_seq}%n"
|
||||
set host_prompt="${host_color_seq}${CSHENV_HOSTNAME}"
|
||||
set path_prompt="${path_color_seq}%c02"
|
||||
set path_prompt="%c02"
|
||||
set end_prompt="${prompt_color_seq}%#${command_color_seq} "
|
||||
|
||||
alias oldp 'set prompt="$prompt_simple"; set cshenv_user_prompt_override'
|
||||
|
@ -1,6 +1,34 @@
|
||||
############################
|
||||
### Final Prompt Setting ###
|
||||
############################
|
||||
|
||||
# Recompute cached sgr codes from any configuration updates
|
||||
if( ! $?curr_path_color ) then
|
||||
set curr_path_color=impossible
|
||||
endif
|
||||
if( ! $?curr_path_color || "${curr_path_color}" != "${path_color}" ) then
|
||||
set curr_path_color="${path_color}"
|
||||
set path_color_seq="[`__build_sgr_code no-csi reset ${curr_path_color}`m"
|
||||
endif
|
||||
|
||||
if( ! $?curr_date_color ) then
|
||||
set curr_date_color=impossible
|
||||
endif
|
||||
if( ! $?curr_date_color || "${curr_date_color}" != "${date_color}" ) then
|
||||
set curr_date_color="${date_color}"
|
||||
set date_color_seq="[`__build_sgr_code no-csi reset ${curr_date_color}`m"
|
||||
set date_prompt_view="%{${date_color_seq}%}${date_prompt}%{${sgr_reset}%}"
|
||||
endif
|
||||
|
||||
if( ! $?curr_time_color ) then
|
||||
set curr_time_color=impossible
|
||||
endif
|
||||
if( ! $?curr_time_color || "${curr_time_color}" != "${time_color}" ) then
|
||||
set curr_time_color="${time_color}"
|
||||
set time_color_seq="[`__build_sgr_code no-csi reset ${curr_time_color}`m"
|
||||
set time_prompt_view="%{${time_color_seq}%}${time_prompt}%{${sgr_reset}%}"
|
||||
endif
|
||||
|
||||
if( ${prompt_hcolor} != 0 ) then
|
||||
set last_color = ${reference_colors[${prompt_hcolor}]}
|
||||
endif
|
||||
@ -18,6 +46,7 @@ set medium_battery_level = 50
|
||||
set strong_battery_level = 75
|
||||
|
||||
|
||||
|
||||
while( ${prompt_hcolor} == 0 )
|
||||
if( $?CSHENV_DEBUG ) then
|
||||
echo colorshuffle
|
||||
@ -188,10 +217,10 @@ if( ! $?CSHENV_DISABLE_PROMPT_GIT ) then
|
||||
set git_prompt_view="${git_prompt}"
|
||||
endif
|
||||
if( ! $?CSHENV_DISABLE_PROMPT_PATH ) then
|
||||
set path_prompt_view="${path_prompt}"
|
||||
set path_prompt_view="%{${path_color_seq}%}${path_prompt}%{${sgr_reset}%}"
|
||||
endif
|
||||
|
||||
set prompt_cool="%{\n%}${align_prefix}${battery_prefix}${battery_prompt}${date_prompt}${align_suffix}${brace_color_seq}\[${prompt_reference_view}${line_prompt_view}${depth_prompt_view}${line_spacer_view}${user_prompt_view}${at_view}${host_prompt_view}${git_prompt_view}${path_prompt_view}${brace_color_seq}\]${end_prompt}"
|
||||
set prompt_cool="%{\n%}${align_prefix}${battery_prefix}${battery_prompt}${date_prompt_view}%{ %}${time_prompt_view}${align_suffix}${brace_color_seq}\[${prompt_reference_view}${line_prompt_view}${depth_prompt_view}${line_spacer_view}${user_prompt_view}${at_view}${host_prompt_view}${git_prompt_view}${path_prompt_view}${brace_color_seq}\]${end_prompt}"
|
||||
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user