diff --git a/bin/executable_find-agent.sh b/bin/executable_find-agent.sh index fc35065..0bc83da 100755 --- a/bin/executable_find-agent.sh +++ b/bin/executable_find-agent.sh @@ -12,5 +12,5 @@ else echo -e "$SSH_AUTH_SOCK" export SSH_AUTH_SOCK ssh-add ~/.ssh/daimler_rsa - ssh-add ~/.ssh/id_materna + ssh-add ~/.ssh/materna-ecdsa fi diff --git a/bin/executable_show-cert.sh b/bin/executable_show-cert.sh index 0477644..cbcc390 100644 --- a/bin/executable_show-cert.sh +++ b/bin/executable_show-cert.sh @@ -4,6 +4,10 @@ # Inspired by https://cheat.sh/openssl # +# Alternativen aus https://www.feistyduck.com/library/openssl-cookbook/online/ch-testing-with-openssl.html +# echo | openssl s_client -connect www.gaiselmann.de:443 2>&1 | openssl x509 -noout -text -fingerprint -sha256 +# echo | openssl s_client -connect www.gaiselmann.de:443 2>&1 | sed --quiet '/-BEGIN CERTIFICATE-/,/-END CERTIFICATE-/p' +# function show-cert() { local host=$1 local port=${2:-443} diff --git a/dot_bashrc.d/executable_08.alias.tmpl b/dot_bashrc.d/executable_08.alias.tmpl index 6acda58..cdf88ac 100644 --- a/dot_bashrc.d/executable_08.alias.tmpl +++ b/dot_bashrc.d/executable_08.alias.tmpl @@ -50,6 +50,18 @@ alias findAgent='find-agent.sh' # ip alias ips='ip --brief -c address' +alias sol-light='set-scheme.sh solarized.light' +alias sol-dark='set-scheme.sh solarized.dark' + +# if tldr++ is installed, use it the static way +if tldr --version &> /dev/null +then + tldrVersion="$(tldr --version 2>&1)" + if [[ $tldrVersion =~ tldr\+\+.* ]]; then + alias tldr='tldr --static' + fi +fi + {{ if eq .bash.prompt.category "Uberspace" -}} alias quota='quota -gls' {{ end -}} diff --git a/dot_bashrc.d/executable_09.functions b/dot_bashrc.d/executable_09.functions index 2f7da6a..bf1e9b4 100755 --- a/dot_bashrc.d/executable_09.functions +++ b/dot_bashrc.d/executable_09.functions @@ -104,4 +104,13 @@ enqueueFiles() { done } +# List SSH keys +# See https://prefetch.net/blog/index.php/2010/12/13/locating-the-ssh-key-type-and-key-size-from-a-public-key-file/ +list-ssh-keys() { + for f in ~/.ssh/*.pub + do + printf "%-50s -> $(ssh-keygen -l -f $f)\n" $f + done +} + PATH=$PATH:$HOME/bin diff --git a/dot_bashrc.d/executable_10.prompt.tmpl b/dot_bashrc.d/executable_10.prompt.tmpl index 34878f1..d014a3f 100644 --- a/dot_bashrc.d/executable_10.prompt.tmpl +++ b/dot_bashrc.d/executable_10.prompt.tmpl @@ -52,7 +52,7 @@ function statusPrompt() { echo "\[$(colf "$PROMPT_COLOR")\]  \$(lastExitCode)\[$(colf "$PROMPT_COLOR")\]  $type \[$(res)\]\[$(colf 7)\]▓▒░" } function userPrompt() { - echo "\[$(res)\]\[$(colf 2)\]\u@\h \[$(colf 1)\]☆ \[$(colf 2)\]\w \[$(colf 1)\]☆ \[$(colf "$PROMPT_COLOR")\]\$(parse_git_branch) " + echo "\[$(res)\]\[$(colf 2)\]\u@\h \[$(colf 1)\]☆ \[$(colf 2)\]\w \[$(colf 1)\]☆ \[$(colf 4)\]\$(parse_git_branch) " } function datePrompt() { echo "\[$(colf 2)\]\D{%Y-%m-%d %H:%M:%S}" diff --git a/private_dot_config/color-schemes/solarized.dark.scheme.sh b/private_dot_config/color-schemes/solarized.dark.scheme.sh index 082a32c..7743e54 100644 --- a/private_dot_config/color-schemes/solarized.dark.scheme.sh +++ b/private_dot_config/color-schemes/solarized.dark.scheme.sh @@ -19,3 +19,24 @@ echo -ne '\eP\e]4;6;#2AA198\a' # cyan -> cyan echo -ne '\eP\e]4;14;#93A1A1\a' # bold cyan -> base1 * echo -ne '\eP\e]4;7;#EEE8D5\a' # white -> Base2 echo -ne '\eP\e]4;15;#FDF6E3\a' # bold white -> Base3 + +# Test, overwrite bold colors (from mintty) +echo -ne '\e]4;8;#404040\a' # bold black (i.e. dark grey) +echo -ne '\e]4;9;#FF4040\a' # bold red +echo -ne '\e]4;10;#40FF40\a' # bold green +echo -ne '\e]4;11;#FFFF40\a' # bold yellow +echo -ne '\e]4;12;#6060FF\a' # bold blue +echo -ne '\e]4;13;#FF40FF\a' # bold magenta +echo -ne '\e]4;14;#40FFFF\a' # bold cyan +echo -ne '\e]4;15;#FFFFFF\a' # bold white + +# Test II, use same color for bold, mintty should show bold +echo -ne '\e]4;8;#073642\a' # bold black (i.e. dark grey) +echo -ne '\e]4;9;#DC322F\a' # bold red +echo -ne '\e]4;10;#859900\a' # bold green +echo -ne '\e]4;11;#B58900\a' # bold yellow +echo -ne '\e]4;12;#268BD2\a' # bold blue +echo -ne '\e]4;13;#D33682\a' # bold magenta +echo -ne '\e]4;14;#2AA198\a' # bold cyan +echo -ne '\e]4;15;#EEE8D5\a' # bold white +