nowe podejście
This commit is contained in:
42
.zshrc
42
.zshrc
@ -79,6 +79,10 @@ zplug 'zsh-users/zaw'
|
||||
zplug "pbar1/zsh-terraform"
|
||||
zplug 'voronkovich/project.plugin.zsh'
|
||||
zplug romkatv/powerlevel10k, as:theme, depth:1
|
||||
zplug "jocelynmallon/zshmarks"
|
||||
zplug "djui/alias-tips"
|
||||
zplug "zpm-zsh/clipboard"
|
||||
zplug "kazhala/dotbare"
|
||||
|
||||
# autocomplete on steroids
|
||||
zstyle ':completion:*' fzf-search-display true
|
||||
@ -196,6 +200,9 @@ alias hadolint="docker run --rm -i hadolint/hadolint"
|
||||
|
||||
alias vim="nvim"
|
||||
|
||||
alias j="jump"
|
||||
alias b="bookmark"
|
||||
|
||||
dd_telegram-desktop () { # launch telegram and send it to scratchpad
|
||||
(/usr/bin/telegram-desktop &)
|
||||
sleep 2
|
||||
@ -241,15 +248,15 @@ xset b off
|
||||
#eval "$(_JZ_COMPLETE=source_zsh jz)"
|
||||
#eval "$(_HAJDUK_COMPLETE=source_zsh hajduk)"
|
||||
#eval "$(_H_COMPLETE=source_zsh h)"
|
||||
#eval "$(direnv hook zsh)"
|
||||
eval "$(direnv hook zsh)"
|
||||
#eval "$(register-python-argcomplete gitlab)"
|
||||
|
||||
alias tf=terraform
|
||||
alias tfw="terraform workspace"
|
||||
|
||||
alias easy-rsa="docker run --rm -it -v /home/paramah/secrets/rsa:/pki -v /home/paramah/.aws:/root/.aws -e AWS_PROFILE=sandbox -e KMS_KEY_ID=test paramah/easyrsa"
|
||||
alias genpass="< /dev/urandom tr -dc _A-Z-a-z-0-9 | head -c${1:-32};echo;"
|
||||
|
||||
# alias genpass="< /dev/urandom tr -dc _A-Z-a-z-0-9 | head -c${1:-32};echo;"
|
||||
alias genpass="gopass pwgen -1 32"
|
||||
|
||||
|
||||
function tfv(){
|
||||
@ -276,15 +283,22 @@ function gitc(){
|
||||
function ec2-list(){
|
||||
aws ec2 describe-instances \
|
||||
--filter "Name=instance-state-name,Values=running" \
|
||||
--query "Reservations[*].Instances[*].[PublicIpAddress, Tags[?Key=='Name'].Value|[0],PrivateIpAddress, LaunchTime, InstanceId]" \
|
||||
--query "Reservations[*].Instances[*].[Tags[?Key=='Name'].Value|[0], PublicIpAddress, PrivateIpAddress, LaunchTime, InstanceId]" \
|
||||
--output table
|
||||
}
|
||||
|
||||
function ec2-connect(){
|
||||
HOST=$(ec2-list | fzf | awk '{print $2}' |sed 's/|//')
|
||||
HOST=$(ec2-list | fzf --layout=reverse --border=none | awk '{print $4}' |sed 's/|//')
|
||||
jssh $HOST
|
||||
}
|
||||
|
||||
function ec2-vpc-connect(){
|
||||
HOST=$(ec2-list | fzf --layout=reverse --border=none | awk '{print $6}')
|
||||
jssh $HOST
|
||||
}
|
||||
|
||||
|
||||
|
||||
# To customize prompt, run `p10k configure` or edit ~/.p10k.zsh.
|
||||
[[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh
|
||||
|
||||
@ -310,7 +324,7 @@ function prompt_docker_host() {
|
||||
hostport=$(echo $url | sed -e s,$user@,,g | cut -d/ -f1)
|
||||
host="$(echo $hostport | sed -e 's,:.*,,g')"
|
||||
|
||||
p10k segment -b yellow -f black -t "${host}"
|
||||
p10k segment -b black -f yellow -t "!!DOCKER: ${host}"
|
||||
fi
|
||||
}
|
||||
|
||||
@ -375,5 +389,19 @@ PERL_MB_OPT="--install_base \"/home/paramah/perl5\""; export PERL_MB_OPT;
|
||||
PERL_MM_OPT="INSTALL_BASE=/home/paramah/perl5"; export PERL_MM_OPT;
|
||||
PATH="/home/paramah/.local/share/gem/ruby/3.0.0/bin${PATH:+${PATH}}"; export PATH;
|
||||
|
||||
source <(clockify-cli completion zsh)
|
||||
#source <(clockify-cli completion zsh)
|
||||
POWERLEVEL9K_DISABLE_CONFIGURATION_WIZARD=true
|
||||
|
||||
typeset -g POWERLEVEL9K_DIR_CLASSES=(
|
||||
'~/Projects/jazzy.pro(|/*)' WORK ''
|
||||
'~/Projects/streamsage(|/*)' WORKSS ''
|
||||
'~/Projects/Private(|/*)' PRIVATE ''
|
||||
'~/Projects/cynarski.dev(|/*)' PRIVATE ''
|
||||
'~/Projects/CyfroweNiebo(|/*)' NIEBO ''
|
||||
'~(|/*)' HOME ''
|
||||
'*' DEFAULT '')
|
||||
|
||||
typeset -g POWERLEVEL9K_DIR_WORK_VISUAL_IDENTIFIER_EXPANSION='(j!)'
|
||||
typeset -g POWERLEVEL9K_DIR_WORKSS_VISUAL_IDENTIFIER_EXPANSION='<<o>>'
|
||||
typeset -g POWERLEVEL9K_DIR_PRIVATE_VISUAL_IDENTIFIER_EXPANSION='(℀ )'
|
||||
typeset -g POWERLEVEL9K_DIR_NIEBO_VISUAL_IDENTIFIER_EXPANSION='[☰ ]'
|
||||
|
Reference in New Issue
Block a user