diff --git a/.config/.DS_Store b/.config/.DS_Store deleted file mode 100644 index 67ae685..0000000 Binary files a/.config/.DS_Store and /dev/null differ diff --git a/.config/fish/completions/fisher.fish b/.config/fish/completions/fisher.fish new file mode 100644 index 0000000..6d23ce4 --- /dev/null +++ b/.config/fish/completions/fisher.fish @@ -0,0 +1,7 @@ +complete --command fisher --exclusive --long help --description "Print help" +complete --command fisher --exclusive --long version --description "Print version" +complete --command fisher --exclusive --condition __fish_use_subcommand --arguments install --description "Install plugins" +complete --command fisher --exclusive --condition __fish_use_subcommand --arguments update --description "Update installed plugins" +complete --command fisher --exclusive --condition __fish_use_subcommand --arguments remove --description "Remove installed plugins" +complete --command fisher --exclusive --condition __fish_use_subcommand --arguments list --description "List installed plugins matching regex" +complete --command fisher --exclusive --condition "__fish_seen_subcommand_from update remove" --arguments "(fisher list)" diff --git a/.config/fish/completions/fzf_configure_bindings.fish b/.config/fish/completions/fzf_configure_bindings.fish new file mode 100644 index 0000000..b38ef92 --- /dev/null +++ b/.config/fish/completions/fzf_configure_bindings.fish @@ -0,0 +1,8 @@ +complete fzf_configure_bindings --no-files +complete fzf_configure_bindings --long help --short h --description "Print help" --condition "not __fish_seen_argument --help -h" +complete fzf_configure_bindings --long directory --description "Change the key binding for Search Directory" --condition "not __fish_seen_argument --directory" +complete fzf_configure_bindings --long git_log --description "Change the key binding for Search Git Log" --condition "not __fish_seen_argument --git_log" +complete fzf_configure_bindings --long git_status --description "Change the key binding for Search Git Status" --condition "not __fish_seen_argument --git_status" +complete fzf_configure_bindings --long history --description "Change the key binding for Search History" --condition "not __fish_seen_argument --history" +complete fzf_configure_bindings --long processes --description "Change the key binding for Search Processes" --condition "not __fish_seen_argument --processes" +complete fzf_configure_bindings --long variables --description "Change the key binding for Search Variables" --condition "not __fish_seen_argument --variables" diff --git a/.config/fish/completions/nvm.fish b/.config/fish/completions/nvm.fish new file mode 100644 index 0000000..14be1b7 --- /dev/null +++ b/.config/fish/completions/nvm.fish @@ -0,0 +1,21 @@ +complete --command nvm --exclusive +complete --command nvm --exclusive --long version --description "Print version" +complete --command nvm --exclusive --long help --description "Print help" +complete --command nvm --long silent --description "Suppress standard output" + +complete --command nvm --exclusive --condition __fish_use_subcommand --arguments install --description "Download and activate the specified Node version" +complete --command nvm --exclusive --condition __fish_use_subcommand --arguments use --description "Activate the specified Node version in the current shell" +complete --command nvm --exclusive --condition __fish_use_subcommand --arguments list --description "List installed Node versions" +complete --command nvm --exclusive --condition __fish_use_subcommand --arguments list-remote --description "List available Node versions to install" +complete --command nvm --exclusive --condition __fish_use_subcommand --arguments current --description "Print the currently-active Node version" +complete --command nvm --exclusive --condition "__fish_seen_subcommand_from install" --arguments "( + test -e $nvm_data && string split ' ' <$nvm_data/.index +)" +complete --command nvm --exclusive --condition "__fish_seen_subcommand_from use" --arguments "(_nvm_list | string split ' ')" +complete --command nvm --exclusive --condition __fish_use_subcommand --arguments uninstall --description "Uninstall the specified Node version" +complete --command nvm --exclusive --condition "__fish_seen_subcommand_from uninstall" --arguments "( + _nvm_list | string split ' ' | string replace system '' +)" +complete --command nvm --exclusive --condition "__fish_seen_subcommand_from use uninstall" --arguments "( + set --query nvm_default_version && echo default +)" diff --git a/.config/fish/conf.d/aliases.fish b/.config/fish/conf.d/aliases.fish new file mode 100644 index 0000000..1f9a0ba --- /dev/null +++ b/.config/fish/conf.d/aliases.fish @@ -0,0 +1,47 @@ +# All your aliases +alias ld="ls -lisaGh" +alias g="goto" +alias vim="nvim" +alias code="open -a 'Visual Studio Code'" +alias kubi="open -a 'Lens'" +alias update-system="brew update && brew upgrade && npm update -g" +alias do-st="docker compose" +alias do-re="docker compose down && docker compose up -d" +alias hetzi="ssh root@128.140.71.88" +alias qaserv="TERM=xterm-256color ssh root@195.201.17.47" +alias kc1="set -gx KUBECONFIG ~/.kube/config" +alias kc2="set -gx KUBECONFIG ~/.kube/mobilistics" +alias ram="vm_stat" + +# DevOps Core Tools +alias d="docker" +alias dc="docker compose" +alias dcu="docker compose up -d" +alias dcd="docker compose down" +alias dcl="docker compose logs -f" +alias dce="docker compose exec" +alias dps="docker ps --format 'table {{.Names}}\t{{.Status}}\t{{.Ports}}'" + +# Kubernetes power aliases +alias k="kubectl" +alias kx="kubectx" # Context switching +alias kn="kubens" # Namespace switching +alias kgp="kubectl get pods -o wide" +alias kgs="kubectl get svc -o wide" +alias kgd="kubectl get deploy -o wide" +alias kl="kubectl logs -f" +alias ke="kubectl exec -it" +alias kdesc="kubectl describe" +alias kpf="kubectl port-forward" + +# Testing +alias pw="npx playwright" +alias pwt="npx playwright test" +alias pwh="npx playwright test --headed" +alias pwr="npx playwright show-report" + +# Python/Go +alias py="python3" +alias pip="pip3" +alias venv="python3 -m venv" +alias activate="source venv/bin/activate" diff --git a/.config/fish/conf.d/dev-helpers.fish b/.config/fish/conf.d/dev-helpers.fish new file mode 100644 index 0000000..7b6131a --- /dev/null +++ b/.config/fish/conf.d/dev-helpers.fish @@ -0,0 +1,34 @@ +# Quick project setup +function mkproj + mkdir -p $argv[1] + cd $argv[1] + git init + touch README.md .gitignore + echo "# $argv[1]" > README.md +end + +# Docker cleanup +function docker-cleanup + docker system prune -af + docker volume prune -f +end + +# Kubernetes context info +function kinfo + echo "Context: "(kubectl config current-context) + echo "Namespace: "(kubectl config view --minify -o jsonpath='{..namespace}') + kubectl get nodes --no-headers | wc -l | xargs echo "Nodes:" +end + +# Quick YAML validation +function yaml-check + python3 -c "import yaml; yaml.safe_load(open('$argv[1]'))" +end + +# Environment file loader +function loadenv + if test -f .env + export (cat .env | grep -v '^#' | xargs) + echo "Loaded .env" + end +end diff --git a/.config/fish/conf.d/done.fish b/.config/fish/conf.d/done.fish new file mode 100644 index 0000000..ae8d242 --- /dev/null +++ b/.config/fish/conf.d/done.fish @@ -0,0 +1,340 @@ +# MIT License + +# Copyright (c) 2016 Francisco Lourenço & Daniel Wehner + +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: + +# The above copyright notice and this permission notice shall be included in all +# copies or substantial portions of the Software. + +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# SOFTWARE. + +if not status is-interactive + exit +end + +set -g __done_version 1.20.0 + +function __done_run_powershell_script + set -l powershell_exe (command --search "powershell.exe") + + if test $status -ne 0 + and command --search wslvar + + set -l powershell_exe (wslpath (wslvar windir)/System32/WindowsPowerShell/v1.0/powershell.exe) + end + + if string length --quiet "$powershell_exe" + and test -x "$powershell_exe" + + set cmd (string escape $argv) + + eval "$powershell_exe -Command $cmd" + end +end + +function __done_windows_notification -a title -a message + if test "$__done_notify_sound" -eq 1 + set soundopt "