Commit for generation 171

This commit is contained in:
2024-10-02 05:31:03 -04:00
parent 827f956b07
commit 3ad290cb82
4 changed files with 38 additions and 6 deletions

View File

@@ -0,0 +1,36 @@
function left-beep {
[[ $CURSOR -eq 0 ]] && return
zle vi-backward-char
(aplay /home/pagedmov/sound/sys/move_h.wav > /dev/null 2>&1 &)
}
function right-beep {
zle autosuggest-accept
[[ $CURSOR -eq ${#BUFFER} ]] && return
zle vi-forward-char
(aplay /home/pagedmov/sound/sys/move_h.wav > /dev/null 2>&1 &)
}
function up-beep {
zle up-line-or-history
(aplay /home/pagedmov/sound/sys/move_v.wav > /dev/null 2>&1 &)
}
function down-beep {
zle down-line-or-history
(aplay /home/pagedmov/sound/sys/move_v.wav > /dev/null 2>&1 &)
}
zle -N left-beep
zle -N right-beep
zle -N up-beep
zle -N down-beep
bindkey -M viins "^[OD" left-beep
bindkey -M viins "^[OC" right-beep
bindkey -M viins "^[OB" down-beep
bindkey -M viins "^[OA" up-beep
bindkey -M vicmd "h" left-beep
bindkey -M vicmd "l" right-beep
bindkey -M vicmd "j" down-beep
bindkey -M vicmd "k" up-beep
ZSH_AUTOSUGGEST_ACCEPT_WIDGETS+=("right-beep")

View File

@@ -4,7 +4,6 @@ if (( ${+terminfo[smkx]} && ${+terminfo[rmkx]} )); then
zle-line-finish() { echoti rmkx; }; zle -N zle-line-finish
fi
# History
zshAddHistory() {
whence ${${(z)1}[1]} >| /dev/null || return 1