mirror of
https://github.com/ivuorinen/dotfiles.git
synced 2026-01-31 17:47:06 +00:00
Compare commits
6 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| b563ba5cd0 | |||
| f357d23559 | |||
|
|
b183fcbdb2 | ||
| 17ce1c6ee6 | |||
| 66de4b3323 | |||
| b55c1a17ba |
Submodule config/nvim updated: e9855e4842...e283d6749f
@@ -13,8 +13,8 @@ disabled = true
|
|||||||
|
|
||||||
[git_branch]
|
[git_branch]
|
||||||
symbol = '🌱 '
|
symbol = '🌱 '
|
||||||
truncation_length = 4
|
truncation_length = 20
|
||||||
truncation_symbol = ''
|
truncation_symbol = '…'
|
||||||
ignore_branches = ['master', 'main']
|
ignore_branches = ['master', 'main']
|
||||||
|
|
||||||
[git_status]
|
[git_status]
|
||||||
|
|||||||
@@ -1,33 +1,72 @@
|
|||||||
PATH=$HOME/.local/bin:$HOME/bin:$HOME/.gem/bin:$HOME/.rvm/bin:/usr/local/bin:/usr/sbin:/usr/bin:$PATH
|
# Lakka zsh configuration.
|
||||||
|
#
|
||||||
|
# shellcheck shell=bash
|
||||||
|
export PATH="/usr/local/bin:/usr/bin:/usr/sbin:$PATH"
|
||||||
|
|
||||||
|
# Defaults
|
||||||
|
export DOTFILES="$HOME/.dotfiles"
|
||||||
|
|
||||||
|
# Explicitly set XDG folders
|
||||||
|
# https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html
|
||||||
|
export XDG_DATA_HOME="$HOME/.local/share"
|
||||||
|
export XDG_CONFIG_HOME="$HOME/.config"
|
||||||
|
export XDG_STATE_HOME="$HOME/.local/state"
|
||||||
|
export XDG_BIN_HOME="$HOME/.local/bin" # this one is custom
|
||||||
|
|
||||||
|
# z, https://github.com/rupa/z
|
||||||
|
export _Z_DATA="$XDG_STATE_HOME/z"
|
||||||
|
|
||||||
|
# composer, https://getcomposer.org/
|
||||||
|
if command -v composer &> /dev/null; then
|
||||||
|
export COMPOSER_HOME="$XDG_STATE_HOME/composer"
|
||||||
|
export COMPOSER_BIN="$COMPOSER_HOME/vendor/bin"
|
||||||
|
export PATH="$COMPOSER_BIN:$PATH"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# gem, rubygems
|
||||||
|
if command -v gem &>/dev/null; then
|
||||||
|
export GEM_HOME="$XDG_STATE_HOME/gem"
|
||||||
|
export PATH="$GEM_HOME/bin:$PATH"
|
||||||
|
fi
|
||||||
|
|
||||||
|
export PATH="$XDG_BIN_HOME:$HOME/bin:$HOME/.rvm/bin:$PATH"
|
||||||
export LC_ALL=fi_FI.utf8
|
export LC_ALL=fi_FI.utf8
|
||||||
|
|
||||||
source $HOME/.local/bin/antigen
|
# Antigen configuration
|
||||||
|
# https://github.com/zsh-users/antigen/wiki/Configuration
|
||||||
|
export ADOTDIR="$XDG_DATA_HOME/antigen"
|
||||||
|
export ANTIGEN_SYSTEM_RECEIPT_F=".local/share/antigen/antigen_system_lastupdate"
|
||||||
|
export ANTIGEN_PLUGIN_RECEIPT_F=".local/share/antigen/antigen_plugin_lastupdate"
|
||||||
|
|
||||||
antigen use oh-my-zsh
|
# Try to load antigen, if present
|
||||||
|
[[ -f "$XDG_BIN_HOME/antigen.zsh" ]] && source "$XDG_BIN_HOME/antigen.zsh"
|
||||||
|
|
||||||
antigen bundle git
|
# If antigen was loaded
|
||||||
antigen bundle php
|
if command -v antigen &> /dev/null; then
|
||||||
# antigen bundle rvm
|
antigen use oh-my-zsh
|
||||||
antigen bundle autojump
|
|
||||||
antigen bundle command-not-found
|
|
||||||
antigen bundle jreese/zsh-titles
|
|
||||||
antigen bundle zsh-users/zsh-syntax-highlighting
|
|
||||||
antigen bundle zsh-users/zsh-completions
|
|
||||||
antigen bundle unixorn/rvm-plugin
|
|
||||||
antigen bundle unixorn/autoupdate-antigen.zshplugin
|
|
||||||
|
|
||||||
antigen theme oskarkrawczyk/honukai-iterm-zsh honukai
|
hash git 2>/dev/null && antigen bundle git
|
||||||
|
hash php 2>/dev/null && antigen bundle php
|
||||||
|
|
||||||
antigen apply
|
antigen bundle autojump
|
||||||
|
antigen bundle command-not-found
|
||||||
|
antigen bundle jreese/zsh-titles
|
||||||
|
antigen bundle zsh-users/zsh-syntax-highlighting
|
||||||
|
antigen bundle zsh-users/zsh-completions
|
||||||
|
antigen bundle unixorn/rvm-plugin
|
||||||
|
antigen bundle unixorn/autoupdate-antigen.zshplugin
|
||||||
|
|
||||||
|
antigen theme oskarkrawczyk/honukai-iterm-zsh honukai
|
||||||
|
|
||||||
|
antigen apply
|
||||||
|
fi
|
||||||
|
|
||||||
alias t='tail -f'
|
alias t='tail -f'
|
||||||
alias logrotate='/usr/sbin/logrotate -s $HOME/logs/state'
|
alias logrotate='/usr/sbin/logrotate -s $HOME/logs/state'
|
||||||
alias dn='du -chd1'
|
alias dn='du -chd1'
|
||||||
alias nano='nano -wS -$'
|
alias nano='nano -wS -$'
|
||||||
alias cat=bat
|
|
||||||
alias gpg=gpg2
|
alias gpg=gpg2
|
||||||
|
|
||||||
PATH=$PATH:$HOME/.rvm/bin # Add RVM to PATH for scripting
|
export PATH="$PATH:$HOME/.rvm/bin" # Add RVM to PATH for scripting
|
||||||
[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm" ]] # Load RVM into a shell session *as a function*
|
[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm" ]] # Load RVM into a shell session *as a function*
|
||||||
. "/home/users/viir/.acme.sh/acme.sh.env"
|
. "$HOME/.acme.sh/acme.sh.env"
|
||||||
|
|||||||
@@ -26,16 +26,15 @@ function section_reset
|
|||||||
;;
|
;;
|
||||||
nvim)
|
nvim)
|
||||||
rm -rf ~/.local/share/nvim ~/.local/state/nvim ~/.cache/nvim ~/.config/astronvim ~/.config/nvim
|
rm -rf ~/.local/share/nvim ~/.local/state/nvim ~/.cache/nvim ~/.config/astronvim ~/.config/nvim
|
||||||
msg_done "Deleted old nvim files"
|
msg_ok "Deleted old nvim files"
|
||||||
ln -s ~/.dotfiles/config/astronvim ~/.config/astronvim
|
ln -s ~/.dotfiles/config/astronvim ~/.config/astronvim
|
||||||
ln -s ~/.dotfiles/config/nvim ~/.config/nvim
|
ln -s ~/.dotfiles/config/nvim ~/.config/nvim
|
||||||
msg_done "Linked nvim and astronvim"
|
msg_ok "Linked nvim and astronvim"
|
||||||
$0 install brew
|
$0 install brew
|
||||||
$0 install ext_go
|
$0 install ext_go
|
||||||
$0 install ext_npm
|
$0 install ext_npm
|
||||||
msg_done "Installed brew, and packages for go and npm"
|
msg_ok "Installed brew, and packages for go and npm"
|
||||||
nvim --headless -c 'autocmd User PackerComplete quitall'
|
msg_done "...and we are done!"
|
||||||
msg_done "Installed nvim packages and we are now ready"
|
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
menu_section "$USAGE_PREFIX" "all | nvim"
|
menu_section "$USAGE_PREFIX" "all | nvim"
|
||||||
|
|||||||
66
zshrc
66
zshrc
@@ -1,21 +1,28 @@
|
|||||||
# 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"
|
|
||||||
# shellcheck shell=bash
|
# shellcheck shell=bash
|
||||||
|
|
||||||
autoload -U colors zsh/terminfo
|
autoload -U colors zsh/terminfo
|
||||||
colors
|
colors
|
||||||
|
|
||||||
export HOMEBREW="/opt/homebrew"
|
# Defaults
|
||||||
export DOTFILES="$HOME/.dotfiles"
|
export DOTFILES="$HOME/.dotfiles"
|
||||||
export PATH="$HOMEBREW/opt/ruby/bin:$HOMEBREW/bin:$HOMEBREW/sbin:/usr/local/sbin:$PATH"
|
|
||||||
export HOMEBREW_NO_ENV_HINTS=1
|
|
||||||
|
|
||||||
# Explicitely set XDG folders
|
# Explicitly set XDG folders
|
||||||
# https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html
|
# https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html
|
||||||
export XDG_DATA_HOME="$HOME/.local/share"
|
export XDG_DATA_HOME="$HOME/.local/share"
|
||||||
export XDG_CONFIG_HOME="$HOME/.config"
|
export XDG_CONFIG_HOME="$HOME/.config"
|
||||||
export XDG_STATE_HOME="$HOME/.local/state"
|
export XDG_STATE_HOME="$HOME/.local/state"
|
||||||
|
export XDG_BIN_HOME="$HOME/.local/bin" # this one is custom
|
||||||
|
|
||||||
|
# Homebrew configuration
|
||||||
|
export HOMEBREW="/opt/homebrew"
|
||||||
|
export HOMEBREW_BIN="$HOMEBREW/bin"
|
||||||
|
export HOMEBREW_SBIN="$HOMEBREW/sbin"
|
||||||
|
export HOMEBREW_PKG="$HOMEBREW/opt"
|
||||||
|
export HOMEBREW_NO_ENV_HINTS=1
|
||||||
|
|
||||||
|
export PATH="$XDG_BIN_HOME:$HOMEBREW_BIN:$HOMEBREW_SBIN:/usr/local/sbin:$PATH"
|
||||||
|
|
||||||
|
# brew, https://brew.sh
|
||||||
if [ command -v brew &> /dev/null ]; then
|
if [ command -v brew &> /dev/null ]; then
|
||||||
BREW_BIN=$(brew --prefix)/bin
|
BREW_BIN=$(brew --prefix)/bin
|
||||||
BREW_SBIN=$(brew --prefix)/sbin
|
BREW_SBIN=$(brew --prefix)/sbin
|
||||||
@@ -40,22 +47,38 @@ if command -v nvim &> /dev/null; then
|
|||||||
export EDITOR="nvim"
|
export EDITOR="nvim"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
LOCAL_BIN="$HOME/.local/bin"
|
# z, https://github.com/rupa/z
|
||||||
COMPOSER_DIR="$HOME/.composer/vendor/bin"
|
export _Z_DATA="$XDG_STATE_HOME/z"
|
||||||
export PATH="$LOCAL_BIN:$COMPOSER_DIR:$PATH"
|
|
||||||
|
|
||||||
export NVM_DIR="$HOME/.nvm"
|
# composer, https://getcomposer.org/
|
||||||
|
if command -v composer &> /dev/null; then
|
||||||
|
export COMPOSER_HOME="$XDG_STATE_HOME/composer"
|
||||||
|
export COMPOSER_BIN="$COMPOSER_HOME/vendor/bin"
|
||||||
|
export PATH="$COMPOSER_BIN:$PATH"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# gem, rubygems
|
||||||
|
if command -v gem &>/dev/null; then
|
||||||
|
export GEM_HOME="$XDG_STATE_HOME/gem"
|
||||||
|
export GEM_PATH="$XDG_STATE_HOME/gem"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# nvm, the node version manager
|
||||||
|
export NVM_DIR="$XDG_STATE_HOME/nvm"
|
||||||
export NVM_LAZY_LOAD=true
|
export NVM_LAZY_LOAD=true
|
||||||
export NVM_COMPLETION=true
|
export NVM_COMPLETION=true
|
||||||
export NVM_AUTO_USE=true
|
export NVM_AUTO_USE=true
|
||||||
[ -s "/opt/homebrew/opt/nvm/nvm.sh" ] && \. "/opt/homebrew/opt/nvm/nvm.sh"
|
[ -s "$HOMEBREW_PKG/nvm/nvm.sh" ] && \. "$HOMEBREW_PKG/nvm/nvm.sh"
|
||||||
[ -s "/opt/homebrew/opt/nvm/etc/bash_completion.d/nvm" ] && \. "/opt/homebrew/opt/nvm/etc/bash_completion.d/nvm"
|
[ -s "$HOMEBREW_PKG/nvm/etc/bash_completion.d/nvm" ] && \. "$HOMEBREW_PKG/nvm/etc/bash_completion.d/nvm"
|
||||||
|
|
||||||
|
# wakatime, https://github.com/wakatime/wakatime-cli
|
||||||
|
export WAKATIME_HOME="$XDG_STATE_HOME/wakatime"
|
||||||
|
|
||||||
# Run x-load-configs in your terminal to reload the files.
|
# Run x-load-configs in your terminal to reload the files.
|
||||||
function x-load-configs()
|
function x-load-configs()
|
||||||
{
|
{
|
||||||
# Load the shell dotfiles, and then some:
|
# Load the shell dotfiles, and then some:
|
||||||
for file in ~/.dotfiles/config/{exports,alias,functions}; do
|
for file in $DOTFILES/config/{exports,alias,functions}; do
|
||||||
[ -r "$file" ] && [ -f "$file" ] && source "$file"
|
[ -r "$file" ] && [ -f "$file" ] && source "$file"
|
||||||
[ -r "$file-secret" ] && [ -f "$file-secret" ] && source "$file-secret"
|
[ -r "$file-secret" ] && [ -f "$file-secret" ] && source "$file-secret"
|
||||||
[ -r "$file-$HOSTNAME" ] && [ -f "$file-$HOSTNAME" ] && source "$file-$HOSTNAME"
|
[ -r "$file-$HOSTNAME" ] && [ -f "$file-$HOSTNAME" ] && source "$file-$HOSTNAME"
|
||||||
@@ -67,15 +90,19 @@ x-load-configs
|
|||||||
# Import ssh keys in keychain
|
# Import ssh keys in keychain
|
||||||
ssh-add -A 2>/dev/null;
|
ssh-add -A 2>/dev/null;
|
||||||
|
|
||||||
|
# Antigen configuration
|
||||||
|
# https://github.com/zsh-users/antigen/wiki/Configuration
|
||||||
|
export ADOTDIR="$XDG_DATA_HOME/antigen"
|
||||||
|
export ANTIGEN_SYSTEM_RECEIPT_F=".local/share/antigen/antigen_system_lastupdate"
|
||||||
|
export ANTIGEN_PLUGIN_RECEIPT_F=".local/share/antigen/antigen_plugin_lastupdate"
|
||||||
|
|
||||||
# Try to load antigen, if present
|
# Try to load antigen, if present
|
||||||
[[ -f "$HOME/.local/bin/antigen.zsh" ]] && source "$HOME/.local/bin/antigen.zsh"
|
[[ -f "$XDG_BIN_HOME/antigen.zsh" ]] && source "$XDG_BIN_HOME/antigen.zsh"
|
||||||
|
|
||||||
# antigen is present
|
# antigen is present
|
||||||
if command -v antigen &> /dev/null; then
|
if command -v antigen &> /dev/null; then
|
||||||
antigen use oh-my-zsh
|
antigen use oh-my-zsh
|
||||||
|
|
||||||
# antigen theme oskarkrawczyk/honukai-iterm-zsh honukai
|
|
||||||
|
|
||||||
antigen bundle ssh-agent
|
antigen bundle ssh-agent
|
||||||
antigen bundle colored-man-pages
|
antigen bundle colored-man-pages
|
||||||
antigen bundle jreese/zsh-titles
|
antigen bundle jreese/zsh-titles
|
||||||
@@ -84,16 +111,14 @@ if command -v antigen &> /dev/null; then
|
|||||||
antigen bundle MichaelAquilina/zsh-you-should-use
|
antigen bundle MichaelAquilina/zsh-you-should-use
|
||||||
antigen bundle unixorn/autoupdate-antigen.zshplugin
|
antigen bundle unixorn/autoupdate-antigen.zshplugin
|
||||||
antigen bundle Sparragus/zsh-auto-nvm-use
|
antigen bundle Sparragus/zsh-auto-nvm-use
|
||||||
# antigen bundle git-auto-fetch
|
|
||||||
|
|
||||||
hash php 2>/dev/null && antigen bundle php
|
hash php 2>/dev/null && antigen bundle php
|
||||||
hash nvm 2>/dev/null && antigen bundle nvm
|
hash nvm 2>/dev/null && antigen bundle nvm
|
||||||
hash docker 2>/dev/null && antigen bundle docker
|
hash docker 2>/dev/null && antigen bundle docker
|
||||||
# hash ruby 2>/dev/null && antigen bundle ruby
|
# hash ruby 2>/dev/null && antigen bundle ruby
|
||||||
# hash python 2>/dev/null && antigen bundle MichaelAquilina/zsh-autoswitch-virtualenv
|
hash python 2>/dev/null && antigen bundle MichaelAquilina/zsh-autoswitch-virtualenv
|
||||||
hash jq 2>/dev/null && antigen bundle reegnz/jq-zsh-plugin
|
hash jq 2>/dev/null && antigen bundle reegnz/jq-zsh-plugin
|
||||||
hash docker-compose 2>/dev/null && antigen bundle sroze/docker-compose-zsh-plugin
|
hash docker-compose 2>/dev/null && antigen bundle sroze/docker-compose-zsh-plugin
|
||||||
# antigen bundle voronkovich/phpcs.plugin.zsh
|
|
||||||
|
|
||||||
# Platform dependant bundles
|
# Platform dependant bundles
|
||||||
if [[ $(uname) == 'Linux' ]]; then
|
if [[ $(uname) == 'Linux' ]]; then
|
||||||
@@ -124,6 +149,3 @@ fi
|
|||||||
#fi
|
#fi
|
||||||
|
|
||||||
eval "$(starship init zsh)"
|
eval "$(starship init zsh)"
|
||||||
|
|
||||||
# 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"
|
|
||||||
|
|||||||
Reference in New Issue
Block a user