Compare commits

...

12 Commits

19 changed files with 424 additions and 342 deletions

View File

@@ -1,6 +1,8 @@
# only care about files that are under our control # only care about files that are directly under our control
config/cheat/cheatsheets/community/* config/cheat/cheatsheets/community/*
config/cheat/cheatsheets/tldr/*
config/tmux/plugins/* config/tmux/plugins/*
local/bin/asdf/*
tools/* tools/*
node_modules/* node_modules/*

2
.nvmrc
View File

@@ -1 +1 @@
22.7.0 22.8.0

View File

@@ -1 +1 @@
3.12 3.12.5

View File

@@ -6,24 +6,25 @@ direnv 2.34.0
dotenv-linter 3.3.0 dotenv-linter 3.3.0
editorconfig-checker 2.8.0 editorconfig-checker 2.8.0
eza 0.19.0 eza 0.19.0
fd 10.1.0 fd 10.2.0
github-cli 2.55.0 github-cli 2.55.0
golang 1.23.0 golang 1.23.0
hadolint 2.12.0 hadolint 2.12.0
kubectl 1.31.0 kubectl 1.31.0
lazygit 0.43.1 lazygit 0.43.1
nodejs 22.6.0 markdownlint-cli2 0.13.0
pipx 1.6.0 nodejs 22.7.0
pipx 1.7.1
pre-commit 3.8.0 pre-commit 3.8.0
python 3.12.5
ripgrep 14.1.0 ripgrep 14.1.0
ruby 3.3.4 ruby 3.3.4
rust 1.80.1 rust 1.80.1
semgrep system semgrep system
shellcheck 0.10.0 shellcheck 0.10.0
shfmt 3.8.0 shfmt 3.9.0
terraform-lsp 0.0.12 terragrunt 0.67.0
terragrunt 0.66.3
tf-summarize 0.3.10 tf-summarize 0.3.10
vault 1.17.3+ent vault 1.17.4+ent
yamllint 1.35.1 yamllint 1.35.1
yq 4.44.3 yq 4.44.3

View File

@@ -23,15 +23,20 @@ load_antigen()
antigen use oh-my-zsh antigen use oh-my-zsh
# Disable ls colors to avoid issues with eza
export DISABLE_LS_COLORS=true
export ZSH_TMUX_AUTOSTART=false export ZSH_TMUX_AUTOSTART=false
export ZSH_TMUX_CONFIG="$DOTFILES/config/tmux/tmux.conf" export ZSH_TMUX_CONFIG="$DOTFILES/config/tmux/tmux.conf"
export ZSH_TMUX_UNICODE=true export ZSH_TMUX_UNICODE=true
export ZSH_TMUX_AUTOQUIT=false export ZSH_TMUX_AUTOQUIT=false
export ZSH_TMUX_DEFAULT_SESSION_NAME=main export ZSH_TMUX_DEFAULT_SESSION_NAME=main
zstyle :omz:plugins:eza 'dirs-first' yes zstyle ':omz:plugins:eza' 'dirs-first' yes
zstyle :omz:plugins:eza 'git-status' yes zstyle ':omz:plugins:eza' 'git-status' yes
zstyle :omz:plugins:eza 'icons' yes zstyle ':omz:plugins:eza' 'icons' yes
zstyle ':omz:plugins:eza' 'ls' yes
zstyle ':omz:plugins:eza' 'prompt' yes
if [[ "$OSTYPE" == darwin* ]]; then if [[ "$OSTYPE" == darwin* ]]; then
zstyle :omz:plugins:ssh-agent keychain yes zstyle :omz:plugins:ssh-agent keychain yes
@@ -51,7 +56,7 @@ load_antigen()
antigen bundle ssh-agent antigen bundle ssh-agent
antigen bundle gpg-agent antigen bundle gpg-agent
antigen bundle brew antigen bundle brew
antigen bundle tmux # antigen bundle tmux
antigen bundle colored-man-pages antigen bundle colored-man-pages
antigen bundle zsh-users/zsh-completions antigen bundle zsh-users/zsh-completions
antigen bundle eza antigen bundle eza

View File

@@ -61,6 +61,9 @@ alias ta='tmux attach || tmux'
alias nvim-ks='NVIM_APPNAME="nvim-kickstart" nvim' alias nvim-ks='NVIM_APPNAME="nvim-kickstart" nvim'
alias ks='NVIM_APPNAME="nvim-kickstart" nvim' alias ks='NVIM_APPNAME="nvim-kickstart" nvim'
# xdg-ninja aliases for better experience
alias xdg='xdg-ninja --skip-ok --skip-unsupported'
# 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

View File

@@ -1,28 +1,32 @@
1password-cli https://github.com/NeoHsu/asdf-1password-cli.git f5d5aab 1password-cli https://github.com/NeoHsu/asdf-1password-cli.git f5d5aab
age https://github.com/threkk/asdf-age.git 4df80a0 age https://github.com/threkk/asdf-age.git 4df80a0
asdf-plugin-manager https://github.com/asdf-community/asdf-plugin-manager.git 50d2735 asdf-plugin-manager https://github.com/asdf-community/asdf-plugin-manager.git ecd1642
bottom https://github.com/carbonteq/asdf-btm.git fd8a55a bottom https://github.com/carbonteq/asdf-btm.git fd8a55a
direnv https://github.com/asdf-community/asdf-direnv.git a2219c2
dotenv-linter https://github.com/wesleimp/asdf-dotenv-linter.git 1369f53 dotenv-linter https://github.com/wesleimp/asdf-dotenv-linter.git 1369f53
editorconfig-checker https://github.com/gabitchov/asdf-editorconfig-checker.git 585c1d5 editorconfig-checker https://github.com/gabitchov/asdf-editorconfig-checker.git 585c1d5
eza https://github.com/lwiechec/asdf-eza.git 08c1b65 eza https://github.com/lwiechec/asdf-eza.git eee3d59
fd https://gitlab.com/wt0f/asdf-fd.git 17d56e0 fd https://gitlab.com/wt0f/asdf-fd.git 17d56e0
github-cli https://github.com/bartlomiejdanek/asdf-github-cli.git e0605b7 github-cli https://github.com/bartlomiejdanek/asdf-github-cli.git e0605b7
golang https://github.com/asdf-community/asdf-golang.git 0e86b1d
hadolint https://github.com/devlincashman/asdf-hadolint.git 335e230 hadolint https://github.com/devlincashman/asdf-hadolint.git 335e230
kubectl https://github.com/asdf-community/asdf-kubectl.git cbe6df4 kubectl https://github.com/asdf-community/asdf-kubectl.git cbe6df4
lazygit https://github.com/nklmilojevic/asdf-lazygit.git 78e04f1 lazygit https://github.com/nklmilojevic/asdf-lazygit.git 78e04f1
neovim https://github.com/richin13/asdf-neovim d6118ad markdownlint-cli2 https://github.com/paulo-ferraz-oliveira/asdf-markdownlint-cli2.git 6acd080
nodejs https://github.com/asdf-vm/asdf-nodejs.git c5b7c40 nodejs https://github.com/asdf-vm/asdf-nodejs.git c5b7c40
pipx https://github.com/yozachar/asdf-pipx.git 31db618 pipx https://github.com/yozachar/asdf-pipx.git 31db618
pre-commit https://github.com/jonathanmorley/asdf-pre-commit.git 26bfc42 pre-commit https://github.com/jonathanmorley/asdf-pre-commit.git 26bfc42
python https://github.com/asdf-community/asdf-python 7b0af87
ripgrep https://gitlab.com/wt0f/asdf-ripgrep.git e836665 ripgrep https://gitlab.com/wt0f/asdf-ripgrep.git e836665
ruby https://github.com/asdf-vm/asdf-ruby.git 27f78c9
rust https://github.com/code-lever/asdf-rust.git 95acf4f rust https://github.com/code-lever/asdf-rust.git 95acf4f
semgrep https://github.com/brentjanderson/asdf-semgrep.git 13ff78b semgrep https://github.com/brentjanderson/asdf-semgrep.git 13ff78b
shellcheck https://github.com/luizm/asdf-shellcheck.git 780d78d shellcheck https://github.com/luizm/asdf-shellcheck.git 780d78d
shfmt https://github.com/luizm/asdf-shfmt.git a42c5ff shfmt https://github.com/luizm/asdf-shfmt.git a42c5ff
terraform-ls https://github.com/asdf-community/asdf-hashicorp.git f1602b6 terraform-ls https://github.com/asdf-community/asdf-hashicorp.git f1602b6
terraform-lsp https://github.com/bartlomiejdanek/asdf-terraform-lsp.git bba7106 terraform-lsp https://github.com/bartlomiejdanek/asdf-terraform-lsp.git bba7106
terragrunt https://github.com/ohmer/asdf-terragrunt 4a6651a terragrunt https://github.com/ohmer/asdf-terragrunt.git 4a6651a
tf-summarize https://github.com/adamcrews/asdf-tf-summarize.git 880ad26 tf-summarize https://github.com/adamcrews/asdf-tf-summarize.git 880ad26
vault https://github.com/asdf-community/asdf-hashicorp.git f1602b6 vault https://github.com/asdf-community/asdf-hashicorp.git f1602b6
yamllint https://github.com/ericcornelissen/asdf-yamllint.git d5c3161 yamllint https://github.com/ericcornelissen/asdf-yamllint.git 2f4fd4c
yq https://github.com/sudermanjr/asdf-yq.git 772992f yq https://github.com/sudermanjr/asdf-yq.git 772992f

View File

@@ -0,0 +1,2 @@
ansible
pipenv

View File

@@ -7,7 +7,7 @@ colorize: false
# Which 'chroma' colorscheme should be applied to the output? # Which 'chroma' colorscheme should be applied to the output?
# Options are available here: # Options are available here:
# https://github.com/alecthomas/chroma/tree/master/styles # https://github.com/alecthomas/chroma/tree/master/styles
style: 'tokyonight' # style: 'tokyonight-day'
# Which 'chroma' "formatter" should be applied? # Which 'chroma' "formatter" should be applied?
# One of: "terminal", "terminal256", "terminal16m" # One of: "terminal", "terminal256", "terminal16m"
formatter: terminal256 formatter: terminal256

11
config/direnv/direnv.toml Normal file
View File

@@ -0,0 +1,11 @@
[global]
disable_stdin = true
[whitelist]
prefix = [
"~/Code/ivuorinen/"
]
exact = [
"~/.dotfiles/.envrc"
]

View File

@@ -0,0 +1,4 @@
### Do not edit. This was autogenerated by 'asdf direnv setup' ###
use_asdf() {
source_env "$(asdf direnv envrc "$@")"
}

View File

@@ -15,6 +15,12 @@
export PATH="$XDG_BIN_HOME:$DOTFILES/local/bin:$XDG_DATA_HOME/bob/nvim-bin:$XDG_DATA_HOME/cargo/bin:/opt/homebrew/bin:/usr/local/bin:$PATH" export PATH="$XDG_BIN_HOME:$DOTFILES/local/bin:$XDG_DATA_HOME/bob/nvim-bin:$XDG_DATA_HOME/cargo/bin:/opt/homebrew/bin:/usr/local/bin:$PATH"
# Load bash completions if available for zsh
if [[ -n "$ZSH_VERSION" ]]; then
autoload bashcompinit
bashcompinit
fi
# Load asdf # Load asdf
export ASDF_DIR="$XDG_BIN_HOME/asdf" export ASDF_DIR="$XDG_BIN_HOME/asdf"
if [[ -d $ASDF_DIR ]]; then if [[ -d $ASDF_DIR ]]; then
@@ -322,13 +328,17 @@ export ASDF_CONFIG_FILE="${XDG_CONFIG_HOME}/asdf/asdfrc"
export ASDF_DATA_DIR="${ASDF_DIR}" export ASDF_DATA_DIR="${ASDF_DIR}"
export ASDF_PLUGIN_MANAGER_PLUGIN_VERSIONS_FILENAME="${XDG_CONFIG_HOME}/asdf/plugin-versions" export ASDF_PLUGIN_MANAGER_PLUGIN_VERSIONS_FILENAME="${XDG_CONFIG_HOME}/asdf/plugin-versions"
export ASDF_LOG_FILE="${XDG_CACHE_HOME}/asdf/asdf.log" export ASDF_LOG_FILE="${XDG_CACHE_HOME}/asdf/asdf.log"
export ASDF_NODEJS_LEGACY_FILE_DYNAMIC_STRATEGY="latest_available" ## Default package files
export ASDF_NPM_DEFAULT_PACKAGES_FILE="${XDG_CONFIG_HOME}/asdf/npm-packages"
export ASDF_GOLANG_MOD_VERSION_ENABLED=true
export ASDF_GOLANG_DEFAULT_PACKAGES_FILE="${XDG_CONFIG_HOME}/asdf/golang-packages"
export ASDF_CRATE_DEFAULT_PACKAGES_FILE="${XDG_CONFIG_HOME}/asdf/cargo-packages" export ASDF_CRATE_DEFAULT_PACKAGES_FILE="${XDG_CONFIG_HOME}/asdf/cargo-packages"
export ASDF_GEM_DEFAULT_PACKAGES_FILE="${XDG_CONFIG_HOME}/asdf/gem-packages" export ASDF_GEM_DEFAULT_PACKAGES_FILE="${XDG_CONFIG_HOME}/asdf/gem-packages"
export ASDF_GOLANG_DEFAULT_PACKAGES_FILE="${XDG_CONFIG_HOME}/asdf/golang-packages"
export ASDF_NPM_DEFAULT_PACKAGES_FILE="${XDG_CONFIG_HOME}/asdf/npm-packages"
export ASDF_PYTHON_DEFAULT_PACKAGES_FILE="${XDG_CONFIG_HOME}/asdf/python-packages"
## Plugin configuration
export ASDF_DIRENV_IGNORE_MISSING_PLUGINS=1 export ASDF_DIRENV_IGNORE_MISSING_PLUGINS=1
export ASDF_GOLANG_MOD_VERSION_ENABLED=true
export ASDF_NODEJS_LEGACY_FILE_DYNAMIC_STRATEGY="latest_available"
## Add asdf to path
export PATH="${ASDF_DIR}/bin:${PATH}" export PATH="${ASDF_DIR}/bin:${PATH}"
# bob manages nvim versions # bob manages nvim versions
@@ -346,6 +356,8 @@ export HOMEBREW_NO_ENV_HINTS=true
export HOMEBREW_BUNDLE_MAS_SKIP=true export HOMEBREW_BUNDLE_MAS_SKIP=true
export HOMEBREW_BUNDLE_FILE="$XDG_CONFIG_HOME/homebrew/Brewfile" export HOMEBREW_BUNDLE_FILE="$XDG_CONFIG_HOME/homebrew/Brewfile"
x-have brew && { x-have brew && {
# Add brew autocompletion to fpath
FPATH="$(brew --prefix)/share/zsh/site-functions:${FPATH}"
eval "$(brew shellenv)" eval "$(brew shellenv)"
} }
@@ -410,6 +422,8 @@ export OP_CACHE="$XDG_STATE_HOME/1password"
msg "Setting up Python configuration" msg "Setting up Python configuration"
export WORKON_HOME="$XDG_DATA_HOME/virtualenvs" export WORKON_HOME="$XDG_DATA_HOME/virtualenvs"
export PYENV_ROOT="$XDG_STATE_HOME/pyenv" export PYENV_ROOT="$XDG_STATE_HOME/pyenv"
## for MichaelAquilina/zsh-autoswitch-virtualenv
export AUTOSWITCH_VIRTUAL_ENV_DIR="$WORKON_HOME"
export PATH="$PYENV_ROOT/bin:$PYENV_ROOT/shims:$PATH" export PATH="$PYENV_ROOT/bin:$PYENV_ROOT/shims:$PATH"
x-have pyenv && { x-have pyenv && {
eval "$(pyenv init -)" eval "$(pyenv init -)"

View File

@@ -19,3 +19,4 @@ wp_*.sh
auth.json auth.json
dfm.sh dfm.sh
.scannerwork .scannerwork
.phpactor.json

View File

@@ -2,6 +2,7 @@
"$schema": "https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/main/themes/schema.json", "$schema": "https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/main/themes/schema.json",
"final_space": true, "final_space": true,
"console_title_template": "{{.UserName}}@{{.HostName}} {{.Shell}} in {{.PWD}}", "console_title_template": "{{.UserName}}@{{.HostName}} {{.Shell}} in {{.PWD}}",
"auto_upgrade": true,
"blocks": [ "blocks": [
{ {
"alignment": "left", "alignment": "left",
@@ -111,7 +112,9 @@
{ {
"background": "transparent", "background": "transparent",
"foreground": "lightGreen", "foreground": "lightGreen",
"foreground_templates": ["{{ if gt .Code 0 }}red{{ end }}"], "foreground_templates": [
"{{ if gt .Code 0 }}red{{ end }}"
],
"properties": { "properties": {
"always_enabled": true "always_enabled": true
}, },
@@ -126,7 +129,9 @@
"transient_prompt": { "transient_prompt": {
"background": "transparent", "background": "transparent",
"foreground": "lightGreen", "foreground": "lightGreen",
"foreground_templates": ["{{ if gt .Code 0 }}red{{ end }}"], "foreground_templates": [
"{{ if gt .Code 0 }}red{{ end }}"
],
"template": "\u279c " "template": "\u279c "
}, },
"version": 2 "version": 2

View File

@@ -2,6 +2,7 @@
final_space = true final_space = true
console_title_template = "{{.UserName}}@{{.HostName}} {{.Shell}} in {{.PWD}}" console_title_template = "{{.UserName}}@{{.HostName}} {{.Shell}} in {{.PWD}}"
version = 2 version = 2
auto_upgrade = true
[[blocks]] [[blocks]]
alignment = "left" alignment = "left"

View File

@@ -3,6 +3,7 @@
version = 2 version = 2
final_space = true final_space = true
console_title_template = '{{ .Shell }} in {{ .Folder }}' console_title_template = '{{ .Shell }} in {{ .Folder }}'
auto_upgrade = true
[[blocks]] [[blocks]]
type = 'prompt' type = 'prompt'

View File

@@ -79,4 +79,3 @@ Leader: `<ctrl><space>`
S-Left Move the visible part of the window left S-Left Move the visible part of the window left
S-Right Move the visible part of the window right S-Right Move the visible part of the window right
``` ```

View File

@@ -12,8 +12,6 @@ msg "Sourcing asdf in your shell"
# Function to update asdf and plugins # Function to update asdf and plugins
update_asdf() update_asdf()
{ {
asdf update
asdf plugin add asdf-plugin-manager https://github.com/asdf-community/asdf-plugin-manager.git asdf plugin add asdf-plugin-manager https://github.com/asdf-community/asdf-plugin-manager.git
asdf install asdf-plugin-manager latest asdf install asdf-plugin-manager latest
asdf global asdf-plugin-manager "$(asdf latest asdf-plugin-manager)" asdf global asdf-plugin-manager "$(asdf latest asdf-plugin-manager)"
@@ -21,9 +19,14 @@ update_asdf()
asdf-plugin-manager add-all asdf-plugin-manager add-all
asdf install asdf install
return 0
} }
ASDF_INSTALLABLES=( # Function to install asdf plugins
install_asdf_plugins()
{
ASDF_INSTALLABLES=(
"1password-cli:github.com/NeoHsu/asdf-1password-cli.git" "1password-cli:github.com/NeoHsu/asdf-1password-cli.git"
"age:github.com/threkk/asdf-age.git" "age:github.com/threkk/asdf-age.git"
"bottom:github.com/carbonteq/asdf-btm.git" "bottom:github.com/carbonteq/asdf-btm.git"
@@ -37,42 +40,68 @@ ASDF_INSTALLABLES=(
"hadolint:github.com/devlincashman/asdf-hadolint.git" "hadolint:github.com/devlincashman/asdf-hadolint.git"
"kubectl:github.com/asdf-community/asdf-kubectl.git" "kubectl:github.com/asdf-community/asdf-kubectl.git"
"lazygit:github.com/nklmilojevic/asdf-lazygit.git" "lazygit:github.com/nklmilojevic/asdf-lazygit.git"
"markdownlint-cli2:github.com/paulo-ferraz-oliveira/asdf-markdownlint-cli2.git"
"nodejs:github.com/asdf-vm/asdf-nodejs.git" "nodejs:github.com/asdf-vm/asdf-nodejs.git"
"pipx:github.com/yozachar/asdf-pipx.git" "pipx:github.com/yozachar/asdf-pipx.git"
"pre-commit:github.com/jonathanmorley/asdf-pre-commit.git" "pre-commit:github.com/jonathanmorley/asdf-pre-commit.git"
"python:github.com/asdf-community/asdf-python.git"
"ripgrep:gitlab.com/wt0f/asdf-ripgrep.git" "ripgrep:gitlab.com/wt0f/asdf-ripgrep.git"
"rust:github.com/code-lever/asdf-rust.git" "rust:github.com/code-lever/asdf-rust.git"
"semgrep:github.com/brentjanderson/asdf-semgrep.git" "semgrep:github.com/brentjanderson/asdf-semgrep.git"
"shellcheck:github.com/luizm/asdf-shellcheck.git" "shellcheck:github.com/luizm/asdf-shellcheck.git"
"shfmt:github.com/luizm/asdf-shfmt.git" "shfmt:github.com/luizm/asdf-shfmt.git"
"terraform-ls:github.com/asdf-community/asdf-hashicorp.git"
"terraform-lsp:github.com/bartlomiejdanek/asdf-terraform-lsp.git"
"terragrunt:github.com/ohmer/asdf-terragrunt.git" "terragrunt:github.com/ohmer/asdf-terragrunt.git"
"tf-summarize:github.com/adamcrews/asdf-tf-summarize.git" "tf-summarize:github.com/adamcrews/asdf-tf-summarize.git"
"vault:github.com/asdf-community/asdf-hashicorp.git" "vault:github.com/asdf-community/asdf-hashicorp.git"
"yamllint:github.com/ericcornelissen/asdf-yamllint.git" "yamllint:github.com/ericcornelissen/asdf-yamllint.git"
"yq:github.com/sudermanjr/asdf-yq.git" "yq:github.com/sudermanjr/asdf-yq.git"
) )
# Function to install asdf plugins msg "Installing asdf plugins"
install_asdf_plugins()
{
msg "Installing asdf plugins, if not already installed"
for item in "${ASDF_INSTALLABLES[@]}"; do for item in "${ASDF_INSTALLABLES[@]}"; do
CMD=$(echo "${item}" | awk -F ":" '{print $1}') CMD=$(echo "${item}" | awk -F ":" '{print $1}')
URL=$(echo "${item}" | awk -F ":" '{print $2}') URL=$(echo "${item}" | awk -F ":" '{print $2}')
asdf plugin add "${CMD}" "https://${URL}" asdf plugin add "${CMD}" "https://${URL}"
asdf install "${CMD}" latest asdf install "${CMD}" latest
asdf global "${CMD}" "$(asdf latest "${CMD}")" asdf global "${CMD}" "$(asdf latest "${CMD}")"
done done
msg "Exporting asdf plugin versions"
asdf-plugin-manager export > "${XDG_CONFIG_HOME}/asdf/plugin-versions"
return 0
}
reshim()
{
msg "Reshim asdf"
asdf reshim
return 0
}
# create usage function
usage()
{
echo "Usage: $0 [install|add_plugins]"
exit 1
} }
main() main()
{ {
case $1 in
"install")
update_asdf update_asdf
reshim
;;
"add_plugins")
install_asdf_plugins install_asdf_plugins
msg "Reshim asdf" reshim
asdf reshim ;;
*)
usage
;;
esac
} }
main "$@" main "$@"