Added a whole dynamic prompt tuning command

This commit is contained in:
2026-02-15 18:06:00 -05:00
parent cd0f9a7d4d
commit 098ffd6c34
5 changed files with 113 additions and 3 deletions
+4
View File
@@ -0,0 +1,4 @@
#!/usr/bin/env bash
DEVICE=$(xinput list --name-only | grep "Touchpad")
echo Device is ${DEVICE}
xinput set-prop "${DEVICE}" "libinput Tapping Enabled" 1
+2
View File
@@ -170,6 +170,8 @@ else
alias p echo "Password store not found!"
endif
alias prompt source ${CSHENV_DIR}/tcshrc.prompt.command
safe_source ${CSHENV_DIR}/tcshrc.aliases.${CSHENV_SYSTEM}
safe_source ${CSHENV_DIR}/tcshrc.aliases.${CSHENV_HOSTNAME}
safe_source ${CSHENV_DIR}/tcshrc.aliases.user
+20
View File
@@ -0,0 +1,20 @@
set date_color=""
set time_color=""
set text_color="reset"
set brace_color=""
set host_color=""
set user_color=""
set at_color=""
set path_color=""
set line_color=""
set prompt_color="reset"
set depth_color=""
set percent_color=""
set dirs_color=""
#${csi}3;4;38;2;255;192;192;58;2;255;255;255m%}
set branch_color=""
set ahead_tracking_color=""
set behind_tracking_color=""
+53
View File
@@ -0,0 +1,53 @@
set prompt_elements="time date user host line git battery nesting path tty sigil"
if ( "" == "${1}" ) then
echo "ERROR: prompt change with no parameters"
endif
while ( "" != "${1}" )
switch ( ${1} )
case 'enable':
shift
if( $?CSHENV_DEBUG ) then
echo unsetenv CSHENV_DISABLE_PROMPT_`echo ${1} | tr '[[:lower:]]' '[[:upper:]]'`
endif
eval unsetenv CSHENV_DISABLE_PROMPT_`echo ${1} | tr '[[:lower:]]' '[[:upper:]]'`
breaksw
case 'disable':
shift
if( $?CSHENV_DEBUG ) then
echo setenv CSHENV_DISABLE_PROMPT_`echo ${1} | tr '[[:lower:]]' '[[:upper:]]'`
endif
eval setenv CSHENV_DISABLE_PROMPT_`echo ${1} | tr '[[:lower:]]' '[[:upper:]]'`
breaksw
case 'full':
foreach element ( ${prompt_elements} )
prompt enable ${element}
end
breaksw
case 'nothing':
foreach element ( ${prompt_elements} )
prompt disable ${element}
end
breaksw
case 'monochrome':
source ${CSHENV_DIR}/tcshrc.prompt.clear_colors
breaksw
case 'colors':
source ${CSHENV_DIR}/tcshrc.prompt.colors
breaksw
default:
echo 'ERROR: Prompt setting command requires either `enable` or `disable`, you passed `'${1}'`'
breaksw
endsw
shift
end
# vim: ft=tcsh
+34 -3
View File
@@ -103,7 +103,6 @@ endif
if( "${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
@@ -112,7 +111,6 @@ endif
if( "${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( ! $?curr_text_color ) then
@@ -322,6 +320,14 @@ set git_prompt_view=""
set path_prompt_view=""
set line_spacer_view=""
set dirs_prompt_view=""
set time_prompt_view=""
set date_prompt_view=""
set battery_prompt_view=""
set internal_bracket_view=""
if( $?CSHENV_DEBUG ) then
echo "About to setup prompt members, with disable checks"
endif
if( ! $?CSHENV_DISABLE_PROMPT_SIGIL ) then
set prompt_reference_view="${prompt_reference}"
@@ -343,6 +349,9 @@ if( ! $?CSHENV_DISABLE_PROMPT_NESTING ) then
endif
endif
if( $?CSHENV_DEBUG ) then
echo "Up to the user and host checks..."
endif
set host_prompt_tail=": "
if( ! $?CSHENV_DISABLE_PROMPT_USER ) then
set user_prompt_view="${user_color_seq}${user_prompt}%{${sgr_reset}%}"
@@ -372,8 +381,30 @@ if( ! $?CSHENV_DISABLE_PROMPT_DIRS ) then
endif
endif
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}${dirs_prompt_view}${brace_color_seq}\]${prompt_color_seq}${end_prompt}%{${text_color_seq}%} "
if( $?CSHENV_DEBUG ) then
echo "Up to the time, date, and battery checks..."
endif
if( ! $?CSHENV_DISABLE_PROMPT_TIME ) then
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}%}"
endif
if( ! $?CSHENV_DISABLE_PROMPT_BATTERY ) then
set battery_prompt_view="${battery_prefix}${battery_prompt}"
endif
if( $?CSHENV_DEBUG ) then
echo "Doing the internal bracket setup..."
endif
set internal_bracket_prompt="${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}${dirs_prompt_view}"
if( "" != "${internal_bracket_prompt}" ) then
#echo "I see scratch -${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}${dirs_prompt_view}-"
#echo -n "${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}${dirs_prompt_view}" | dd of=/home/adam/scratch
set internal_bracket_view="${brace_color_seq}\[${internal_bracket_prompt}${brace_color_seq}\]"
endif
set prompt_cool="%{\n%}${align_prefix}${battery_prompt_view}${date_prompt_view}%{ %}${time_prompt_view}${align_suffix}${internal_bracket_view}${prompt_color_seq}${end_prompt}%{${text_color_seq}%} "
if( ! ${?cshenv_user_prompt_override} ) then