Re-add zsh dotfiles
This commit is contained in:
parent
9282101dfc
commit
679d2131b8
|
@ -0,0 +1,93 @@
|
||||||
|
if [ -f "${XDG_CONFIG_HOME:-$HOME/.config}/shell/aliasrc" ]; then
|
||||||
|
source "${XDG_CONFIG_HOME:-$HOME/.config}/shell/aliasrc"
|
||||||
|
fi
|
||||||
|
|
||||||
|
ZLE_REMOVE_SUFFIX_CHARS=$' \t\n;&'
|
||||||
|
|
||||||
|
ZSH_COMPDUMP="$XDG_CACHE_HOME"/zsh/zcompdump-"$HOST-$ZSH_VERSION"
|
||||||
|
|
||||||
|
zmodload zsh/complist
|
||||||
|
autoload -U compinit && compinit -d $ZSH_COMPDUMP
|
||||||
|
autoload -U colors && colors
|
||||||
|
|
||||||
|
zstyle ':completion:*' menu select
|
||||||
|
zstyle ':completion:*' list-colors ${(s.:.)LS_COLORS} ma=0\;33
|
||||||
|
zstyle ':completion:*' squeeze-slashes false
|
||||||
|
|
||||||
|
setopt EXTENDED_HISTORY
|
||||||
|
setopt INC_APPEND_HISTORY
|
||||||
|
setopt SHARE_HISTORY
|
||||||
|
setopt HIST_SAVE_NO_DUPS
|
||||||
|
setopt HIST_IGNORE_ALL_DUPS
|
||||||
|
setopt HIST_IGNORE_SPACE
|
||||||
|
setopt globdots
|
||||||
|
setopt extended_glob
|
||||||
|
setopt menu_complete
|
||||||
|
setopt no_case_glob no_case_match
|
||||||
|
setopt interactive_comments
|
||||||
|
|
||||||
|
bindkey -v
|
||||||
|
|
||||||
|
zle-keymap-select () {
|
||||||
|
case $KEYMAP in
|
||||||
|
vicmd) echo -ne '\e[1 q';;
|
||||||
|
viins|main) echo -ne '\e[5 q';;
|
||||||
|
esac
|
||||||
|
}
|
||||||
|
|
||||||
|
zle -N zle-keymap-select
|
||||||
|
|
||||||
|
zle-line-init() {
|
||||||
|
zle -K viins
|
||||||
|
echo -ne "\e[5 q"
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
zle -N zle-line-init
|
||||||
|
|
||||||
|
echo -ne '\e[5 q'
|
||||||
|
preexec() { echo -ne '\e[5 q' ;}
|
||||||
|
|
||||||
|
bindkey -M menuselect 'h' vi-backward-char
|
||||||
|
bindkey -M menuselect 'k' vi-up-line-or-history
|
||||||
|
bindkey -M menuselect 'j' vi-down-line-or-history
|
||||||
|
bindkey -M menuselect 'l' vi-forward-char
|
||||||
|
|
||||||
|
autoload -U edit-command-line
|
||||||
|
zle -N edit-command-line
|
||||||
|
bindkey '^E' edit-command-line
|
||||||
|
bindkey -M vicmd '^e' edit-command-line
|
||||||
|
bindkey -M vicmd '^[[P' vi-delete-char
|
||||||
|
bindkey -M visual '^[[P' vi-delete
|
||||||
|
|
||||||
|
bindkey "^H" backward-delete-char
|
||||||
|
bindkey "^?" backward-delete-char
|
||||||
|
|
||||||
|
bindkey "^R" history-incremental-search-backward
|
||||||
|
|
||||||
|
#autoload -U history-search-end
|
||||||
|
#zle -N history-beginning-search-backward-end history-search-end
|
||||||
|
#zle -N history-beginning-search-forward-end history-search-end
|
||||||
|
#bindkey "^[[A" history-beginning-search-backward-end
|
||||||
|
#bindkey "^[[B" history-beginning-search-forward-end
|
||||||
|
|
||||||
|
bindkey "^[[A" history-search-backward
|
||||||
|
bindkey "^[[B" history-search-forward
|
||||||
|
|
||||||
|
bindkey '^[[P' delete-char
|
||||||
|
|
||||||
|
# bindkey "^[[3~" delete-char
|
||||||
|
|
||||||
|
#function zle-line-finish () { echoti rmkx }
|
||||||
|
#zle -N zle-line-finish
|
||||||
|
|
||||||
|
#bindkey -s '^f' 'cd "$(dirname "$(fzf)")"\n'
|
||||||
|
#bindkey -s '^o' 'xdg-open "$(fzf)"\n'
|
||||||
|
|
||||||
|
bracketed-paste() {
|
||||||
|
zle .$WIDGET && LBUFFER=${LBUFFER%$'\n'}
|
||||||
|
}
|
||||||
|
|
||||||
|
zle -N bracketed-paste
|
||||||
|
|
||||||
|
eval "$(starship init zsh)"
|
|
@ -0,0 +1,72 @@
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
export EDITOR=nvim
|
||||||
|
export TERM=st-256color
|
||||||
|
export TERMINAL=st
|
||||||
|
export TERMINAL_PROG=st
|
||||||
|
export BROWSER=librewolf
|
||||||
|
export PAGER='nvimpager -p'
|
||||||
|
export PODMAN_COMPOSE_PROVIDER=podman-compose
|
||||||
|
|
||||||
|
export CM_SELECTIONS="clipboard"
|
||||||
|
export CM_DEBUG=1
|
||||||
|
export CM_OUTPUT_CLIP=0
|
||||||
|
export CM_MAX_CLIPS=10000
|
||||||
|
export CM_IGNORE_WINDOW="Bitwarden|KeePass"
|
||||||
|
export _JAVA_AWT_WM_NONREPARENTING=1
|
||||||
|
export QT_QPA_PLATFORMTHEME=gtk2
|
||||||
|
export DOTNET_SYSTEM_GLOBALIZATION_INVARIANT=1
|
||||||
|
|
||||||
|
export XDG_CONFIG_HOME="$HOME"/.config
|
||||||
|
export XDG_CACHE_HOME="$HOME"/.cache
|
||||||
|
export XDG_DATA_HOME="$HOME"/.local/share
|
||||||
|
export XDG_STATE_HOME="$HOME"/.local/state
|
||||||
|
|
||||||
|
export CM_DIR="$XDG_CACHE_HOME"/clipmenu
|
||||||
|
export GOPATH="$XDG_CONFIG_HOME"/go
|
||||||
|
export R_HOME_USER="$XDG_CONFIG_HOME"/R
|
||||||
|
export R_PROFILE_USER="$XDG_CONFIG_HOME"/R/.Rprofile
|
||||||
|
export R_LIBS_USER="$XDG_CONFIG_HOME"/R/library
|
||||||
|
export R_HISTFILE="$XDG_CONFIG_HOME"/R/.Rhistory
|
||||||
|
export CARGO_HOME="$XDG_DATA_HOME"/cargo
|
||||||
|
export CUDA_CACHE_PATH="$XDG_CACHE_HOME"/nv
|
||||||
|
#export GNUPGHOME="$XDG_DATA_HOME"/gnupg
|
||||||
|
export GRADLE_USER_HOME="$XDG_DATA_HOME"/gradle
|
||||||
|
export GTK2_RC_FILES="$XDG_CONFIG_HOME"/gtk-2.0/gtkrc
|
||||||
|
export XCURSOR_PATH=/usr/share/icons:"$XDG_DATA_HOME"/icons
|
||||||
|
export LESSHISTFILE="$XDG_CACHE_HOME"/less/history
|
||||||
|
export TERMINFO="$XDG_DATA_HOME"/terminfo
|
||||||
|
export TERMINFO_DIRS="$XDG_DATA_HOME"/terminfo:/usr/share/terminfo
|
||||||
|
export NPM_CONFIG_USERCONFIG="$XDG_CONFIG_HOME"/npm/npmrc
|
||||||
|
export NVM_DIR="$XDG_DATA_HOME"/nvm
|
||||||
|
export PASSWORD_STORE_DIR="$XDG_DATA_HOME"/pass
|
||||||
|
export PSQL_HISTORY="$XDG_DATA_HOME"/psql_history
|
||||||
|
export ZDOTDIR="$XDG_CONFIG_HOME"/zsh
|
||||||
|
export BUNDLE_USER_CONFIG="$XDG_CONFIG_HOME"/bundle
|
||||||
|
export BUNDLE_USER_CACHE="$XDG_CACHE_HOME"/bundle
|
||||||
|
export BUNDLE_USER_PLUGIN="$XDG_DATA_HOME"/bundle
|
||||||
|
export NUGET_PACKAGES="$XDG_CACHE_HOME"/NuGetPackages
|
||||||
|
export DOCKER_CONFIG="$XDG_CONFIG_HOME"/docker
|
||||||
|
export MINIKUBE_HOME="$XDG_DATA_HOME"/minikube
|
||||||
|
export SSH_AUTH_SOCK="$XDG_RUNTIME_DIR"/gcr/ssh
|
||||||
|
export XINITRC="$XDG_CONFIG_HOME"/x11/xinitrc
|
||||||
|
export ANDROID_USER_HOME="$XDG_DATA_HOME"/android
|
||||||
|
export W3M_DIR="$XDG_DATA_HOME"/w3m
|
||||||
|
export PARALLEL_HOME="$XDG_CONFIG_HOME"/parallel
|
||||||
|
export INPUTRC="$XDG_CONFIG_HOME/shell/inputrc"
|
||||||
|
export XINITRC="$XDG_CONFIG_HOME"/X11/xinitrc
|
||||||
|
|
||||||
|
export PATH="$HOME/.local/bin:$PATH"
|
||||||
|
|
||||||
|
export HISTFILE="$XDG_CACHE_HOME"/zsh/history
|
||||||
|
export HISTSIZE=10000000
|
||||||
|
export SAVEHIST=10000000
|
||||||
|
#export HISTCONTROL=erasedups:ignoreboth
|
||||||
|
|
||||||
|
if grep -q "i5" /proc/cpuinfo; then
|
||||||
|
export LAPTOP=""
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ -z $DISPLAY ]] && [[ $(tty) = /dev/tty1 ]]; then
|
||||||
|
exec startx &> /dev/null
|
||||||
|
fi
|
Loading…
Reference in New Issue