Merge branch 'master' of github.com:adamlsd/cshenv
Conflicts: vim/colors/adam.vim
This commit is contained in:
@ -36,7 +36,7 @@ sp_balance_nested_parens=true
|
|||||||
align_keep_tabs=false
|
align_keep_tabs=false
|
||||||
align_with_tabs=false
|
align_with_tabs=false
|
||||||
align_on_tabstop=false
|
align_on_tabstop=false
|
||||||
align_number_left=false
|
#align_number_left=false
|
||||||
align_func_params=false
|
align_func_params=false
|
||||||
align_same_func_call_params=false
|
align_same_func_call_params=false
|
||||||
align_var_def_colon=false
|
align_var_def_colon=false
|
||||||
|
@ -7,6 +7,7 @@ set csi='['
|
|||||||
set ansi_bright='1'
|
set ansi_bright='1'
|
||||||
set ansi_dim='0'
|
set ansi_dim='0'
|
||||||
set ansi_color='m'
|
set ansi_color='m'
|
||||||
|
set ansi_reverse='7'
|
||||||
|
|
||||||
set ansi_black='30'
|
set ansi_black='30'
|
||||||
set ansi_red='31'
|
set ansi_red='31'
|
||||||
@ -20,6 +21,7 @@ set ansi_white='37'
|
|||||||
|
|
||||||
set bright="$csi$ansi_bright$ansi_color"
|
set bright="$csi$ansi_bright$ansi_color"
|
||||||
set dim="$csi$ansi_dim$ansi_color"
|
set dim="$csi$ansi_dim$ansi_color"
|
||||||
|
set reverse="$csi$ansi_reverse$ansi_color"
|
||||||
|
|
||||||
|
|
||||||
set black="$csi$ansi_black$ansi_color"
|
set black="$csi$ansi_black$ansi_color"
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
set date_color="${dim_magenta}"
|
set date_color="${dim_magenta}"
|
||||||
set time_color="${bright_magenta}"
|
set time_color="${bright_magenta}"
|
||||||
set text_color="${bright_white}"
|
set text_color="${bright_white}"
|
||||||
set oldp_color="${dim_white}"
|
set oldp_color="${dim}"
|
||||||
set brace_color="${bright_yellow}"
|
set brace_color="${bright_yellow}"
|
||||||
set host_color="${bright_blue}"
|
set host_color="${bright_blue}"
|
||||||
set name_color="${bright_cyan}"
|
set name_color="${bright_cyan}"
|
||||||
@ -15,7 +15,7 @@ set path_color="${bright_green}"
|
|||||||
set line_color="${dim_red}"
|
set line_color="${dim_red}"
|
||||||
set prompt_color="${dim_white}"
|
set prompt_color="${dim_white}"
|
||||||
set depth_color="${dim_yellow}"
|
set depth_color="${dim_yellow}"
|
||||||
set command_color="${dim_white}"
|
set command_color="${dim}"
|
||||||
|
|
||||||
set color_start="%{"
|
set color_start="%{"
|
||||||
set color_end="%}"
|
set color_end="%}"
|
||||||
|
@ -6,11 +6,6 @@ if( $?CSHENV_DEBUG ) then
|
|||||||
echo "Sourcing prompt setup and definitions..."
|
echo "Sourcing prompt setup and definitions..."
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
|
||||||
if( $?CSHENV_DEBUG ) then
|
|
||||||
echo "Trying to fix tty bug"
|
|
||||||
endif
|
|
||||||
|
|
||||||
if( ! $?unknown_tty ) then
|
if( ! $?unknown_tty ) then
|
||||||
set unknown_tty="?"
|
set unknown_tty="?"
|
||||||
if( $?CSHENV_DEBUG ) then
|
if( $?CSHENV_DEBUG ) then
|
||||||
@ -18,97 +13,87 @@ if( ! $?unknown_tty ) then
|
|||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
setenv CSHENV_CACHE_DIR ~/.tcsh_cache
|
|
||||||
|
# R G Y B C M
|
||||||
|
set reference_colors=( ${csi}91m ${csi}92m ${csi}93m ${csi}38\;5\;33m ${csi}95m ${csi}96m )
|
||||||
|
|
||||||
|
# R G Y B M
|
||||||
|
set reference_colors=( ${csi}91m ${csi}92m ${csi}93m ${csi}38\;5\;33m ${csi}96m )
|
||||||
|
|
||||||
|
# Select a set of Unicode codepoints for prompt referencing...
|
||||||
|
set referencechars_raw=""
|
||||||
|
|
||||||
|
# Nuke Symbol
|
||||||
|
set referencechars_raw="${referencechars_raw} 2622"
|
||||||
|
|
||||||
|
# Keyboard Symbol (Didn't look good -- spilled (not pushed) over 1.5 cells)
|
||||||
|
set keyboard_sym="2328"
|
||||||
|
set referencechars_raw="${referencechars_raw} 2328"
|
||||||
|
|
||||||
|
# Telephone (Spills over 1 cell.)
|
||||||
|
set referencechars_raw="${referencechars_raw} 260e"
|
||||||
|
|
||||||
|
# Clover
|
||||||
|
set referencechars_raw="${referencechars_raw} 2618"
|
||||||
|
|
||||||
|
# Music notes
|
||||||
|
#set referencechars_raw="${referencechars_raw} 2669 266a 266b 266c"
|
||||||
|
|
||||||
|
# One Single music note,
|
||||||
|
#set referencechars_raw="${referencechars_raw} 266a"
|
||||||
|
# One double music note
|
||||||
|
#set referencechars_raw="${referencechars_raw} 266b"
|
||||||
|
set referencechars_raw="${referencechars_raw} 266c"
|
||||||
|
|
||||||
|
# Dice
|
||||||
|
#set referencechars_raw="${referencechars_raw} 2680 2681 2682 2683 2684 2685"
|
||||||
|
|
||||||
|
# Card suits
|
||||||
|
set referencechars_raw="${referencechars_raw} 2660 2663 2665 2666"
|
||||||
|
|
||||||
|
# Inner planet symbols (Mercury, Venus, Earth, Mars)
|
||||||
|
set referencechars_raw="${referencechars_raw} 263f 2640 2641 2642"
|
||||||
|
|
||||||
|
# Outer Planet symbols (Jupiter, Saturn, Uranus, Neptune, Pluto)
|
||||||
|
#set referencechars_raw="${referencechars_raw} 2643 2644 2645 2646 2647"
|
||||||
|
|
||||||
|
# Hollow Chess pieces
|
||||||
|
#set referencechars_raw="${referencechars_raw} 2654 2655 2656 2657 2658 2659"
|
||||||
|
|
||||||
|
# Filled Chess pieces
|
||||||
|
#set referencechars_raw="${referencechars_raw} 265a 265b 265c 265d 265e 265f"
|
||||||
|
|
||||||
|
# Roman Numerals
|
||||||
|
#set referencechars_raw="${referencechars_raw} 2160 2161 2162 2163 2164 2165 2166 2167 2168 2169 216a 216b"
|
||||||
|
|
||||||
|
# Misc stuff -- colour? baseball Takes up too many width slots. Throws off alignment.
|
||||||
|
#set referencechars_raw="${referencechars_raw} 26be"
|
||||||
|
|
||||||
|
#echo ${referencechars[1]}
|
||||||
|
set prompt_hcolor=0
|
||||||
|
set prompt_hsym=0
|
||||||
|
|
||||||
|
set referencechars=()
|
||||||
|
foreach ch ($referencechars_raw)
|
||||||
|
set referencechars=( $referencechars `env LC_ALL=C.UTF-8 printf "\u${ch}"` )
|
||||||
|
end
|
||||||
|
|
||||||
|
# Rotation
|
||||||
|
alias precmd 'source ${CSHENV_DIR}/tcshrc.prompt.final'
|
||||||
|
#alias postcmd echo doit
|
||||||
|
|
||||||
set promptchars='%#'
|
set promptchars='%#'
|
||||||
|
|
||||||
set default_screen_offset_count=80
|
|
||||||
|
|
||||||
set prompt_simple="${oldp_color_seq}[%n@%m: %c]%# "
|
set prompt_simple="${oldp_color_seq}[%n@%m: %c]%# "
|
||||||
|
|
||||||
|
# Screens are almost certainly not a million chars wide.
|
||||||
switch( $CSHENV_SYSTEM )
|
# If they are... oh well, that's a really weird one.
|
||||||
|
set date_prefix="%{${csi}A${csi}1000000G${csi}18D%}"
|
||||||
# All BSD derived systems (and actually most non-GNU tools) have the 6th entry for stty being columns
|
set date_suffix="%{${csi}G${csi}1B%}"
|
||||||
case Darwin:
|
#set screen_return="%{8%}"
|
||||||
#FALLTHROUGH
|
set date_prompt_core="${date_color_seq}%{%Y-%W-%D %}${time_color_seq}%{%P%}"
|
||||||
|
|
||||||
# TODO: Figure out a collapse?
|
|
||||||
#case *BSD: #Is this legal in CSH?
|
|
||||||
#FALLTHROUGH
|
|
||||||
|
|
||||||
case FreeBSD:
|
|
||||||
#FALLTHROUGH
|
|
||||||
|
|
||||||
case NetBSD:
|
|
||||||
#FALLTHROUGH
|
|
||||||
|
|
||||||
case OpenBSD:
|
|
||||||
if( $?CSHENV_DEBUG ) then
|
|
||||||
echo "Using BSDish stty for width"
|
|
||||||
endif
|
|
||||||
set screen_offset_count=`stty -a | head -1 | awk '{print $6}' | sed -e "s/;//g"`
|
|
||||||
breaksw
|
|
||||||
|
|
||||||
|
|
||||||
# SysV variants:
|
|
||||||
|
|
||||||
# Linux (and Cygwin) are not BSD behavior, and make cols the 7th entry be stty
|
|
||||||
case Cygwin:
|
|
||||||
case Linux:
|
|
||||||
|
|
||||||
# SYSV type systems seem to be settling on this as the common mechanism.
|
|
||||||
case AIX:
|
|
||||||
case SunOS:
|
|
||||||
if( $?CSHENV_DEBUG ) then
|
|
||||||
echo "Linux prompt width for stty blows..."
|
|
||||||
endif
|
|
||||||
|
|
||||||
#Some cshes don't like the split line here!
|
|
||||||
set screen_offset_count=`stty -a | head -1 | sed -e 's/;//g' | awk '{print $7}' | sed -e 's/;//g'`
|
|
||||||
breaksw
|
|
||||||
|
|
||||||
default:
|
|
||||||
#We don't know how to handle this case. Just use a guessed
|
|
||||||
#value of 80, since we cannot tell.
|
|
||||||
set screen_offset_count=$default_screen_offset_count
|
|
||||||
echo "Using a default screen offset value"
|
|
||||||
breaksw
|
|
||||||
|
|
||||||
endsw
|
|
||||||
|
|
||||||
if( $?CSHENV_DEBUG ) then
|
|
||||||
echo "Screen offset computed to be: ${screen_offset_count}"
|
|
||||||
endif
|
|
||||||
|
|
||||||
set screen_width=$screen_offset_count
|
|
||||||
#echo $screen_offset_count
|
|
||||||
@ screen_offset_count = $screen_offset_count - 18
|
|
||||||
#echo "A"
|
|
||||||
|
|
||||||
set screen_offset=""
|
|
||||||
set n="1"
|
|
||||||
|
|
||||||
|
|
||||||
if ( ! -d $CSHENV_CACHE_DIR ) then
|
|
||||||
mkdir $CSHENV_CACHE_DIR
|
|
||||||
endif
|
|
||||||
#echo $screen_offset_count
|
|
||||||
if ( -f ${CSHENV_CACHE_DIR}/screen.$screen_width ) then
|
|
||||||
source ${CSHENV_CACHE_DIR}/screen.$screen_width
|
|
||||||
else
|
|
||||||
while ( ${n} < ${screen_offset_count} )
|
|
||||||
set screen_offset="${screen_offset} "
|
|
||||||
@ n = ($n + 1)
|
|
||||||
end
|
|
||||||
echo "set screen_offset='${screen_offset}'" > ${CSHENV_CACHE_DIR}/screen.${screen_width}
|
|
||||||
#echo "Make a manual cache entry for screen width."
|
|
||||||
endif
|
|
||||||
|
|
||||||
|
|
||||||
set date_prompt_core="${date_color_seq}%Y-%W-%D ${time_color_seq}%P"
|
|
||||||
set date_prompt_left="${date_prompt_core}"
|
set date_prompt_left="${date_prompt_core}"
|
||||||
set date_prompt="${screen_offset}${date_prompt_core}"
|
set date_prompt="${date_prefix}${date_prompt_core}${date_suffix}"
|
||||||
#unset edit
|
#unset edit
|
||||||
|
|
||||||
if( $?CSHENV_DEBUG ) then
|
if( $?CSHENV_DEBUG ) then
|
||||||
@ -116,10 +101,10 @@ if( $?CSHENV_DEBUG ) then
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
|
|
||||||
set depth_prompt=" ${depth_color_seq}(${shlvl})"
|
set depth_prompt=" ${depth_color_seq}(${shlvl})${text_color_seq}\- "
|
||||||
if( $?CSHENV_HIDE_SHELL_LEVEL_AT_ONE ) then
|
if( $?CSHENV_HIDE_SHELL_LEVEL_AT_ONE ) then
|
||||||
if( $shlvl == 1 ) then
|
if( $shlvl == 1 ) then
|
||||||
set depth_prompt=""
|
set depth_prompt="${text_color_seq}\- "
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
@ -130,15 +115,10 @@ set host_prompt="${host_color_seq}${CSHENV_HOSTNAME}"
|
|||||||
set path_prompt="${path_color_seq}%c02"
|
set path_prompt="${path_color_seq}%c02"
|
||||||
set end_prompt="${prompt_color_seq}%#${command_color_seq} "
|
set end_prompt="${prompt_color_seq}%#${command_color_seq} "
|
||||||
|
|
||||||
|
|
||||||
set prompt_cool="${date_prompt}${text_color_seq}%L${brace_color_seq}\[${line_prompt}${depth_prompt}${text_color_seq}\- ${user_prompt}${at_color_seq}@${host_prompt}${text_color_seq}\: ${path_prompt}${brace_color_seq}\]${end_prompt}"
|
|
||||||
|
|
||||||
if( ! ${?cshenv_user_prompt_override} ) then
|
|
||||||
set prompt="$prompt_cool"
|
|
||||||
endif
|
|
||||||
alias oldp 'set prompt="$prompt_simple"; set cshenv_user_prompt_override'
|
alias oldp 'set prompt="$prompt_simple"; set cshenv_user_prompt_override'
|
||||||
alias newp 'set prompt="$prompt_cool"; set cshenv_user_prompt_override'
|
alias newp 'set prompt="$prompt_cool"; set cshenv_user_prompt_override'
|
||||||
|
|
||||||
|
source ${CSHENV_DIR}/tcshrc.prompt.final
|
||||||
###########################
|
###########################
|
||||||
# vim:filetype=tcsh
|
# vim:filetype=tcsh
|
||||||
###########################
|
###########################
|
||||||
|
51
tcshrc.prompt.final
Normal file
51
tcshrc.prompt.final
Normal file
@ -0,0 +1,51 @@
|
|||||||
|
############################
|
||||||
|
### Final Prompt Setting ###
|
||||||
|
############################
|
||||||
|
@ prompt_hcolor = $prompt_hcolor % ${#reference_colors}
|
||||||
|
@ prompt_hsym = $prompt_hsym % ${#referencechars}
|
||||||
|
|
||||||
|
if( ${prompt_hcolor} == 0 ) then
|
||||||
|
#if( $?CSHENV_DEBUG ) then
|
||||||
|
#echo colorshuffle
|
||||||
|
#endif
|
||||||
|
#echo
|
||||||
|
set reference_colors=`shuf -e $reference_colors`
|
||||||
|
endif
|
||||||
|
|
||||||
|
|
||||||
|
if( ${prompt_hsym} == 0 ) then # && ${prompt_hcolor} == 0 ) then
|
||||||
|
if( $?CSHENV_DEBUG ) then
|
||||||
|
echo symbolshuffle
|
||||||
|
endif
|
||||||
|
#echo
|
||||||
|
set referencechars=`shuf -e $referencechars`
|
||||||
|
#set reference_colors=`shuf -e $reference_colors`
|
||||||
|
endif
|
||||||
|
|
||||||
|
@ prompt_hcolor = ${prompt_hcolor} + 1
|
||||||
|
@ prompt_hsym = ${prompt_hsym} + 1
|
||||||
|
|
||||||
|
if( $?CSHENV_DEBUG ) then
|
||||||
|
echo ${prompt_hcolor} ${prompt_hsym}
|
||||||
|
echo "Setting prompt"
|
||||||
|
endif
|
||||||
|
|
||||||
|
set prompt_reference_core="%{${reference_colors[${prompt_hcolor}]}%}${referencechars[${prompt_hsym}]}"
|
||||||
|
#if( ${referencechars[${prompt_hsym}]} == `env LC_ALL=C.UTF-8 printf "\u2328"` ) then
|
||||||
|
# set prompt_reference="%{${dim}%}<${prompt_reference_core} %{${dim}%}> "
|
||||||
|
#else
|
||||||
|
# set prompt_reference="%{${dim}%}< ${prompt_reference_core} %{${dim}%}> "
|
||||||
|
#endif
|
||||||
|
set prompt_reference="%{${dim}%}< ${prompt_reference_core} %{${dim}%}> "
|
||||||
|
#set prompt_reference="%{${csi}0;48\;5\;7m%}(${prompt_reference_core}%{${csi}0;48\;5\;7m%})%{${dim}%}"
|
||||||
|
#set prompt_reference="${prompt_reference_core}%{${text_color_seq}%} \- "
|
||||||
|
|
||||||
|
set prompt_cool="\n${date_prompt}${brace_color_seq}\[${prompt_reference}${line_prompt}${depth_prompt}${user_prompt}${at_color_seq}@${host_prompt}${text_color_seq}\: ${path_prompt}${brace_color_seq}\]${end_prompt}"
|
||||||
|
|
||||||
|
if( ! ${?cshenv_user_prompt_override} ) then
|
||||||
|
set prompt="$prompt_cool"
|
||||||
|
endif
|
||||||
|
|
||||||
|
###########################
|
||||||
|
# vim:filetype=tcsh
|
||||||
|
###########################
|
@ -60,7 +60,7 @@ hi netrwSymLink ctermfg=Cyan
|
|||||||
hi Search ctermbg=brown ctermfg=white cterm=bold term=bold start=<esc>[48;5;130;97m stop=<esc>[0m
|
hi Search ctermbg=brown ctermfg=white cterm=bold term=bold start=<esc>[48;5;130;97m stop=<esc>[0m
|
||||||
"hi IncSearch cterm=NONE ctermbg=steelblue
|
"hi IncSearch cterm=NONE ctermbg=steelblue
|
||||||
hi LineNr ctermfg=yellow term=none start=<esc>[93m stop=<esc>[0m
|
hi LineNr ctermfg=yellow term=none start=<esc>[93m stop=<esc>[0m
|
||||||
hi title ctermbg=yellow ctermfg=white
|
hi title ctermbg=yellow ctermfg=darkgreen term=none start=<esc>[103;32m stop=<esc>[0m
|
||||||
hi ShowMarksHL ctermbg=yellow ctermfg=black cterm=bold
|
hi ShowMarksHL ctermbg=yellow ctermfg=black cterm=bold
|
||||||
hi CursorLine ctermbg=yellow ctermfg=black cterm=bold
|
hi CursorLine ctermbg=yellow ctermfg=black cterm=bold
|
||||||
"hi StatusLineNC cterm=NONE ctermfg=lightblue ctermbg=darkblue
|
"hi StatusLineNC cterm=NONE ctermfg=lightblue ctermbg=darkblue
|
||||||
@ -176,6 +176,7 @@ hi TabLine term=underline cterm=underline ctermfg=15 ctermbg=242 gui=underli
|
|||||||
hi TabLineSel term=bold cterm=bold gui=bold
|
hi TabLineSel term=bold cterm=bold gui=bold
|
||||||
hi TabLineFill term=reverse cterm=reverse gui=reverse
|
hi TabLineFill term=reverse cterm=reverse gui=reverse
|
||||||
|
|
||||||
|
hi WildMenu ctermfg=0 ctermbg=11 guifg=Black guibg=Yellow term=none start=<esc>[48;5;11;30m stop=<esc>[0m
|
||||||
|
|
||||||
" The vim colorscheme does everything, and some of the non-status-bar colors affect non-source bits.
|
" The vim colorscheme does everything, and some of the non-status-bar colors affect non-source bits.
|
||||||
" I may have to maintain everything in this combined form
|
" I may have to maintain everything in this combined form
|
||||||
|
Reference in New Issue
Block a user