More bits

This commit is contained in:
Gene Liverman 2023-08-16 21:46:10 -04:00
parent 70ae1cd6b3
commit 919c18f69e
2 changed files with 36 additions and 14 deletions

View file

@ -105,6 +105,11 @@
repo: 'https://github.com/genebean/my-oh-zsh-plugins'
dest: "{{ lookup('env', 'HOME') }}/repos/customized-oh-my-zsh/plugins"
- name: Clone zsh-autosuggestions
ansible.builtin.git:
repo: 'https://github.com/zsh-users/zsh-autosuggestions'
dest: "{{ lookup('env', 'HOME') }}/repos/customized-oh-my-zsh/plugins/zsh-autosuggestions"
- name: Clone my oh-my-zsh themes
ansible.builtin.git:
repo: 'https://github.com/genebean/my-oh-zsh-themes'

View file

@ -84,7 +84,7 @@ ZSH_CUSTOM=~/repos/customized-oh-my-zsh
# Custom plugins may be added to ~/.oh-my-zsh/custom/plugins/
# Example format: plugins=(rails git textmate ruby lighthouse)
# Add wisely, as too many plugins slow down shell startup.
plugins=(brew bundler gem git github history kube-ps1 kubectl macos pip python terraform vagrant vscode)
plugins=(brew bundler gem git github history kube-ps1 kubectl macos pip python terraform vagrant vscode zsh-autosuggestions)
source $ZSH/oh-my-zsh.sh
@ -99,7 +99,7 @@ if [[ $(uname) == 'Darwin' ]]; then
export PATH=/usr/local/MacGPG2/bin:$PATH
fi
# export GPG_TTY=$(tty)
export GPG_TTY=$(tty)
# export SSH_AUTH_SOCK=$(gpgconf --list-dirs agent-ssh-socket)
# gpgconf --launch gpg-agent
@ -122,10 +122,12 @@ alias gbc='git branch --merged | command grep -vE "^(\*|\s*(main|master|develop|
alias gitextract='git log --pretty=email --patch-with-stat --reverse --full-index --binary --'
alias gpge='gpg2 --encrypt --sign --armor -r '
alias hubpr='hub pull-request --push --browse'
alias pssh='ssh -o "UserKnownHostsFile /dev/null" -o "StrictHostKeyChecking no" -i ~/.ssh/id_rsa-acceptance'
alias pssh='ssh -o "UserKnownHostsFile /dev/null" -o "StrictHostKeyChecking no" -o PubkeyAcceptedKeyTypes=+ssh-rsa -o HostKeyAlgorithms=+ssh-rsa -o KexAlgorithms=+diffie-hellman-group1-sha1 -i ~/.ssh/id_rsa-acceptance'
alias sal='ssh-add -L'
alias st='open -a SourceTree'
alias sz='source ~/.zshrc'
alias usegpg='killall ssh-agent; export SSH_AUTH_SOCK=$(gpgconf --list-dirs agent-ssh-socket) && gpgconf --launch gpg-agent'
alias usessh='gpgconf --kill gpg-agent'
# aliases whose command changes based on OS
if [[ `uname` == 'Linux' ]]; then
@ -139,8 +141,33 @@ if [[ `uname` == 'Linux' ]]; then
alias enable-ruby-27='source ~/enable-ruby-27'
alias pbcopy='xclip -selection clipboard'
alias pbpaste='xclip -selection clipboard -o'
alias uwgconnect='nmcli dev wifi connect SecureWest password'
alias uwgroute='nmcli connection modify SecureWest ipv4.route-metric 20; nmcli radio wifi off; nmcli radio wifi on'
alias uwgforget='nmcli connection delete SecureWest'
function popup() {
echo 'checking for updates via apt...'
sudo apt update
sudo apt upgrade -y
echo
echo 'checking for updates via flatpak...'
flatpak update
echo
echo 'checking for updates via snap...'
sudo snap refresh
echo
echo 'checking for updates via brew...'
brew update
brew upgrade
echo
echo 'checking for updates to Zoom'
wget -O /tmp/zoom_amd64.deb https://zoom.us/client/latest/zoom_amd64.deb && sudo apt-get install -y /tmp/zoom_amd64.deb; rm -f /tmp/zoom_amd64.deb
echo
echo 'checking for firmware updates...'
sudo fwupdmgr refresh --force && sudo fwupdmgr get-updates && sudo fwupdmgr update
echo
echo 'all done :)'
}
fi
if [[ `uname` != 'Linux' ]]; then
@ -152,16 +179,6 @@ if [[ `uname` != 'Linux' ]]; then
}
fi
# helper for aws and assume-role
function awsrole() {
echo "Enter MFA token:"
read mfatoken
eval $(assume-role $1 $AWS_HELPER_USERNAME $mfatoken)
}
function aws_account_info {
[ "$AWS_ACCOUNT_NAME" ] && [ "$AWS_ACCOUNT_ROLE" ] && echo "%{$reset_color%}%{$fg[blue]%}aws:(%{$reset_color%}%{$fg[red]%}$AWS_ACCOUNT_NAME:$AWS_ACCOUNT_ROLE%{$fg[blue]%})%{$reset_color%}"
}
# )ofni_tnuocca_swa($ is $(aws_account_info) backwards
#PROMPT=`echo $PROMPT | rev | sed 's/ / )ofni_tnuocca_swa($ /'| rev`
@ -250,7 +267,7 @@ elif [[ `uname` == 'Linux' ]]; then
if [ -d "$HOME/.pulumi/bin" ] ; then
PATH=$PATH:$HOME/.pulumi/bin
fi
if [ -d "$HOME/.local/share/gem/ruby/3.0.0/bin" ] ; then
PATH="$HOME/.local/share/gem/ruby/3.0.0/bin:$PATH"
fi