You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

78 lines
2.4 KiB
Bash

#!/bin/zsh
# 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
# 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/zap-prompt"
plug "romkatv/powerlevel10k"
plug "embeddedpenguin/sanekeybinds"
plug "wintermi/zsh-lsd"
# Load and initialise completion system
autoload -Uz compinit
compinit
export ARM_TOOLCHAIN="$HOME/Documents/toolchains/arm-gnu-toolchain-11.3.rel1-x86_64-arm-none-eabi/bin"
export ARM_TOOLCHAIN_HF="$HOME/Documents/toolchains/arm-gnu-toolchain-11.3.rel1-x86_64-arm-none-linux-gnueabihf/bin"
zstyle ':completion::complete:*' use-cache 1
zstyle ':completion:*' insert-tab false
setopt noautomenu
setopt nomenucomplete
LS_COLORS="$(vivid generate dracula)"
export LS_COLORS
setopt globdots
zstyle ':completion:*' list-colors ${(s.:.)LS_COLORS}
export EDITOR="launch_ttyemacs.sh"
export VISUAL="launch_emacs.sh"
zle_highlight=(default:bold,fg=white)
function cformat()
{
find . -regex '.*\.\(cpp\|hpp\|cc\|cxx\|c\)' -exec clang-format -style=file -i {} \;
}
autoload -U select-word-style
select-word-style bash
# To customize prompt, run `p10k configure` or edit ~/.p10k.zsh.
[[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh
# plug "zsh-users/zsh-syntax-highlighting"
HISTFILE=~/.histfile
HISTSIZE=4096
SAVEHIST=4096
setopt appendhistory
if [[ -f ~/.bash_sources ]]; then
. $HOME/.bash_sources
fi
if [[ -f ~/.bash_aliases ]] ; then
. $HOME/.bash_aliases
fi
if [[ -f ~/.localrc ]] ; then
. $HOME/.localrc
elif [[ -d "$HOME/.local/var/log" ]]; then
echo "$HOME/.localrc not found. Have you created it yet?" | gawk '{ print strftime("[%Y-%m-%d %H:%M:%S]"), $0 }' >> ~/.local/var/log/localrc.log
else
mkdir -p ~/.local/var/log
echo "$HOME/.localrc not found. Have you created it yet?" | gawk '{ print strftime("[%Y-%m-%d %H:%M:%S]"), $0 }' >> ~/.local/var/log/localrc.log
fi
export GPG_TTY=$TTY
if [[ -z "$SSH_AUTH_SOCK" ]]; then
eval $(ssh-agent) >/dev/null
fi