# Add deno completions to search path if [[ ":$FPATH:" != *":/home/user/.zsh/completions:"* ]]; then export FPATH="/home/user/.zsh/completions:$FPATH"; fi # Enable Powerlevel10k instant prompt. Should stay close to the top of ~/.zshrc. # Initialization code that may require console input (password prompts, [y/n] # confirmations, etc.) must go above this block; everything else may go below. if [[ -r "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" ]]; then source "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" fi export GPG_TTY=$(tty) # alias conservation-on="echo 1 | sudo tee /sys/bus/platform/drivers/ideapad_acpi/VPC2004:00/conservation_mode" # alias conservation-off="echo 0 | sudo tee /sys/bus/platform/drivers/ideapad_acpi/VPC2004:00/conservation_mode" alias orphans="sudo pacman -Qtdq | sudo pacman -Rns -" alias v="nvim" alias conservation-on="sudo ectool chargecontrol normal 80 80" alias conservation-off="sudo ectool chargecontrol normal" # alias rec_a='wf-recorder --audio -g "$(slurp)"' # alias rec='wf-recorder -g "$(slurp)"' # alias scrivania-on="wget -O /dev/null -q 'http://192.168.1.129/?=on'" # alias scrivania-off="wget -O /dev/null -q 'http://192.168.1.129/?=off'" # Created by Zap installer [ -f "${XDG_DATA_HOME:-$HOME/.local/share}/zap/zap.zsh" ] && source "${XDG_DATA_HOME:-$HOME/.local/share}/zap/zap.zsh" plug "zsh-users/zsh-autosuggestions" plug "zap-zsh/supercharge" plug "zap-zsh/nvm" plug "zap-zsh/zap-prompt" plug "zsh-users/zsh-history-substring-search" # plug "zap-zsh/exa" plug "romkatv/powerlevel10k" plug "zsh-users/zsh-syntax-highlighting" # Load and initialise completion system autoload -Uz compinit compinit # To customize prompt, run `p10k configure` or edit ~/.p10k.zsh. [[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh # # Jump to first letter of previous word # bindkey '^[[1;5D' backward-word # # # Jump to first letter of next word or end of line # bindkey '^[[1;5C' forward-word # # Delete the following word # bindkey '^[[3;5~' kill-word # [Shift-Tab] - move through the completion menu backwards if [[ -n "${terminfo[kcbt]}" ]]; then bindkey -M emacs "${terminfo[kcbt]}" reverse-menu-complete bindkey -M viins "${terminfo[kcbt]}" reverse-menu-complete bindkey -M vicmd "${terminfo[kcbt]}" reverse-menu-complete fi # [Backspace] - delete backward bindkey -M emacs '^?' backward-delete-char bindkey -M viins '^?' backward-delete-char bindkey -M vicmd '^?' backward-delete-char # [Delete] - delete forward if [[ -n "${terminfo[kdch1]}" ]]; then bindkey -M emacs "${terminfo[kdch1]}" delete-char bindkey -M viins "${terminfo[kdch1]}" delete-char bindkey -M vicmd "${terminfo[kdch1]}" delete-char else bindkey -M emacs "^[[3~" delete-char bindkey -M viins "^[[3~" delete-char bindkey -M vicmd "^[[3~" delete-char bindkey -M emacs "^[3;5~" delete-char bindkey -M viins "^[3;5~" delete-char bindkey -M vicmd "^[3;5~" delete-char fi # [Ctrl-Delete] - delete whole forward-word bindkey -M emacs '^[[3;5~' kill-word bindkey -M viins '^[[3;5~' kill-word bindkey -M vicmd '^[[3;5~' kill-word # [Ctrl-RightArrow] - move forward one word bindkey -M emacs '^[[1;5C' forward-word bindkey -M viins '^[[1;5C' forward-word bindkey -M vicmd '^[[1;5C' forward-word # [Ctrl-LeftArrow] - move backward one word bindkey -M emacs '^[[1;5D' backward-word bindkey -M viins '^[[1;5D' backward-word bindkey -M vicmd '^[[1;5D' backward-word source /usr/share/nvm/init-nvm.sh