Compare commits

...

2 Commits

7 changed files with 1745 additions and 13 deletions

1
.gitignore vendored
View File

@ -20,6 +20,7 @@ zsh/*
!zsh/scripts.zsh !zsh/scripts.zsh
!zsh/aliases.zsh !zsh/aliases.zsh
!zsh/completions/.keep !zsh/completions/.keep
!zsh/.p10k.zsh
# tmux # tmux
!tmux !tmux

View File

@ -3,7 +3,10 @@
if [[ $# -eq 1 ]]; then if [[ $# -eq 1 ]]; then
selected=$1 selected=$1
else else
selected=$(find -L $GGROOT -mindepth 1 -maxdepth 5 -type d -name .git -prune | xargs -n 1 dirname | fzf --cycle --multi --bind 'tab:toggle-up,btab:toggle-down') if ! [[ -f "$GGROOT/compiled" ]]; then
find -L $GGROOT -mindepth 1 -maxdepth 5 -type d -name .git -prune | xargs -n 1 dirname > "$GGROOT/compiled"
fi
selected=$(cat "$GGROOT/compiled" | fzf)
fi fi
if [[ -z $selected ]]; then if [[ -z $selected ]]; then

View File

@ -32,5 +32,3 @@ bind-key -r g run-shell "tmux neww ~/.config/tmux/tmux-sessionizer $XDG_CONFIG_H
bind-key -r T run-shell "tmux neww ~/.config/tmux/tmux-sessionizer ~/Desktop/temp" bind-key -r T run-shell "tmux neww ~/.config/tmux/tmux-sessionizer ~/Desktop/temp"
bind-key -r R run-shell "tmux neww ~/.config/tmux/tmux-sessionizer ~" bind-key -r R run-shell "tmux neww ~/.config/tmux/tmux-sessionizer ~"
# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)
run '~/.config/tmux/plugins/tpm/tpm'

1697
zsh/.p10k.zsh Normal file

File diff suppressed because it is too large Load Diff

View File

@ -9,15 +9,8 @@ if [[ -r "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" ]]
source "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" source "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh"
fi fi
# completion
fpath=($ZDOTDIR/completions $fpath)
autoload -Uz compinit
compinit -d $XDG_CACHE_HOME/zsh/zcompdump-$ZSH_VERSION
zstyle ':completion:*' cache-path $XDG_CACHE_HOME/zsh/zcompcache
# pre plugin load # pre plugin load
export NVM_COMPLETION=true export NVM_COMPLETION=true
export NVM_AUTO_USE=true
# load antigen # load antigen
typeset -a ANTIGEN_CHECK_FILES=(${ZDOTDIR:-~}/.zshrc ${ZDOTDIR:-~}/antigen.zsh) typeset -a ANTIGEN_CHECK_FILES=(${ZDOTDIR:-~}/.zshrc ${ZDOTDIR:-~}/antigen.zsh)
@ -28,7 +21,6 @@ antigen use oh-my-zsh
antigen bundle git antigen bundle git
# zsh users plugin # zsh users plugin
antigen bundle zsh-users/zsh-syntax-highlighting
antigen bundle zsh-users/zsh-autosuggestions antigen bundle zsh-users/zsh-autosuggestions
# other # other
@ -54,8 +46,14 @@ export GPG_TTY=$(tty)
source "$ZDOTDIR/aliases.zsh" source "$ZDOTDIR/aliases.zsh"
source "$ZDOTDIR/scripts.zsh" source "$ZDOTDIR/scripts.zsh"
# completion
fpath=($ZDOTDIR/completions $fpath)
autoload -Uz compinit
compinit -d $XDG_CACHE_HOME/zsh/zcompdump-$ZSH_VERSION
zstyle ':completion:*' cache-path $XDG_CACHE_HOME/zsh/zcompcache
# opam configuration # opam configuration
[[ ! -r /Users/janezicmatej/.opam/opam-init/init.zsh ]] || source /Users/janezicmatej/.opam/opam-init/init.zsh > /dev/null 2> /dev/null # [[ ! -r /Users/janezicmatej/.opam/opam-init/init.zsh ]] || source /Users/janezicmatej/.opam/opam-init/init.zsh > /dev/null 2> /dev/null
# To customize prompt, run `p10k configure` or edit ~/.config/zsh/.p10k.zsh. # To customize prompt, run `p10k configure` or edit ~/.config/zsh/.p10k.zsh.
[[ ! -f ~/.config/zsh/.p10k.zsh ]] || source ~/.config/zsh/.p10k.zsh [[ ! -f ~/.config/zsh/.p10k.zsh ]] || source ~/.config/zsh/.p10k.zsh

View File

@ -1,7 +1,8 @@
alias s="ssh"
alias z="exec zsh" alias z="exec zsh"
alias t="tmux a || tmux new-session -s janezicmatej -c ~" alias t="tmux a || tmux new-session -s janezicmatej -c ~"
alias n=nvim_ve alias n=nvim_ve
alias vim=nvim_ve # alias vim=nvim_ve
# navigation # navigation
alias cdgit="cd $GGROOT" alias cdgit="cd $GGROOT"

View File

@ -89,3 +89,37 @@ function dps {
fi fi
} }
function get_dump {
if [[ -z $1 ]]; then
echo "provide ssh host"
return
fi
if [[ -z $2 ]]; then
echo "provide dump destination"
return
fi
selected=$(ssh "$1" docker ps --filter image=postgres:* --format "{{.Names}}" | fzf)
if [[ -z $selected ]]; then
return
fi
ssh "$1" docker exec "$selected" pg_dump -U db --format=c db > "$2$(date +'%Y-%m-%dT%H.%M.%S%z')"
}
function ggcompile {
find -L $GGROOT -mindepth 1 -maxdepth 5 -type d -name .git -prune | xargs -n 1 dirname > "$GGROOT/compiled"
}
function tssh {
if [[ -z $1 ]]; then
echo "provide ssh host"
return
fi
ssh -t "$@" "command -v tmux && (tmux a || tmux new-session -s gorazd -c ~) || bash"
}