mirror of
https://github.com/m-housh/dotfiles.git
synced 2026-02-14 06:12:34 +00:00
feat: Fixes zsh history not saving, some hyprland config updates.
This commit is contained in:
@@ -11,47 +11,6 @@
|
||||
|
||||
_source_if() { test -r "$1" && source "$1" || return 0 }
|
||||
|
||||
# few terminal keybinds
|
||||
bindkey -e
|
||||
|
||||
typeset -A key
|
||||
|
||||
key[Home]=${terminfo[khome]}
|
||||
key[End]=${terminfo[kend]}
|
||||
key[Insert]=${terminfo[kich1]}
|
||||
key[Delete]=${terminfo[kdch1]}
|
||||
key[Up]=${terminfo[kcuu1]}
|
||||
key[Down]=${terminfo[kcud1]}
|
||||
key[Left]=${terminfo[kcub1]}
|
||||
key[Right]=${terminfo[kcuf1]}
|
||||
key[PageUp]=${terminfo[kpp]}
|
||||
key[PageDown]=${terminfo[knp]}
|
||||
|
||||
# setup key accordingly
|
||||
[[ -n "${key[Home]}" ]] && bindkey "${key[Home]}" beginning-of-line
|
||||
[[ -n "${key[End]}" ]] && bindkey "${key[End]}" end-of-line
|
||||
[[ -n "${key[Insert]}" ]] && bindkey "${key[Insert]}" overwrite-mode
|
||||
[[ -n "${key[Delete]}" ]] && bindkey "${key[Delete]}" delete-char
|
||||
[[ -n "${key[Up]}" ]] && bindkey "${key[Up]}" up-line-or-history
|
||||
[[ -n "${key[Down]}" ]] && bindkey "${key[Down]}" down-line-or-history
|
||||
[[ -n "${key[Left]}" ]] && bindkey "${key[Left]}" backward-char
|
||||
[[ -n "${key[Right]}" ]] && bindkey "${key[Right]}" forward-char
|
||||
|
||||
# Finally, make sure the terminal is in application mode, when zle is
|
||||
# active. Only then are the values from $terminfo valid.
|
||||
if [[ -n ${terminfo[smkx]} ]] && [[ -n ${terminfo[rmkx]} ]]; then
|
||||
function zle-line-init () {
|
||||
echoti smkx
|
||||
}
|
||||
function zle-line-finish () {
|
||||
echoti rmkx
|
||||
}
|
||||
zle -N zle-line-init
|
||||
zle -N zle-line-finish
|
||||
fi
|
||||
|
||||
zle -N fake-enter; bindkey "^X^H" fake-enter
|
||||
|
||||
#------------------------------ exports ------------------------------
|
||||
autoload -U up-line-or-beginning-search
|
||||
autoload -U down-line-or-beginning-search
|
||||
@@ -129,8 +88,9 @@ setopt hist_reduce_blanks # do not store blank lines.
|
||||
setopt histignorespace # do not store commands that start with a space in history
|
||||
|
||||
export HISTSIZE=5000
|
||||
export HISTFILESIZE=10000
|
||||
export HISTFILE=$ZDOTDIR/history
|
||||
export HISTFILESIZE=5000
|
||||
export SAVEHIST=5000
|
||||
export HISTFILE="$XDG_CONFIG_HOME/zsh/history"
|
||||
|
||||
#set -o vi
|
||||
|
||||
|
||||
Reference in New Issue
Block a user