diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000..674e4c5 --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "dotdrop"] + path = dotdrop + url = https://github.com/deadc0de6/dotdrop.git diff --git a/LICENSE b/LICENSE index e863972..c924f33 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ MIT License -Copyright (c) 2017-2024 Philip Henning +Copyright (c) 2017 Philip Henning Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/README.md b/README.md index dc00c3b..6ea8bef 100644 --- a/README.md +++ b/README.md @@ -4,26 +4,23 @@ I manage my dotfiles using [dotdrop](https://github.com/deadc0de6/dotdrop). ## How to install -### Script - -```shell -[[ ! $(command -v brew) ]] && /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" \ - ; brew update \ - && brew install coreutils libmagic uv \ - && uv tool install --allow-python-downloads --python 3.11 dotdrop \ - && git clone https://github.com/shokinn/.files ~/.files \ - && ~/.local/bin/dotdrop --cfg=~/.files/config.yaml install -``` - -### Manual - 1. Install [Homebrew](https://brew.sh/) -2. Install `coreutils`, `libmagic` and `uv` via Homebrew. -3. Install `drotdrop` via `uv` (`uv tool install --allow-python-downloads --python 3.11 dotdrop`). -4. Clone dotfiles, install dependencies for dotdrop and install dotfiles. +2. Install `coreutils` via Homebrew. +3. Install [pyenv](https://github.com/pyenv/pyenv) + a. Install [pyenv-virtualenv](https://github.com/pyenv/pyenv-virtualenv) + b. Add pyenv temporarly to your path: `export PATH=$(pyenv root)/shims:${PATH}` + c. Install the latest python version via pyenv + d. Create a new virtual-env caleld `dotdrop` via `pyenv virtualenv dotdrop` +4. Initialize pyenv; run `pyenv init` for instructions +5. Activate the `dotdrop` virtualenv by using `pyenv shell dotdrop` +6. Clone dotfiles, install dependencies for dotdrop and install dotfiles. ```shell git clone https://github.com/shokinn/.files ~/.files \ -&& ~/.local/bin/dotdrop --cfg=~/.files/config.yaml install +&& cd ~/.files \ +&& git submodule update --init \ +&& cd .. \ +&& pip install -r ~/.files/dotdrop/requirements.txt \ +&& eval $(grep -v "^#" ~/.files/.env.public) ~/.files/dotdrop.sh install ``` ## Documentation diff --git a/config.yaml b/config.yaml index 24197c3..06233bc 100644 --- a/config.yaml +++ b/config.yaml @@ -8,7 +8,7 @@ actions: [[ -f ${{HOME}}/.zshrc.pre-oh-my-zsh ]] && rm ${{HOME}}/.zshrc && mv ${{HOME}}/.zshrc.pre-oh-my-zsh ${{HOME}}/.zshrc || echo "do nothing" >/dev/null [[ ! -d ${{ZSH_CUSTOM:-${{HOME}}/.oh-my-zsh/custom}}/plugins ]] && mkdir -p ${{ZSH_CUSTOM:-${{HOME}}/.oh-my-zsh/custom}}/plugins || echo "do nothing" >/dev/null [[ ! -d ${{ZSH_CUSTOM:-${{HOME}}/.oh-my-zsh/custom}}/plugins/custom-completions ]] && mkdir -p ${{ZSH_CUSTOM:-${{HOME}}/.oh-my-zsh/custom}}/plugins/custom-completions || echo "do nothing" >/dev/null - [[ ! -f ${{ZSH_CUSTOM:-${{HOME}}/.oh-my-zsh/custom}}/plugins/custom-completions/_dotdrop-completion.zsh ]] && curl -o ${{ZSH_CUSTOM:-${{HOME}}/.oh-my-zsh/custom}}/plugins/custom-completions/_dotdrop-completion.zsh https://raw.githubusercontent.com/deadc0de6/dotdrop/master/completion/_dotdrop-completion.zsh || echo "do nothing" >/dev/null + [[ ! -f ${{ZSH_CUSTOM:-${{HOME}}/.oh-my-zsh/custom}}/plugins/custom-completions/_dotdrop.sh-completion.zsh ]] && curl -o ${{ZSH_CUSTOM:-${{HOME}}/.oh-my-zsh/custom}}/plugins/custom-completions/_dotdrop.sh-completion.zsh https://raw.githubusercontent.com/deadc0de6/dotdrop/master/completion/_dotdrop.sh-completion.zsh || echo "do nothing" >/dev/null [[ ! -f ${{ZSH_CUSTOM:-${{HOME}}/.oh-my-zsh/custom}}/plugins/custom-completions/_diskutil.zsh ]] && curl -o ${{ZSH_CUSTOM:-${{HOME}}/.oh-my-zsh/custom}}/plugins/custom-completions/_diskutil.zsh https://github.com/zchee/zsh-completions/blob/main/src/macOS/_diskutil || echo "do nothing" >/dev/null [[ ! -d ${{ZSH_CUSTOM:-${{HOME}}/.oh-my-zsh/custom}}/plugins/zsh-completions ]] && git clone https://github.com/zsh-users/zsh-completions.git ${{ZSH_CUSTOM:-${{HOME}}/.oh-my-zsh/custom}}/plugins/zsh-completions || echo "do nothing" >/dev/null [[ ! -d ${{ZSH_CUSTOM:-${{HOME}}/.oh-my-zsh/custom}}/plugins/fzf-tab-completion ]] && git clone https://github.com/lincheney/fzf-tab-completion.git ${{ZSH_CUSTOM:-${{HOME}}/.oh-my-zsh/custom}}/plugins/fzf-tab-completion || echo "do nothing" >/dev/null @@ -37,29 +37,32 @@ dotfiles: dst: ~/.config/sxhkd src: config/sxhkd f_c3check: - dst: ~/.local/bin/c3check - src: local/bin/c3check + dst: ~/.bin/c3check + src: bin/c3check f_c3cp: - dst: ~/.local/bin/c3cp - src: local/bin/c3cp + dst: ~/.bin/c3cp + src: bin/c3cp f_c3kdenlive: - dst: ~/.local/bin/c3kdenlive - src: local/bin/c3kdenlive + dst: ~/.bin/c3kdenlive + src: bin/c3kdenlive f_c3l: - dst: ~/.local/bin/c3l - src: local/bin/c3l + dst: ~/.bin/c3l + src: bin/c3l f_c3mpv: - dst: ~/.local/bin/c3mpv - src: local/bin/c3mpv + dst: ~/.bin/c3mpv + src: bin/c3mpv f_compton.conf: dst: ~/.config/compton/compton.conf src: config/compton/compton.conf + f_dotdrop.sh: + src: bin/dotdrop.sh + dst: ~/.bin/dotdrop.sh f_fehbg: dst: ~/.fehbg src: fehbg f_mount_c3voc: - dst: ~/.local/bin/mount_c3voc - src: local/bin/mount_c3voc + dst: ~/.bin/mount_c3voc + src: bin/mount_c3voc f_powerlevel9krc: actions: - powerlevel9k-theme @@ -109,23 +112,23 @@ dotfiles: src: local/bin/kite dst: ~/.local/bin/kite f_wsladdhypervroute: - dst: ~/.local/bin/wsladdhypervroute - src: local/bin/wsladdhypervroute + dst: ~/.bin/wsladdhypervroute + src: bin/wsladdhypervroute f_wslenablehypervforwarding: - dst: ~/.local/bin/wslenablehypervforwarding - src: local/bin/wslenablehypervforwarding + dst: ~/.bin/wslenablehypervforwarding + src: bin/wslenablehypervforwarding f_wslshowhypervforwarding: - dst: ~/.local/bin/wslshowhypervforwarding - src: local/bin/wslshowhypervforwarding + dst: ~/.bin/wslshowhypervforwarding + src: bin/wslshowhypervforwarding f_pu: - dst: ~/.local/bin/pu - src: local/bin/pu + dst: ~/.bin/pu + src: bin/pu f_rpki: - dst: ~/.local/bin/rpki - src: local/bin/rpki + dst: ~/.bin/rpki + src: bin/rpki f_rmquarantine: - dst: ~/.local/bin/rmquarantine - src: local/bin/rmquarantine + dst: ~/.bin/rmquarantine + src: bin/rmquarantine f_commonfunc: dst: ~/.commonfunc src: commonfunc @@ -133,11 +136,11 @@ dotfiles: dst: ~/.gnupg/gpg-agent.conf src: gnupg/gpg-agent.conf f_secretfiles: - dst: ~/.local/bin/secretfiles - src: local/bin/secretfiles + dst: ~/.bin/secretfiles + src: bin/secretfiles f_agenix_helper: - dst: ~/.local/bin/agenix-helper - src: local/bin/agenix-helper + dst: ~/.bin/agenix-helper + src: bin/agenix-helper f_config: src: ssh/config dst: ~/.ssh/config @@ -162,6 +165,7 @@ profiles: - f_c3check - f_zprofile - f_start_systemd_shell.sh + - f_dotdrop.sh - f_wsladdhypervroute - f_wslenablehypervforwarding - f_wslshowhypervforwarding @@ -185,6 +189,7 @@ profiles: - f_c3check - f_zprofile - f_start_systemd_shell.sh + - f_dotdrop.sh - f_wsladdhypervroute - f_wslenablehypervforwarding - f_wslshowhypervforwarding @@ -219,6 +224,7 @@ profiles: - f_c3mpv - f_c3check - f_zprofile + - f_dotdrop.sh - f_rmquarantine - f_commonfunc - f_secretfiles @@ -250,6 +256,7 @@ profiles: - f_c3kdenlive - f_c3mpv - f_c3check + - f_dotdrop.sh - f_wsladdhypervroute - f_wslenablehypervforwarding - f_wslshowhypervforwarding @@ -273,6 +280,7 @@ profiles: - f_c3check - f_zprofile - f_start_systemd_shell.sh + - f_dotdrop.sh - f_wsladdhypervroute - f_wslenablehypervforwarding - f_wslshowhypervforwarding @@ -293,6 +301,7 @@ profiles: - f_c3kdenlive - f_c3mpv - f_c3check + - f_dotdrop.sh - f_wsladdhypervroute - f_wslenablehypervforwarding - f_wslshowhypervforwarding @@ -327,6 +336,7 @@ profiles: - f_c3mpv - f_c3check - f_zprofile + - f_dotdrop.sh - f_pu - f_rpki - f_rmquarantine diff --git a/dotdrop b/dotdrop new file mode 160000 index 0000000..58745e9 --- /dev/null +++ b/dotdrop @@ -0,0 +1 @@ +Subproject commit 58745e92d4992d2c6efc49d0d54423259f1d0351 diff --git a/dotdrop.sh b/dotdrop.sh new file mode 100755 index 0000000..e87ce30 --- /dev/null +++ b/dotdrop.sh @@ -0,0 +1,31 @@ +#!/usr/bin/env bash +# author: deadc0de6 (https://github.com/deadc0de6) +# Copyright (c) 2017, deadc0de6 + +# check for readlink/realpath presence +# https://github.com/deadc0de6/dotdrop/issues/6 +rl="readlink -f" + +if ! ${rl} "${0}" >/dev/null 2>&1; then + rl="realpath" + + if ! hash ${rl}; then + echo "\"${rl}\" not found !" && exit 1 + fi +fi + +# setup variables +args=("$@") +cur=$(dirname "$(${rl} "${0}")") +opwd=$(pwd) +cfg="${cur}/config.yaml" +sub="dotdrop" + +# pivot +cd "${cur}" || { echo "Folder \"${cur}\" doesn't exist, aborting." && exit; } +# init/update the submodule +git submodule update --init --recursive +# launch dotdrop +PYTHONPATH=dotdrop python -m dotdrop.dotdrop --cfg="${cfg}" "${args[@]}" +# pivot back +cd "${opwd}" || { echo "Folder \"${opwd}\" doesn't exist, aborting." && exit; } diff --git a/dotfiles/local/bin/agenix-helper b/dotfiles/bin/agenix-helper similarity index 100% rename from dotfiles/local/bin/agenix-helper rename to dotfiles/bin/agenix-helper diff --git a/dotfiles/local/bin/c3check b/dotfiles/bin/c3check similarity index 100% rename from dotfiles/local/bin/c3check rename to dotfiles/bin/c3check diff --git a/dotfiles/local/bin/c3cp b/dotfiles/bin/c3cp similarity index 100% rename from dotfiles/local/bin/c3cp rename to dotfiles/bin/c3cp diff --git a/dotfiles/local/bin/c3kdenlive b/dotfiles/bin/c3kdenlive similarity index 100% rename from dotfiles/local/bin/c3kdenlive rename to dotfiles/bin/c3kdenlive diff --git a/dotfiles/local/bin/c3l b/dotfiles/bin/c3l similarity index 100% rename from dotfiles/local/bin/c3l rename to dotfiles/bin/c3l diff --git a/dotfiles/local/bin/c3mpv b/dotfiles/bin/c3mpv similarity index 100% rename from dotfiles/local/bin/c3mpv rename to dotfiles/bin/c3mpv diff --git a/dotfiles/bin/dotdrop.sh b/dotfiles/bin/dotdrop.sh new file mode 100755 index 0000000..6f561f6 --- /dev/null +++ b/dotfiles/bin/dotdrop.sh @@ -0,0 +1,9 @@ +#!/usr/bin/env zsh + +# +# {{@@ header() @@}} +# + +eval $(grep -v "^#" {{@@ env['HOME'] @@}}/.files/.env.public) +export PYENV_VERSION="dotdrop" +{{@@ env['HOME'] @@}}/.files/dotdrop.sh ${@} diff --git a/dotfiles/local/bin/mount_c3voc b/dotfiles/bin/mount_c3voc similarity index 100% rename from dotfiles/local/bin/mount_c3voc rename to dotfiles/bin/mount_c3voc diff --git a/dotfiles/local/bin/pu b/dotfiles/bin/pu similarity index 100% rename from dotfiles/local/bin/pu rename to dotfiles/bin/pu diff --git a/dotfiles/local/bin/rmquarantine b/dotfiles/bin/rmquarantine similarity index 100% rename from dotfiles/local/bin/rmquarantine rename to dotfiles/bin/rmquarantine diff --git a/dotfiles/local/bin/rpki b/dotfiles/bin/rpki similarity index 100% rename from dotfiles/local/bin/rpki rename to dotfiles/bin/rpki diff --git a/dotfiles/local/bin/secretfiles b/dotfiles/bin/secretfiles similarity index 100% rename from dotfiles/local/bin/secretfiles rename to dotfiles/bin/secretfiles diff --git a/dotfiles/local/bin/wsladdhypervroute b/dotfiles/bin/wsladdhypervroute similarity index 100% rename from dotfiles/local/bin/wsladdhypervroute rename to dotfiles/bin/wsladdhypervroute diff --git a/dotfiles/local/bin/wslenablehypervforwarding b/dotfiles/bin/wslenablehypervforwarding similarity index 96% rename from dotfiles/local/bin/wslenablehypervforwarding rename to dotfiles/bin/wslenablehypervforwarding index ebbec71..cc94115 100755 --- a/dotfiles/local/bin/wslenablehypervforwarding +++ b/dotfiles/bin/wslenablehypervforwarding @@ -1,7 +1,7 @@ #!/usr/bin/env bash # -# {{@@ header() @@}} +# This dotfile is managed using dotdrop # WINHOME="$(echo "$(cmd.exe /C "echo %USERPROFILE%")" | tr -d '\r')" diff --git a/dotfiles/local/bin/wslshowhypervforwarding b/dotfiles/bin/wslshowhypervforwarding similarity index 83% rename from dotfiles/local/bin/wslshowhypervforwarding rename to dotfiles/bin/wslshowhypervforwarding index a516289..ed97bcf 100755 --- a/dotfiles/local/bin/wslshowhypervforwarding +++ b/dotfiles/bin/wslshowhypervforwarding @@ -1,6 +1,6 @@ #!/usr/bin/env bash # -# {{@@ header() @@}} +# This dotfile is managed using dotdrop # powershell.exe -ExecutionPolicy Bypass "Get-NetIPInterface | select ifIndex,InterfaceAlias,AddressFamily,ConnectionState,Forwarding | Sort-Object -Property IfIndex | Format-Table" diff --git a/dotfiles/commonfunc b/dotfiles/commonfunc index 1d90015..abb3f0d 100644 --- a/dotfiles/commonfunc +++ b/dotfiles/commonfunc @@ -336,21 +336,6 @@ confv6() { return 5 } -####################################### -# Runs dotdrop installed by uv with the cfg option set to my dotdrop config file in my .files repo -# Globals: -# None -# Arguments: -# n arguments for using / configuring dotdrop -# Outputs: -# None -# Returns: -# None -####################################### -dotdrop() { - {{@@ env['HOME'] @@}}/.local/bin/dotdrop --cfg={{@@ env['HOME'] @@}}/.files/config.yaml ${@} -} - {%@@ endif @@%}{%@@ if profile == 'WVDEWOBMC001307' @@%} setProxyEnv() { local HIGHLIGHT='\033[36;1m' @@ -369,21 +354,6 @@ setProxyEnv() { export https_proxy="${PROXY_CFG_HTTPS}" export GIT_SSH_COMMAND='ssh -o ProxyCommand="/opt/homebrew/bin/corkscrew localhost 9000 %h %p"' - [[ -d "{{@@ env['HOME'] @@}}/Library/Containers/io.tailscale.ipn.macsys/Data" ]] && local TAILSCALEPATH="{{@@ env['HOME'] @@}}/Library/Containers/io.tailscale.ipn.macsys/Data/tailscaled-env.txt" || true - [[ -d "{{@@ env['HOME'] @@}}/Library/Containers/io.tailscale.ipn.macos.network-extension/Data" ]] && local TAILSCALEPATH="{{@@ env['HOME'] @@}}/Library/Containers/io.tailscale.ipn.macos.network-extension/Data/tailscaled-env.txt" || true - [[ -d "/etc/tailscale" ]] && local TAILSCALEPATH="/etc/tailscale/tailscaled-env.txt" || true - if [[ -n ${TAILSCALEPATH} ]]; then - cat < "${TAILSCALEPATH}" -NO_PROXY="${NO_PROXY_CFG}" -no_proxy="${NO_PROXY_CFG}" -HTTP_PROXY="${PROXY_CFG_HTTP}" -HTTPS_PROXY="${PROXY_CFG_HTTPS}" -http_proxy="${PROXY_CFG_HTTP}" -https_proxy="${PROXY_CFG_HTTPS}" - -EOF - fi - echo -e "\n✈️ exported zscaler proxy: ${HIGHLIGHT}http://${PROXY}${RESET}" } @@ -396,14 +366,6 @@ unsetProxyEnv() { unset https_proxy unset GIT_SSH_COMMAND - [[ -d "{{@@ env['HOME'] @@}}/Library/Containers/io.tailscale.ipn.macsys/Data" ]] && local TAILSCALEPATH="{{@@ env['HOME'] @@}}/Library/Containers/io.tailscale.ipn.macsys/Data/tailscaled-env.txt" || true - [[ -d "{{@@ env['HOME'] @@}}/Library/Containers/io.tailscale.ipn.macos.network-extension/Data" ]] && local TAILSCALEPATH="{{@@ env['HOME'] @@}}/Library/Containers/io.tailscale.ipn.macos.network-extension/Data/tailscaled-env.txt" || true - [[ -d "/etc/tailscale" ]] && local TAILSCALEPATH="/etc/tailscale/tailscaled-env.txt" || true - - if [[ -n ${TAILSCALEPATH} ]]; then - rm "${TAILSCALEPATH}" - fi - echo -e "\n🔄 removed zscaler proxy cofiguration" } diff --git a/dotfiles/ssh/config b/dotfiles/ssh/config index cb95fbb..7bc96d9 100644 --- a/dotfiles/ssh/config +++ b/dotfiles/ssh/config @@ -1,4 +1,4 @@ -Include {{@@ env['HOME'] @@}}/.colima/ssh_config +Include /Users/phg/.colima/ssh_config # # {{@@ header() @@}} diff --git a/dotfiles/z_profile b/dotfiles/z_profile index 32729ed..1f95fe6 100644 --- a/dotfiles/z_profile +++ b/dotfiles/z_profile @@ -13,9 +13,14 @@ export EDITOR [[ $(command -v /opt/homebrew/bin/brew) ]] && eval "$(/opt/homebrew/bin/brew shellenv)" # Added by Toolbox App -export PATH="$PATH:{{@@ env['HOME'] @@}}/Library/Application Support/JetBrains/Toolbox/scripts" +export PATH="$PATH:/Users/vw6au89/Library/Application Support/JetBrains/Toolbox/scripts" {%@@ endif @@%} +# Initialize pyenv +[[ $(command -v pyenv) ]] && export PYENV_ROOT="$HOME/.pyenv" +[[ $(command -v pyenv) ]] && command -v pyenv >/dev/null || export PATH="$PYENV_ROOT/bin:$PATH" +[[ $(command -v pyenv) ]] && eval "$(pyenv init -)" + {%@@ if profile == 'AINCRAD-wsl' or profile == 'AINCRAD' or profile == 'YOETUNHEIMR-wsl' or profile == 'yoetunheimr' @@%} # Set DOTNET_ROOT enviroment variable DOTNET_ROOT=/opt/dotnet diff --git a/dotfiles/zshenv b/dotfiles/zshenv index 19094ec..a570e47 100644 --- a/dotfiles/zshenv +++ b/dotfiles/zshenv @@ -8,6 +8,12 @@ export _JAVA_AWT_WM_NONREPARENTING=1 # Disable Ansible cowsay export ANSIBLE_NOCOWS=1 +# Include ~/.bin to PATH +[[ -d "{{@@ env['HOME'] @@}}/.bin" ]] && export PATH="{{@@ env['HOME'] @@}}/.bin:${PATH}" + +# Inclue ~/.krew/bin to PATH for krew kubectl extensions +[[ -d "{{@@ env['HOME'] @@}}/.krew/bin" ]] && export PATH="{{@@ env['HOME'] @@}}/.krew/bin:${PATH}" + # Include ~/.local/bin to PATH [[ -d "{{@@ env['HOME'] @@}}/.local/bin" ]] && export PATH="{{@@ env['HOME'] @@}}/.local/bin:${PATH}" diff --git a/dotfiles/zshrc b/dotfiles/zshrc index d2fd56b..d5d84f5 100644 --- a/dotfiles/zshrc +++ b/dotfiles/zshrc @@ -72,6 +72,9 @@ COMPLETION_WAITING_DOTS="true" # Would you like to use another custom folder than $ZSH/custom? # ZSH_CUSTOM=/path/to/new-custom-folder +# Load pyenv-virtualenv when found +ZSH_PYENV_VIRTUALENV="true" + # Which plugins would you like to load? (plugins can be found in ~/.oh-my-zsh/plugins/*) # Custom plugins may be added to ~/.oh-my-zsh/custom/plugins/ # Example format: plugins=(rails git textmate ruby lighthouse) @@ -93,7 +96,10 @@ plugins=( kubectl man nix-zsh-completions + pip podman + pyenv + pylint python screen sublime @@ -105,17 +111,18 @@ plugins=( vscode zsh-navigation-tools zsh-ssh -{%@@ if profile == 'WVDEWOBMC001307' or profile == 'ymir' or profile == 'susanoo.local' @@%} # Mac specifics +{%@@ if profile == 'ymir' or profile == 'susanoo.local' @@%} # Mac specifics brew iterm2 macos -{%@@ endif @@%}{%@@ if profile == 'yoetunheimr' or profile == 'AINCRAD-wsl' or profile == 'AINCRAD' or profile == 'YOETUNHEIMR-wsl' or profile == 'ymir' @@%} # Archlinux specifics + {%@@ endif @@%}{%@@ if profile == 'yoetunheimr' or profile == 'AINCRAD-wsl' or profile == 'AINCRAD' or profile == 'YOETUNHEIMR-wsl' or profile == 'ymir' @@%} # Archlinux specifics archlinux -{%@@ endif @@%} + {%@@ endif @@%} ) autoload -U compinit && compinit +{%@@ if profile == 'ymir' or profile == 'susanoo.local' @@%} # Source fzf-tab-completions # source {{@@ env['HOME'] @@}}/.oh-my-zsh/custom/plugins/fzf-tab-completion/zsh/fzf-zsh-completion.sh # zstyle ':completion:*' fzf-search-display true @@ -125,6 +132,7 @@ autoload -U compinit && compinit fpath+={{@@ env['HOME'] @@}}/.oh-my-zsh/custom/plugins/zsh-completions/src # A set of custom completions fpath+={{@@ env['HOME'] @@}}/.oh-my-zsh/custom/plugins/custom-completions +{%@@ endif @@%} source ${ZSH}/oh-my-zsh.sh @@ -163,12 +171,24 @@ source ${ZSH}/oh-my-zsh.sh #[[ $(command -v kubectl) ]] && alias pk='proxy_kubectl' #{%@@ endif @@%} +alias ssh-no-check="ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null" +alias ssh-strongbox-keys="SSH_AUTH_SOCK=~/Library/Group\ Containers/group.strongbox.mac.mcguill/agent.sock ssh-add -l" alias agenix='RULES='\''./secrets/secrets.nix'\'' agenix' alias agenix-edit="agenix -i {{@@ env['HOME'] @@}}/.ssh/agenix-phg -e" alias ane='agenix-edit' alias cane="EDITOR='code -w' agenix-edit" -alias ssh-no-check="ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null" -alias ssh-strongbox-keys="SSH_AUTH_SOCK=~/Library/Group\ Containers/group.strongbox.mac.mcguill/agent.sock ssh-add -l" + +# Initialize pyenv +[[ $(command -v pyenv) ]] && export PYENV_ROOT="$HOME/.pyenv" +[[ $(command -v pyenv) ]] && command -v pyenv >/dev/null || export PATH="$PYENV_ROOT/bin:$PATH" +[[ $(command -v pyenv) ]] && eval "$(pyenv init -)" + +# Enable pipx completions +if [ -f "{{@@ env['HOME'] @@}}/.local/bin/pipx" ]; then + autoload -U bashcompinit + bashcompinit + eval "$(register-python-argcomplete pipx)" +fi # Include $(go env GOPATH) to PATH [[ $(command -v go) ]] && [[ -d "$(go env GOPATH)/bin" ]] && export PATH="$(go env GOPATH)/bin:${PATH}" diff --git a/update_dotdrop.sh b/update_dotdrop.sh new file mode 100755 index 0000000..2b6ce03 --- /dev/null +++ b/update_dotdrop.sh @@ -0,0 +1,10 @@ +#!/bin/bash + +SCRIPTPATH="$( cd "$(dirname "$0")" ; pwd -P )" + +cd $SCRIPTPATH + +git submodule foreach git pull origin master +git add dotdrop +git commit -m 'update dotdrop' +git push