X-Git-Url: http://git.grml.org/?a=blobdiff_plain;f=etc%2Fzsh%2Fzshrc;h=50b1730acffad6b8966548e597122da0d3ac18e1;hb=412012bb01aeff370fd3fd217eb83beaad55eb9a;hp=231de8e706d28a47b2c101f022aa2c22a89b3717;hpb=9c0674773424e2e2676dfd617792989c94301d78;p=grml-etc-core.git diff --git a/etc/zsh/zshrc b/etc/zsh/zshrc index 231de8e..50b1730 100644 --- a/etc/zsh/zshrc +++ b/etc/zsh/zshrc @@ -2478,6 +2478,9 @@ else function precmd () { (( ${+functions[vcs_info]} )) && vcs_info; } fi +# make sure to use right prompt only when not running a command +is41 && setopt transient_rprompt + # Terminal-title wizardry function ESC_print () { @@ -2502,7 +2505,7 @@ function grml_reset_screen_title () { # see http://www.faqs.org/docs/Linux-mini/Xterm-Title.html [[ ${NOTITLE:-} -gt 0 ]] && return 0 case $TERM in - (xterm*|rxvt*) + (xterm*|rxvt*|alacritty) set_title ${(%):-"%n@%m: %~"} ;; esac @@ -2539,7 +2542,7 @@ function grml_cmd_to_screen_title () { function grml_control_xterm_title () { case $TERM in - (xterm*|rxvt*) + (xterm*|rxvt*|alacritty) set_title "${(%):-"%n@%m:"}" "$2" ;; esac @@ -2817,6 +2820,17 @@ graphic chipset." return 1 } fi + + if check_com -c tmate && check_com -c qrencode ; then + function grml-remote-support() { + tmate -L grml-remote-support new -s grml-remote-support -d + tmate -L grml-remote-support wait tmate-ready + tmate -L grml-remote-support display -p '#{tmate_ssh}' | qrencode -t ANSI + echo "tmate session: $(tmate -L grml-remote-support display -p '#{tmate_ssh}')" + echo + echo "Scan this QR code and send it to your support team." + } + fi } # now run the functions