dotfiles

*nix config files
git clone git://git.pyratebeard.net/dotfiles.git
Log | Files | Refs | README

commit 3714c92bf69801b5ef1a51096c43d4c602cc886f
parent 84b8d9700fe2537b4a5a4680f5045c11b09916c5
Author: pyratebeard <root@pyratebeard.net>
Date:   Tue,  9 May 2023 12:00:04 +0100

zsh updates

docker aliases. misc updates. ssux now uses hostname from tmux window title

no longer using ssh agent, gpg only

vim runtime prompt colour change

Signed-off-by: pyratebeard <root@pyratebeard.net>

Diffstat:
Mzsh/.zsh/aliases.zsh | 19+++++++++++++++----
Mzsh/.zsh/keychain.zsh | 6++++--
Mzsh/.zsh/prompt.zsh | 2+-
Mzsh/.zsh/welcome.zsh | 3++-
4 files changed, 22 insertions(+), 8 deletions(-)

diff --git a/zsh/.zsh/aliases.zsh b/zsh/.zsh/aliases.zsh @@ -106,6 +106,14 @@ \ docker="sudo docker" \ docker-compose="sudo docker-compose" \ + dtail="docker logs -tf --tail='50'" \ + dps="docker ps" \ + dpsa="docker ps -a" \ + dstart="docker start" \ + dstop="docker stop" \ + drm="docker rm" \ + drmi="docker rmi" \ + dcomp="docker-compose -f ./docker-compose.yml" \ \ tf="terraform" \ tfi="terraform init" \ @@ -167,12 +175,14 @@ drawterm="drawterm -h 9p.sdf.org -a 9p.sdf.org -u pyratebeard" \ \ kb="keybase" \ - irc="mosh irclient -- ksh -c 'dtach -A /tmp/irc irssi'" \ - tor="cd ~/src/warez/tor/ ; ./start-tor-browser.desktop" \ + irc="mosh irclient -- ksh -c 'dtach -A /tmp/irc irssi'" \ + tor="cd ~/src/warez/browsers/tor/ ; ./start-tor-browser.desktop" \ feh="feh -g 640x480" \ rum.sh="nc rum.sh 9999" \ moebius="cd $HOME/src/warez/moebius ; /usr/bin/npm start" \ - cointop="$HOME/src/go/bin/cointop --hide-statusbar" + cointop="$HOME/src/go/bin/cointop --hide-statusbar" \ + \ + prometheus="ssh -NfD 9090 prometheus" # ▓▓▒░ fun(ctions) @@ -184,7 +194,8 @@ # connect to tmux on ssh # host autocomplete - $HOME/.zsh/completion/_ssux ssux() { - TERM=screen ssh -t "$@" 'tmux attach || tmux new' || ssh "$@" + test $# -gt 0 && SYSTEM="$@" || SYSTEM=$(tmux list-windows | awk '/*/{print $2}' | tr -d '*') + TERM=screen ssh -t "${SYSTEM}" 'tmux attach || tmux new' || ssh "${SYSTEM}" } # sets terminal title diff --git a/zsh/.zsh/keychain.zsh b/zsh/.zsh/keychain.zsh @@ -7,5 +7,7 @@ GPG_TTY=$(tty) export GPG_TTY # funtoo keychain -eval $(keychain -q --agents ssh,gpg --nogui --eval $SSH_KEY_DIR/*.prv 0xC7877C715113A16D) - +eval $(keychain -q --agents gpg --nogui --eval 0xC7877C715113A16D) +if [ "${gnupg_SSH_AUTH_SOCK_by:-0}" -ne $$ ] ; then + export SSH_AUTH_SOCK="$(gpgconf --list-dirs agent-ssh-socket)" +fi diff --git a/zsh/.zsh/prompt.zsh b/zsh/.zsh/prompt.zsh @@ -99,7 +99,7 @@ PROMPT='${USER_LEVEL}[${COLOR_NORMAL}%~${USER_LEVEL}]$(GIT_PROMPT)── - %f' tiny) #PROMPT='%F{3} %%${COLOR_NORMAL} ' # change prompt colour if started from vim -if [[ -v VIMRUNTIME ]] ; then +if [[ -v VIMRUNTIME || -v SSH_TTY ]] ; then PROMPT='%F{9} ──── ─${COLOR_NORMAL} ' else PROMPT='%F{11} ──── ─${COLOR_NORMAL} ' diff --git a/zsh/.zsh/welcome.zsh b/zsh/.zsh/welcome.zsh @@ -21,6 +21,7 @@ script() { tmux list-sessions >/dev/null 2>&1 || script # run on first tmux pane -if [[ $TMUX_PANE == "%0" ]] ; then +if [[ $TMUX_PANE == "%0" ]] && [[ ! -v VIMRUNTIME ]]; then $HOME/bin/ahoy fi +cat ~/tmp/logo5