From ab6af98aacd24fcf83451cee21c1736cf3277457 Mon Sep 17 00:00:00 2001 From: Timmy Keller Date: Sat, 4 Sep 2021 18:50:42 -0500 Subject: chenges do that thing wheer check if display and also zsh --- zsh/zprofile.openbsdx230 | 2 +- zsh/zshrc | 30 ++++++++++++++++-------------- 2 files changed, 17 insertions(+), 15 deletions(-) diff --git a/zsh/zprofile.openbsdx230 b/zsh/zprofile.openbsdx230 index 12942e9..0229c1a 100644 --- a/zsh/zprofile.openbsdx230 +++ b/zsh/zprofile.openbsdx230 @@ -5,6 +5,6 @@ export ETHEDEV="em0" export LC_CTYPE=en_US.UTF-8 #/usr/share/zsh/plugins/zsh-vim-mode/zsh-vim-mode.plugin.zsh export ZPLUGINS=( -/usr/local/share/zsh-syntax-highlighting/zsh-syntax/highlighting.zsh +/usr/local/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh ) source /home/timmy/.config/zsh/zprofile.base diff --git a/zsh/zshrc b/zsh/zshrc index ec04280..c6f2cc4 100644 --- a/zsh/zshrc +++ b/zsh/zshrc @@ -22,20 +22,22 @@ setopt HIST_IGNORE_SPACE # Entries with leading space ignored setopt EXTENDED_HISTORY # Save superfluous info with command to reduce disk writes # Change cursor shape for different vi modes (Cred: LARBS) -function zle-keymap-select () { - case $KEYMAP in - vicmd) echo -n '\e[1 q';; # block - viins|main) echo -n '\e[5 q';; # beam - esac -} -zle -N zle-keymap-select -zle-line-init() { - #zle -K viins # initiate `vi insert` as keymap (can be removed if `bindkey -V` has been set elsewhere) - echo -n "\e[5 q" -} -zle -N zle-line-init -echo -n '\e[5 q' # Use beam shape cursor on startup -preexec() { echo -n '\e[5 q' ;} # Use beam shape cursor for each new prompt +if [ -n "$DISPLAY" ]; then + function zle-keymap-select () { + case $KEYMAP in + vicmd) echo -n '\e[1 q';; # block + viins|main) echo -n '\e[5 q';; # beam + esac + } + zle -N zle-keymap-select + zle-line-init() { + #zle -K viins # initiate `vi insert` as keymap (can be removed if `bindkey -V` has been set elsewhere) + echo -n "\e[5 q" + } + zle -N zle-line-init + echo -n '\e[5 q' # Use beam shape cursor on startup + preexec() { echo -n '\e[5 q' ;} # Use beam shape cursor for each new prompt +fi # Load zsh plugins; should be last for plugin in $ZPLUGINS; do -- cgit v1.2.3