Compare commits
No commits in common. "d7b812c91855d6949bb969811347917f777e59b0" and "b5b743baa5825d6ddb1df4dfd731ec7fbe9db05d" have entirely different histories.
d7b812c918
...
b5b743baa5
6 changed files with 205 additions and 9 deletions
|
@ -102,7 +102,7 @@ in {
|
||||||
plugins = with pkgs; [
|
plugins = with pkgs; [
|
||||||
{
|
{
|
||||||
name = "expand-multiple-dots";
|
name = "expand-multiple-dots";
|
||||||
src = ./zsh/expand-multiple-dots;
|
src = "${config.home.homeDirectory}/.dotfiles/zsh/expand-multiple-dots";
|
||||||
file = "expand-multiple-dots.zsh";
|
file = "expand-multiple-dots.zsh";
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
|
@ -153,14 +153,11 @@ in {
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
home.file = {
|
# We must source the p10k config.
|
||||||
# We must source the p10k config.
|
# TODO: We should manage the config via programs.zsh.plugins.
|
||||||
# TODO: We should manage the config via programs.zsh.plugins.
|
home.file.".p10k.zsh".source = "${config.home.homeDirectory}/.dotfiles/p10k.zsh";
|
||||||
".p10k.zsh".source = ./zsh/p10k.zsh;
|
# We'd also like to have the iTerm2 shell integration utilities in ~/.iterm2.
|
||||||
# We'd also like to have the iTerm2 shell integration utilities in ~/.iterm2.
|
home.file.".iterm2".source = "${iterm2_shell_integration}/utilities";
|
||||||
".iterm2".source = "${iterm2_shell_integration}/utilities";
|
|
||||||
};
|
|
||||||
|
|
||||||
programs.zsh.initExtra = ''
|
programs.zsh.initExtra = ''
|
||||||
source $HOME/.p10k.zsh
|
source $HOME/.p10k.zsh
|
||||||
|
|
4
dotfilesrc
Normal file
4
dotfilesrc
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
[dotfiles]
|
||||||
|
repository = ~/.dotfiles
|
||||||
|
ignore = ['.git']
|
||||||
|
packages = ['config']
|
17
gitconfig
Normal file
17
gitconfig
Normal file
|
@ -0,0 +1,17 @@
|
||||||
|
[filter "lfs"]
|
||||||
|
process = git-lfs filter-process
|
||||||
|
required = true
|
||||||
|
clean = git-lfs clean -- %f
|
||||||
|
smudge = git-lfs smudge -- %f
|
||||||
|
[user]
|
||||||
|
name = Spotlight
|
||||||
|
email = spotlight@joscomputing.space
|
||||||
|
signingkey = 6EF6CBB6420B81DA3CCACFEA874AA355B3209BDC
|
||||||
|
[commit]
|
||||||
|
gpgsign = true
|
||||||
|
[color]
|
||||||
|
ui = auto
|
||||||
|
[pull]
|
||||||
|
rebase = true
|
||||||
|
[init]
|
||||||
|
defaultBranch = main
|
19
vimrc
Normal file
19
vimrc
Normal file
|
@ -0,0 +1,19 @@
|
||||||
|
set nocompatible
|
||||||
|
filetype off
|
||||||
|
syntax on
|
||||||
|
set number
|
||||||
|
filetype plugin indent on
|
||||||
|
set backspace=indent,eol,start
|
||||||
|
|
||||||
|
" two-spaced tabs
|
||||||
|
set tabstop=2
|
||||||
|
set softtabstop=0
|
||||||
|
set shiftwidth=2
|
||||||
|
set noexpandtab
|
||||||
|
set smarttab
|
||||||
|
|
||||||
|
" custom filetypes
|
||||||
|
autocmd BufNewFile,BufRead *.plist set syntax=xml
|
||||||
|
|
||||||
|
" vim-airline
|
||||||
|
let g:airline_powerline_fonts = 1
|
159
zshrc
Normal file
159
zshrc
Normal file
|
@ -0,0 +1,159 @@
|
||||||
|
load_plugin() {
|
||||||
|
source ~/.zsh/$1/$1.plugin.zsh
|
||||||
|
}
|
||||||
|
|
||||||
|
# Things that modify
|
||||||
|
load_plugin "zsh-autosuggestions"
|
||||||
|
load_plugin "zsh-completions"
|
||||||
|
load_plugin "zsh-history-substring-search"
|
||||||
|
load_plugin "zsh-syntax-highlighting"
|
||||||
|
|
||||||
|
bindkey '^[[A' history-beginning-search-backward
|
||||||
|
bindkey '^[[B' history-beginning-search-forward
|
||||||
|
|
||||||
|
# Preserve opacity
|
||||||
|
# See: https://github.com/zsh-users/zsh-autosuggestions/issues/431#issuecomment-502329696
|
||||||
|
# Will most likely need removal at a point.
|
||||||
|
ZSH_AUTOSUGGEST_IGNORE_WIDGETS=(${(@)ZSH_AUTOSUGGEST_IGNORE_WIDGETS:#zle-\*} zle-\^line-init)
|
||||||
|
|
||||||
|
source $HOME/.zsh/expand-multiple-dots.zsh # cd .../.../<tab>?
|
||||||
|
setopt prompt_subst # Make sure prompt is able to be generated properly.
|
||||||
|
setopt auto_cd # Get that ~ in here.
|
||||||
|
setopt hist_ignore_all_dups # Goodbye, random duplicates.
|
||||||
|
setopt hist_ignore_space # ' ' more like ._.
|
||||||
|
setopt inc_append_history # Write it asap
|
||||||
|
setopt share_history # goodbye, out-of-sync cross-shell passwords
|
||||||
|
setopt auto_list # magic and things involving listing of items
|
||||||
|
setopt auto_menu # Use a menu because I'm _that_ type of person
|
||||||
|
|
||||||
|
source ~/.zsh/powerlevel10k/powerlevel10k.zsh-theme
|
||||||
|
source ~/.p10k.zsh
|
||||||
|
|
||||||
|
#########
|
||||||
|
# the env _essentials_
|
||||||
|
#########
|
||||||
|
export HISTFILE="$HOME/.zsh_history"
|
||||||
|
export HISTSIZE=5000
|
||||||
|
export SAVEHIST=$HISTSIZE
|
||||||
|
export PATH="${HOME}/bin:$PATH"
|
||||||
|
export GPG_TTY=$(tty)
|
||||||
|
|
||||||
|
# Android SDK
|
||||||
|
if [ -d ${HOME}/bin/android-sdk ]; then
|
||||||
|
export PATH="${HOME}/bin/android-sdk/platform-tools:${PATH}"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Go
|
||||||
|
if [ -d ${HOME}/go ]; then
|
||||||
|
export GOPATH=${HOME}/go
|
||||||
|
export PATH=${GOPATH}/bin:${PATH}
|
||||||
|
fi
|
||||||
|
|
||||||
|
# theos
|
||||||
|
if [ -d ${HOME}/.theos ]; then
|
||||||
|
export THEOS=${HOME}/.theos
|
||||||
|
export PATH=${THEOS}/bin:$PATH
|
||||||
|
fi
|
||||||
|
|
||||||
|
# devkitPro and the like
|
||||||
|
if [ -d /opt/devkitpro ]; then
|
||||||
|
export DEVKITPRO=/opt/devkitpro
|
||||||
|
export DEVKITARM=/opt/devkitpro/devkitARM
|
||||||
|
export DEVKITPPC=/opt/devkitpro/devkitPPC
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ $OSTYPE == darwin* ]]; then
|
||||||
|
# Under x86_64, we assume brew is in /usr/local.
|
||||||
|
# However, under arm64e, it may be under /opt/homebrew.
|
||||||
|
# Alternatively, the user may not have Homebrew installed
|
||||||
|
# whatsoever, in which nothing needs to be done.
|
||||||
|
# (By user, I mean me, and the occasional VM.)
|
||||||
|
if [ -f /usr/local/bin/brew ]; then
|
||||||
|
BREW_PREFIX="/usr/local"
|
||||||
|
BREW_FOUND=true
|
||||||
|
elif [ -f /opt/homebrew/bin/brew ]; then
|
||||||
|
BREW_PREFIX="/opt/homebrew"
|
||||||
|
BREW_FOUND=true
|
||||||
|
else
|
||||||
|
BREW_FOUND=false
|
||||||
|
fi
|
||||||
|
|
||||||
|
if $BREW_FOUND; then
|
||||||
|
# Ensure Homebrew can be found within the path.
|
||||||
|
eval $($BREW_PREFIX/bin/brew shellenv)
|
||||||
|
fi
|
||||||
|
|
||||||
|
# What about MacPorts?
|
||||||
|
if [ -d /opt/local ]; then
|
||||||
|
export PATH=/opt/local/bin:/opt/local/sbin:$PATH
|
||||||
|
export MANPATH=/opt/local/share/man:$MANPATH
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Under Darwin, we also want iTerm2 integration if possible.
|
||||||
|
if [ -f ${HOME}/.iterm2_shell_integration.zsh ]; then
|
||||||
|
source "${HOME}/.iterm2_shell_integration.zsh"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Personal preferences
|
||||||
|
export EDITOR=vim
|
||||||
|
export GO111MODULE=on
|
||||||
|
if [ -f $HOME/.keysrc ]; then
|
||||||
|
source $HOME/.keysrc
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Allow nix if possible
|
||||||
|
if [ -e '/nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh' ]; then
|
||||||
|
. '/nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh'
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Rust
|
||||||
|
if [ -d $HOME/.cargo/env ]; then
|
||||||
|
source $HOME/.cargo/env
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Haskell
|
||||||
|
if [ -d $HOME/.ghcup ]; then
|
||||||
|
export PATH="$HOME/.cabal/bin:$HOME/.ghcup/bin:$PATH"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Fastlane
|
||||||
|
if [ -d $HOME/.fastlane ]; then
|
||||||
|
export PATH="$HOME/.fastlane/bin:$PATH"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Haxe
|
||||||
|
if [ -d $BREW_PREFIX/lib/haxe ]; then
|
||||||
|
export HAXE_STD_PATH="$BREW_PREFIX/lib/haxe/std"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Prefer using the latest Swift toolchain installed if available.
|
||||||
|
if [ -d /Library/Developer/Toolchains/swift-latest.xctoolchain ]; then
|
||||||
|
export PATH="/Library/Developer/Toolchains/swift-latest.xctoolchain/usr/bin:$PATH"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Support mint (https://github.com/yonaskolb/Mint)
|
||||||
|
if [ -d $HOME/.mint/bin ]; then
|
||||||
|
export PATH="$HOME/.mint/bin:$PATH"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# RVM must be last.
|
||||||
|
if [ -d $HOME/.rvm ]; then
|
||||||
|
PATH=${PATH}:$HOME/.rvm/bin
|
||||||
|
source "$HOME/.rvm/scripts/rvm"
|
||||||
|
fi
|
||||||
|
|
||||||
|
autoload -Uz compinit
|
||||||
|
compinit
|
||||||
|
|
||||||
|
# Google Cloud tries to prematurely call compinit for completion.
|
||||||
|
# I don't want >1 second load times.
|
||||||
|
if [ -d ${HOME}/bin/google-cloud-sdk ]; then
|
||||||
|
source ${HOME}/bin/google-cloud-sdk/path.zsh.inc
|
||||||
|
source ${HOME}/bin/google-cloud-sdk/completion.zsh.inc
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Similarly for Scaleway...
|
||||||
|
if [ -d ${HOME}/.config/scw ]; then
|
||||||
|
eval "$(scw autocomplete script shell=zsh)"
|
||||||
|
fi
|
Loading…
Add table
Add a link
Reference in a new issue