This repository has been archived on 2024-07-10. You can view files and clone it, but cannot push or open issues or pull requests.
dotfiles-nix/zsh/.zshrc

85 lines
2.3 KiB
Bash

# zsh
export ZSH=/home/simon/.oh-my-zsh
ZSH_THEME="bira"
plugins=(git)
source $ZSH/oh-my-zsh.sh
# autocomplete
[[ $commands[kubectl] ]] && source <(kubectl completion zsh)
# generic
alias cat="bat"
alias ccat="/usr/bin/cat"
# hyperland
alias tata="hyprctl dispatch exit"
# git
alias gfo="git fetch origin"
alias gmo="git merge origin/master"
alias gpo="git push origin"
alias gfu="git fetch upstream"
alias gmu="git merge upstream/master"
# teleport
alias tlogin="tsh login --proxy=tele.simoncor.net --user=siempie"
alias tssh="tsh ssh"
# fedora update
alias fupdate="sudo dnf update -y && sudo flatpak update -y && sudo fwupdmgr refresh --force && sudo fwupdmgr update"
# wireguard
alias wg-start="nmcli connection up wg0"
alias wg-stop="nmcli connection down wg0"
alias wg-status="nmcli --overview connection show wg0"
# manage sshfs mounts
# media
alias sj-mount-media="sshfs nas.siempie.local:/tank/media/ /home/simon/remotedir/media"
alias umount-media="sudo umount /home/simon/remotedir/media"
# siempie
alias sj-mount-siempie="sshfs nas.siempie.local:/tank/siempie/ /home/simon/remotedir/siempie"
alias umount-siempie="sudo umount /home/simon/remotedir/siempie"
# manage screen tunnels
# siempie
alias start-siempie-tunnel="screen -S siempie-tunnel -d -m ssh -N -D 9001 siempie.com"
alias stop-siempie-tunnel="screen -S siempie-tunnel -p 0 -X quit"
# it creation
alias start-itc-jump="screen -S jumphost-itc -d -m ssh -N -D 9002 jumphost-itc"
alias stop-itc-jump="screen -S jumphost-itc -p 0 -X quit"
# multipost
alias start-mp-tunnel="screen -S multipost-tunnel -d -m ssh -N -D 9003 mp-centurion"
alias stop-mp-tunnel="screen -S multipost-tunnel -p 0 -X quit"
# duijvelaar-pompen
alias start-dp-tunnel="screen -S dp-tunnel -d -m ssh -N -D 9004 dp-fw-01"
alias stop-dp-tunnel="screen -S dp-tunnel -p 0 -X quit"
# pharmeon
alias start-pharmeon-tunnel="screen -S pharmeon-tunnel -d -m ssh -N -D 9005 jumphost-ph"
alias stop-pharmeon-tunnel="screen -S pharmeon-tunnel -p 0 -X quit"
# force language
export LC_ALL="en_US.UTF-8"
# weather
function weather() {
if [ "$1" != "" ]
then
curl https://wttr.in/$1
else
curl https://wttr.in/Krimpen_Aan_Den_IJssel
fi
}
# k9s
alias k9s="ssh k9s.siempie.internal -t /home/simon/.local/bin/k9s"
[ -s "$HOME/.config/envman/load.sh" ] && source "$HOME/.config/envman/load.sh"