dotfiles/.zshrc

108 lines
3.2 KiB
Bash
Raw Normal View History

2024-03-26 02:18:38 -05:00
# 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
# Lines configured by zsh-newuser-install
HISTFILE=~/.histfile
HISTSIZE=1000
SAVEHIST=1000
# End of lines configured by zsh-newuser-install
# The following lines were added by compinstall
zstyle :compinstall filename '/home/trianta/.zshrc'
autoload -Uz compinit
compinit
# End of lines added by compinstall
zstyle ':completion:*' matcher-list 'm:{a-z}={A-Za-z}'
# To customize prompt, run `p10k configure` or edit ~/.p10k.zsh.
[[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh
# Alias
2024-06-25 03:42:35 -05:00
alias -g vi="nvim"
alias -g vim="nvim"
2024-09-14 00:03:39 -05:00
alias -g cmakegd="cmake -B build -S . -DCMAKE_BUILD_TYPE:STRING=Debug"
alias -g cmakeg="cmake -B build -S ."
alias -g cmakeb="cmake --build build -j $(nproc)"
2024-06-25 03:42:35 -05:00
alias -g pcore="taskset -c 1-7"
alias -g a="notify"
alias -g af="taskset -c 0-19 notify"
2025-02-04 07:24:53 -06:00
alias -g tm="tmux new -A -s"
2024-03-26 02:18:38 -05:00
# Plugins from AUR
source /usr/share/zsh-theme-powerlevel10k/powerlevel10k.zsh-theme
source /usr/share/zsh/plugins/zsh-autosuggestions/zsh-autosuggestions.zsh
source /usr/share/zsh/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
source /usr/share/zsh/plugins/zsh-history-substring-search/zsh-history-substring-search.zsh
# Enable color support
if [ -x /usr/bin/dircolors ]; then
test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dircolors -b)"
alias l='ls -la --color -h --group-directories-first'
alias ls='ls --color -h --group-directories-first'
alias dir='dir --color=auto'
alias vdir='vdir --color=auto'
alias grep='grep --color=auto'
alias fgrep='fgrep --color=auto'
alias egrep='egrep --color=auto'
fi
# Hyprland login
alias hy='Hyprland'
# Export ~/.config path
export XDG_CONFIG_HOME="$HOME/.config"
# Created by `pipx` on 2023-10-16 08:33:15
export PATH="$PATH:/home/trianta/.local/bin"
# Little neat settings
set colored-stats On
set completion-ignore-case On
set completion-prefix-display-length 3
set mark-symlinked-directories On
set show-all-if-ambiguous On
set show-all-if-unmodified On
set visible-stats On
# Keyboard binds
# common
bindkey "^L" forward-word
2024-03-26 02:18:38 -05:00
bindkey "^[[H" beginning-of-line
bindkey "^[[F" end-of-line
2024-03-26 02:18:38 -05:00
bindkey "^[[3~" delete-char
# Alacritty
2024-09-14 00:03:39 -05:00
bindkey "^B" beginning-of-line
bindkey "^E" end-of-line
bindkey ";3D" backward-word
bindkey ";3C" forward-word
bindkey ";5D" backward-word
bindkey ";5C" forward-word
bindkey "^H" backward-word
bindkey '^K' history-substring-search-up
bindkey '^J' history-substring-search-down
2024-09-14 00:03:39 -05:00
# cool-retro-term
#bindkey '^K' history-substring-search-up
#bindkey '^J' history-substring-search-down
#bindkey '^H' backward-delete-char
#bindkey '^B' backward-word
#bindkey '^W' forward-word
2024-03-26 02:18:38 -05:00
# Set default editor
export EDITOR="nvim"
# Global CMake clangd fix
export CMAKE_EXPORT_COMPILE_COMMANDS=1
2024-09-14 00:03:39 -05:00
2025-02-04 07:24:53 -06:00
[[ "$(tty)" == /dev/tty1 ]] && Hyprland
2024-09-14 00:03:39 -05:00
$(&>/dev/null pw-play --volume=2.0 ~/.alert/ready.mp3 &)