mirror of
https://github.com/ivuorinen/dotfiles.git
synced 2026-02-01 14:47:31 +00:00
Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| fef9398a86 | |||
| c37df72f12 | |||
|
|
45a2330425 |
@@ -1 +0,0 @@
|
|||||||
ZDOTDIR=~/.config/zsh
|
|
||||||
58
base/zshrc
58
base/zshrc
@@ -1,10 +1,60 @@
|
|||||||
# Fig pre block. Keep at the top of this file.
|
|
||||||
[[ -f "$HOME/.fig/shell/zshrc.pre.zsh" ]] && builtin source "$HOME/.fig/shell/zshrc.pre.zsh"
|
|
||||||
# this is my zsh config. there are many like it, but this one is mine.
|
# this is my zsh config. there are many like it, but this one is mine.
|
||||||
# shellcheck shell=bash
|
# shellcheck shell=bash
|
||||||
|
|
||||||
export ZDOTDIR="$HOME/.config/zsh/"
|
# Fig pre block. Keep at the top of this file.
|
||||||
mkdir -p "$ZDOTDIR"
|
[[ -f "$HOME/.fig/shell/zshrc.pre.zsh" ]] && builtin source "$HOME/.fig/shell/zshrc.pre.zsh"
|
||||||
|
|
||||||
|
autoload -U colors zsh/terminfo
|
||||||
|
colors
|
||||||
|
setopt correct
|
||||||
|
|
||||||
|
# Add completion scripts to zsh path
|
||||||
|
FPATH="~/.config/zsh/completion:$FPATH"
|
||||||
|
autoload -Uz compinit && compinit -i
|
||||||
|
compinit -d "$XDG_CACHE_HOME"/zsh/zcompdump-"$ZSH_VERSION"
|
||||||
|
|
||||||
|
# Defaults
|
||||||
|
export DOTFILES="$HOME/.dotfiles"
|
||||||
|
# shellcheck source=shared.sh
|
||||||
|
source "$DOTFILES/scripts/shared.sh"
|
||||||
|
|
||||||
|
# Run x-load-configs in your terminal to reload the files.
|
||||||
|
function x-load-configs()
|
||||||
|
{
|
||||||
|
# Load the shell dotfiles, and then some:
|
||||||
|
for file in $DOTFILES/config/{exports,alias,functions}; do
|
||||||
|
[ -f "$file" ] && source "$file"
|
||||||
|
[ -f "$file-secret" ] && source "$file-secret"
|
||||||
|
[ -f "$file-$HOSTNAME" ] && source "$file-$HOSTNAME"
|
||||||
|
[ -f "$file-$HOSTNAME-secret" ] && source "$file-$HOSTNAME-secret"
|
||||||
|
done
|
||||||
|
}
|
||||||
|
x-load-configs
|
||||||
|
|
||||||
|
# Import ssh keys in keychain
|
||||||
|
ssh-add -A 2>/dev/null;
|
||||||
|
|
||||||
|
# Try to load antigen, if present
|
||||||
|
ANTIGEN_ZSH_PATH="$XDG_BIN_HOME/antigen.zsh"
|
||||||
|
[[ -f "$ANTIGEN_ZSH_PATH" ]] && source "$ANTIGEN_ZSH_PATH"
|
||||||
|
|
||||||
|
# antigen is present
|
||||||
|
have antigen && {
|
||||||
|
antigen use oh-my-zsh
|
||||||
|
|
||||||
|
# config/functions
|
||||||
|
x-default-antigen-bundles
|
||||||
|
|
||||||
|
antigen apply
|
||||||
|
}
|
||||||
|
|
||||||
|
# starship is present
|
||||||
|
have starship && eval "$(starship init zsh)"
|
||||||
|
|
||||||
|
[ -f "${XDG_CONFIG_HOME:-$HOME/.config}"/fzf/fzf.zsh ] \
|
||||||
|
&& source "${XDG_CONFIG_HOME:-$HOME/.config}"/fzf/fzf.zsh
|
||||||
|
|
||||||
|
export LESSHISTFILE="$XDG_CACHE_HOME"/less_history
|
||||||
|
|
||||||
# Fig post block. Keep at the bottom of this file.
|
# Fig post block. Keep at the bottom of this file.
|
||||||
[[ -f "$HOME/.fig/shell/zshrc.post.zsh" ]] && builtin source "$HOME/.fig/shell/zshrc.post.zsh"
|
[[ -f "$HOME/.fig/shell/zshrc.post.zsh" ]] && builtin source "$HOME/.fig/shell/zshrc.post.zsh"
|
||||||
|
|||||||
@@ -55,6 +55,11 @@ if [[ $(uname) == 'Darwin' ]]; then
|
|||||||
alias emptytrash="sudo rm -rfv /Volumes/*/.Trashes; sudo rm -rfv ~/.Trash; sudo rm -rfv /private/var/log/asl/*.asl"
|
alias emptytrash="sudo rm -rfv /Volumes/*/.Trashes; sudo rm -rfv ~/.Trash; sudo rm -rfv /private/var/log/asl/*.asl"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# tmux: automatically attach or create session with name 'main'
|
||||||
|
alias tmux='tmux new-session -A -s main'
|
||||||
|
# tmux: attach or create new session
|
||||||
|
alias ta='tmux attach || tmux'
|
||||||
|
|
||||||
# watch with: differences, precise, beep and color
|
# watch with: differences, precise, beep and color
|
||||||
alias watchx='watch -dpbc'
|
alias watchx='watch -dpbc'
|
||||||
# delete .DS_Store files
|
# delete .DS_Store files
|
||||||
|
|||||||
Submodule config/nvim updated: 382b8989f5...ffaa3877f0
@@ -1,52 +0,0 @@
|
|||||||
autoload -U colors zsh/terminfo
|
|
||||||
colors
|
|
||||||
setopt correct
|
|
||||||
|
|
||||||
# Add completion scripts to zsh path
|
|
||||||
FPATH="~/.config/zsh/completion:$FPATH"
|
|
||||||
autoload -Uz compinit && compinit -i
|
|
||||||
compinit -d "$XDG_CACHE_HOME"/zsh/zcompdump-"$ZSH_VERSION"
|
|
||||||
|
|
||||||
# Defaults
|
|
||||||
export DOTFILES="$HOME/.dotfiles"
|
|
||||||
# shellcheck source=shared.sh
|
|
||||||
source "$DOTFILES/scripts/shared.sh"
|
|
||||||
|
|
||||||
# Run x-load-configs in your terminal to reload the files.
|
|
||||||
function x-load-configs()
|
|
||||||
{
|
|
||||||
# Load the shell dotfiles, and then some:
|
|
||||||
for file in $DOTFILES/config/{exports,alias,functions}; do
|
|
||||||
[ -f "$file" ] && source "$file"
|
|
||||||
[ -f "$file-secret" ] && source "$file-secret"
|
|
||||||
[ -f "$file-$HOSTNAME" ] && source "$file-$HOSTNAME"
|
|
||||||
[ -f "$file-$HOSTNAME-secret" ] && source "$file-$HOSTNAME-secret"
|
|
||||||
done
|
|
||||||
}
|
|
||||||
x-load-configs
|
|
||||||
|
|
||||||
# Import ssh keys in keychain
|
|
||||||
ssh-add -A 2>/dev/null;
|
|
||||||
|
|
||||||
# Try to load antigen, if present
|
|
||||||
ANTIGEN_ZSH_PATH="$XDG_BIN_HOME/antigen.zsh"
|
|
||||||
[[ -f "$ANTIGEN_ZSH_PATH" ]] && source "$ANTIGEN_ZSH_PATH"
|
|
||||||
|
|
||||||
# antigen is present
|
|
||||||
have antigen && {
|
|
||||||
antigen use oh-my-zsh
|
|
||||||
|
|
||||||
# config/functions
|
|
||||||
x-default-antigen-bundles
|
|
||||||
|
|
||||||
antigen apply
|
|
||||||
}
|
|
||||||
|
|
||||||
# starship is present
|
|
||||||
have starship && eval "$(starship init zsh)"
|
|
||||||
|
|
||||||
[ -f "${XDG_CONFIG_HOME:-$HOME/.config}"/fzf/fzf.zsh ] \
|
|
||||||
&& source "${XDG_CONFIG_HOME:-$HOME/.config}"/fzf/fzf.zsh
|
|
||||||
|
|
||||||
export LESSHISTFILE="$XDG_CACHE_HOME"/less_history
|
|
||||||
|
|
||||||
Reference in New Issue
Block a user