inital commit
This commit is contained in:
19
.zsh/aliases.zsh
Normal file
19
.zsh/aliases.zsh
Normal file
@@ -0,0 +1,19 @@
|
||||
# Alias
|
||||
# ---
|
||||
#
|
||||
# mac OS shortcuts
|
||||
alias code="open -a 'Visual Studio Code'"
|
||||
alias kubi="open -a 'Lens'"
|
||||
|
||||
|
||||
# ALIAS COMMANDS
|
||||
alias ld="ls -lisaGh"
|
||||
alias g="goto"
|
||||
alias grep='grep --color'
|
||||
alias vim=nvim
|
||||
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 kc1='export KUBECONFIG=~/.kube/config'
|
||||
alias kc2='export KUBECONFIG=~/.kube/mobilistics'
|
||||
4
.zsh/functions.zsh
Normal file
4
.zsh/functions.zsh
Normal file
@@ -0,0 +1,4 @@
|
||||
# Colormap
|
||||
function colormap() {
|
||||
for i in {0..255}; do print -Pn "%K{$i} %k%F{$i}${(l:3::0:)i}%f " ${${(M)$((i%6)):#3}:+$'\n'}; done
|
||||
}
|
||||
4
.zsh/goto.zsh
Normal file
4
.zsh/goto.zsh
Normal file
@@ -0,0 +1,4 @@
|
||||
autoload -Uz compinit
|
||||
compinit
|
||||
|
||||
source $(brew --prefix)/etc/bash_completion.d/goto.sh
|
||||
2
.zsh/kubernetes.zsh
Normal file
2
.zsh/kubernetes.zsh
Normal file
@@ -0,0 +1,2 @@
|
||||
export KUBECONFIG=~/.kube/config
|
||||
export KUBECONFIG=~/.kube/mobilistics
|
||||
25
.zsh/nvm.zsh
Normal file
25
.zsh/nvm.zsh
Normal file
@@ -0,0 +1,25 @@
|
||||
export NVM_DIR="$HOME/.nvm"
|
||||
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
|
||||
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion
|
||||
|
||||
# Automatisches Laden der Node.js-Version
|
||||
autoload -U add-zsh-hook
|
||||
load-nvmrc() {
|
||||
local node_version="$(nvm version)"
|
||||
local nvmrc_path="$(nvm_find_nvmrc)"
|
||||
|
||||
if [ -n "$nvmrc_path" ]; then
|
||||
local nvmrc_node_version=$(nvm version "$(cat "${nvmrc_path}")")
|
||||
|
||||
if [ "$nvmrc_node_version" = "N/A" ]; then
|
||||
nvm install
|
||||
elif [ "$nvmrc_node_version" != "$node_version" ]; then
|
||||
nvm use
|
||||
fi
|
||||
elif [ "$node_version" != "$(nvm version default)" ]; then
|
||||
echo "Reverting to nvm default version"
|
||||
nvm use default
|
||||
fi
|
||||
}
|
||||
add-zsh-hook chpwd load-nvmrc
|
||||
load-nvmrc
|
||||
12
.zsh/ohmyzsh.zsh
Normal file
12
.zsh/ohmyzsh.zsh
Normal file
@@ -0,0 +1,12 @@
|
||||
#Confi
|
||||
export ZSH="$HOME/.oh-my-zsh"
|
||||
|
||||
#Theme
|
||||
ZSH_THEME="bira"
|
||||
|
||||
#plugins
|
||||
plugins=(git kubectl docker npm pip sudo macos zsh-autosuggestions command-not-found zsh-syntax-highlighting 1password)
|
||||
|
||||
#Source
|
||||
source $ZSH/oh-my-zsh.sh
|
||||
|
||||
7
.zsh/pnpm.zsh
Normal file
7
.zsh/pnpm.zsh
Normal file
@@ -0,0 +1,7 @@
|
||||
# pnpm
|
||||
export PNPM_HOME="/Users/r.kallinich/.nvm/versions/node/v20.15.0/bin"
|
||||
case ":$PATH:" in
|
||||
*":$PNPM_HOME:"*) ;;
|
||||
*) export PATH="$PNPM_HOME:$PATH" ;;
|
||||
esac
|
||||
# pnpm end
|
||||
9
.zsh/ssh.zsh
Normal file
9
.zsh/ssh.zsh
Normal file
@@ -0,0 +1,9 @@
|
||||
export "GPG_TTY=$(tty)"
|
||||
export "SSH_AUTH_SOCK=${HOME}/.gnupg/S.gpg-agent.ssh"
|
||||
|
||||
gpgconf --launch gpg-agent
|
||||
|
||||
unset SSH_AGENT_PID
|
||||
if [ "${gnupg_SSH_AUTH_SOCK_by:-0}" -ne $$ ]; then
|
||||
export SSH_AUTH_SOCK="$(gpgconf --list-dirs agent-ssh-socket)"
|
||||
fi
|
||||
47
.zsh/starship.zsh
Normal file
47
.zsh/starship.zsh
Normal file
@@ -0,0 +1,47 @@
|
||||
# find out which distribution we are running on
|
||||
LFILE="/etc/*-release"
|
||||
MFILE="/System/Library/CoreServices/SystemVersion.plist"
|
||||
if [[ -f $LFILE ]]; then
|
||||
_distro=$(awk '/^ID=/' /etc/*-release | awk -F'=' '{ print tolower($2) }')
|
||||
elif [[ -f $MFILE ]]; then
|
||||
_distro="macos"
|
||||
|
||||
# on mac os use the systemprofiler to determine the current model
|
||||
_device=$(system_profiler SPHardwareDataType | awk '/Model Name/ {print $3,$4,$5,$6,$7}')
|
||||
|
||||
case $_device in
|
||||
*MacBook*) DEVICE="";;
|
||||
*) DEVICE="";;
|
||||
esac
|
||||
fi
|
||||
|
||||
# set an icon based on the distro
|
||||
# make sure your font is compatible with https://github.com/lukas-w/font-logos
|
||||
case $_distro in
|
||||
*kali*) ICON="ﴣ";;
|
||||
*arch*) ICON="";;
|
||||
*debian*) ICON="";;
|
||||
*raspbian*) ICON="";;
|
||||
*ubuntu*) ICON="";;
|
||||
*elementary*) ICON="";;
|
||||
*fedora*) ICON="";;
|
||||
*coreos*) ICON="";;
|
||||
*gentoo*) ICON="";;
|
||||
*mageia*) ICON="";;
|
||||
*centos*) ICON="";;
|
||||
*opensuse*|*tumbleweed*) ICON="";;
|
||||
*sabayon*) ICON="";;
|
||||
*slackware*) ICON="";;
|
||||
*linuxmint*) ICON="";;
|
||||
*alpine*) ICON="";;
|
||||
*aosc*) ICON="";;
|
||||
*nixos*) ICON="";;
|
||||
*devuan*) ICON="";;
|
||||
*manjaro*) ICON="";;
|
||||
*rhel*) ICON="";;
|
||||
*macos*) ICON="";;
|
||||
*) ICON="";;
|
||||
esac
|
||||
|
||||
export STARSHIP_DISTRO="$ICON"
|
||||
export STARSHIP_DEVICE="$DEVICE"
|
||||
1
.zsh/zoxide.zsh
Normal file
1
.zsh/zoxide.zsh
Normal file
@@ -0,0 +1 @@
|
||||
eval "$(zoxide init --cmd cd zsh)"
|
||||
Reference in New Issue
Block a user