diff --git a/tcsh/.precmd.tcsh b/tcsh/.precmd.tcsh index 6b12401..50860bd 100644 --- a/tcsh/.precmd.tcsh +++ b/tcsh/.precmd.tcsh @@ -1,3 +1,4 @@ -set __prompt_key_color="${__host_color}" -if (! $__last_code == 0) set __prompt_key_color="%{\033[38;2;231;130;132m%}" -set prompt="${__host_color}%n@%m ${__git_color}`__git_current_branch`${__path_color}%C ${__prompt_key_color}${__prompt_key}${__reset_color}${__reset_cursor} " +set __prompt_key_color="${__prompt_success_color}" +if (! $__last_code == 0) set __prompt_key_color="${__prompt_failure_color}" + +set prompt="${__time_color}%T ${__host_color}%n@%m ${__path_color}%~ ${__git_color}`__git_current_branch` \n${__prompt_key_color}%#${__reset_color}${__reset_cursor} " diff --git a/tcsh/.tcshrc b/tcsh/.tcshrc index 656a785..b3c3dff 100644 --- a/tcsh/.tcshrc +++ b/tcsh/.tcshrc @@ -1,31 +1,35 @@ -set SHELL="`which tcsh`" +setenv EDITOR "nvim" +setenv SHELL "`which tcsh`" +setenv PAGER "less" + if ($?prompt) then set complete=enhance - - set __prompt_key='$' - if ($USER == "root") set __prompt_key='#' + set promptchars = '$#' alias __git_current_branch 'git rev-parse --abbrev-ref HEAD >& /dev/null && echo "(`git rev-parse --abbrev-ref HEAD`) "' - set __reset_cursor="%{\e[3 q%}" + set __reset_cursor="%{\033[3 q%}" set __reset_color="%{\033[0m%}" + set __time_color="${__reset_color}%{\033[38;2;131;139;167m%}" set __host_color="${__reset_color}%{\033[38;2;140;170;238m%}" - set __git_color="${__reset_color}%{\033[38;2;131;139;167m%}" set __path_color="${__reset_color}%{\033[1m%}%{\033[38;2;202;158;230m%}" + set __git_color="${__reset_color}%{\033[38;2;131;139;167m%}" + + set __prompt_success_color="${__reset_color}%{\033[38;2;140;170;238m%}" + set __prompt_failure_color="${__reset_color}%{\033[38;2;231;130;132m%}" alias precmd 'set __last_code=$?; source ~/.precmd.tcsh' endif -alias l "ls -lah" - alias .. "cd .." alias ... "cd ../.." alias .... "cd ../../.." alias ..... "cd ../../../.." +alias dp "doas pacman" alias dem "doas emerge" alias stdn "doas shutdown -ah 0" alias rbot "doas reboot" -alias dv "doas nvim" -alias vi "nvim" -alias vis "nvim -S Session.vim" +alias dv "doas vi" +alias ls "ls --color" +alias l "ls -lah"