Merge branch 'pre-master' into sysadmin-master
* pre-master: Add debug message to sigil generation. Make sgr builder more portable. Dynamic prompt colors cacheing loop New safe_source logic. All the debugging I could find. More debug prints converted Upgrade some debug printing to debug statements. Add `_debug` primitive Fix shell level hiding Hiding shell level at 1 is the default. Convert color script to portable POSIX shell Overhaul the installation and detection mechanisms No need to hardcode this anymore. Conflicts: startup_hooks/tcshrc tcshrc.prompt.final
This commit is contained in:
+4
-6
@@ -139,8 +139,6 @@ if( $?CSHENV_SHOW_BATTERY_LEVEL ) then
|
||||
set battery_level=`pmset -g batt | grep -Eo "\d+%" | cut -d% -f1`
|
||||
else if( $?CSHENV_BATTERY_DEVICE ) then
|
||||
set battery_level=`cat ${CSHENV_BATTERY_DEVICE}`
|
||||
else
|
||||
set battery_level=`cat /sys/class/power_supply/BAT1/capacity`
|
||||
endif
|
||||
if( ${battery_level} < ${critical_battery_level} ) then
|
||||
set battery_color=${red}${blink}
|
||||
@@ -164,7 +162,7 @@ if( $?CSHENV_SHOW_BATTERY_LEVEL ) then
|
||||
|
||||
#set battery_prompt="%{${battery_color}%}%{${battery_level}${at_color}\%%}%{${dim}%} "
|
||||
set battery_prefix="%{${csi}m${csi}28D%}"
|
||||
set battery_prompt="%{${csi}38;2;128;128;255;3mBattery Level:${sgr_reset} ${battery_color}${battery_level}${percent_color_seq}%${sgr_reset} %}"
|
||||
set battery_prompt="%{${csi}38;2;128;128;255;3mBattery Level:${sgr_reset} ${battery_color}${battery_level}%}${percent_color_seq}%{%${sgr_reset} %}"
|
||||
else
|
||||
set battery_prefix=""
|
||||
set battery_prompt=""
|
||||
@@ -251,7 +249,7 @@ if( ! $?CSHENV_DISABLE_PROMPT_NESTING ) then
|
||||
set depth_prompt_spacing=" "
|
||||
endif
|
||||
set depth_prompt_view="${depth_color_seq}${depth_prompt_spacing}${depth_prompt}"
|
||||
if( $?CSHENV_HIDE_SHELL_LEVEL_AT_ONE ) then
|
||||
if( ! $?CSHENV_SHOW_SHELL_LEVEL_AT_ONE ) then
|
||||
if( ${shlvl} == 1 ) then
|
||||
set depth_prompt_view=""
|
||||
endif
|
||||
@@ -294,10 +292,10 @@ endif
|
||||
|
||||
_debug "Up to the time, date, and battery checks..."
|
||||
if( ! $?CSHENV_DISABLE_PROMPT_TIME ) then
|
||||
set time_prompt_view="%{${time_color_seq}%}${time_prompt}%{${sgr_reset}%}"
|
||||
set time_prompt_view="${time_color_seq}${time_prompt}%{${sgr_reset}%}"
|
||||
endif
|
||||
if( ! $?CSHENV_DISABLE_PROMPT_DATE ) then
|
||||
set date_prompt_view="%{${date_color_seq}%}${date_prompt}%{${sgr_reset}%}"
|
||||
set date_prompt_view="${date_color_seq}${date_prompt}%{${sgr_reset}%}"
|
||||
endif
|
||||
if( ! $?CSHENV_DISABLE_PROMPT_BATTERY ) then
|
||||
set battery_prompt_view="${battery_prefix}${battery_prompt}"
|
||||
|
||||
Reference in New Issue
Block a user