archx/macx-resources/zshrc

44 lines
4 KiB
Bash
Raw Permalink Normal View History

2023-02-18 02:08:11 +01:00
export PATH="$PATH:/Users/$USER/Documents/scripts:/Users/$USER/.dotnet/tools"
export HOMEBREW_CASK_OPTS="--no-quarantine"
2023-02-27 21:50:02 +01:00
export PAGER="less"
export EDITOR="subl -nw"
export VISUAL="$EDITOR"
2023-02-18 02:08:11 +01:00
if type brew &>/dev/null; then
FPATH=$(brew --prefix)/share/zsh/site-functions:$FPATH
autoload -Uz compinit
compinit
fi
checkin () {
2023-06-03 19:02:59 +02:00
curl -H "Authorization: Bearer $(cat ~/.os-bootstrap/secrets/travelynx_token)" -d '{"reason": "ping", "status": {"checkedIn": true, "train": {"type": "'$1'", "no": "'$2'"}, "toStation": {"name": "'$3'"}}}' https://zotan.pw/travelynx.php
2023-02-18 02:08:11 +01:00
}
2023-02-27 21:50:02 +01:00
# editor aliases
alias vi="$EDITOR"
alias vim="$EDITOR"
2023-02-18 13:04:01 +01:00
alias nano="$EDITOR"
2023-02-27 21:50:02 +01:00
alias emacs="$EDITOR"
alias emacsclient="$EDITOR"
# system tool aliases
2023-02-18 02:08:11 +01:00
alias mtr="sudo mtr -z"
# dotnet project aliases
alias 'nat64decode'='/Users/zotan/Projects/nat64decode/bin/Release/net7.0/osx-arm64/publish/nat64decode'
alias 'tgcli'='dotnet run -v q --project ~/Projects/tgcli/tgcli/ -- -s -l'
# wireguard tunnel management aliases
alias 'wg-up'='sudo wg-quick up uplink'
alias 'wg-down'='sudo wg-quick down uplink'
alias 'wg-reconnect'='sudo wg-quick down uplink && sudo wg-quick up uplink'
# dotnet autocompile aliases
## compression for macos-arm64 disabled because it builds broken binaries
alias dotnet-autocompile='dotnet publish --self-contained -p:PublishSingleFile=true -p:DebugType=embedded -p:EnableCompressionInSingleFile=false -p:PublishReadyToRun=true -p:PublishTrimmed=true -p:TrimmerSingleWarn=false -p:SuppressTrimAnalysisWarnings=false -p:DebuggerSupport=false -c Release -r osx-arm64 && dotnet publish --self-contained -p:PublishSingleFile=true -p:DebugType=embedded -p:EnableCompressionInSingleFile=true -p:PublishReadyToRun=true -p:PublishTrimmed=true -p:TrimmerSingleWarn=false -p:SuppressTrimAnalysisWarnings=false -p:DebuggerSupport=false -c Release -r osx-x64 && dotnet publish --self-contained -p:PublishSingleFile=true -p:DebugType=embedded -p:EnableCompressionInSingleFile=true -p:PublishReadyToRun=true -p:PublishTrimmed=true -p:TrimmerSingleWarn=false -p:SuppressTrimAnalysisWarnings=false -p:DebuggerSupport=false -c Release -r linux-x64 && dotnet publish --self-contained -p:PublishSingleFile=true -p:DebugType=embedded -p:EnableCompressionInSingleFile=true -p:PublishReadyToRun=true -p:PublishTrimmed=true -p:TrimmerSingleWarn=false -p:SuppressTrimAnalysisWarnings=false -p:DebuggerSupport=false -c Release -r win-x64'
2023-02-27 21:50:02 +01:00
alias dotnet-autocompile-notrim='dotnet publish --self-contained -p:PublishSingleFile=true -p:DebugType=embedded -p:EnableCompressionInSingleFile=false -p:PublishReadyToRun=true -p:TrimmerSingleWarn=false -p:SuppressTrimAnalysisWarnings=false -p:DebuggerSupport=false -c Release -r osx-arm64 && dotnet publish --self-contained -p:PublishSingleFile=true -p:DebugType=embedded -p:EnableCompressionInSingleFile=true -p:PublishReadyToRun=true -p:TrimmerSingleWarn=false -p:SuppressTrimAnalysisWarnings=false -p:DebuggerSupport=false -c Release -r osx-x64 && dotnet publish --self-contained -p:PublishSingleFile=true -p:DebugType=embedded -p:EnableCompressionInSingleFile=true -p:PublishReadyToRun=true -p:TrimmerSingleWarn=false -p:SuppressTrimAnalysisWarnings=false -p:DebuggerSupport=false -c Release -r linux-x64 && dotnet publish --self-contained -p:PublishSingleFile=true -p:DebugType=embedded -p:EnableCompressionInSingleFile=true -p:PublishReadyToRun=true -p:TrimmerSingleWarn=false -p:SuppressTrimAnalysisWarnings=false -p:DebuggerSupport=false -c Release -r win-x64'
2023-02-18 02:08:11 +01:00
alias dotnet-autocompile-maconly='dotnet publish --self-contained -p:PublishSingleFile=true -p:DebugType=embedded -p:EnableCompressionInSingleFile=false -p:PublishReadyToRun=true -p:PublishTrimmed=true -p:TrimmerSingleWarn=false -p:SuppressTrimAnalysisWarnings=false -p:DebuggerSupport=false -c Release -r osx-arm64'
2023-06-03 19:02:59 +02:00
alias dotnet-autocompile-maconly-notrim='dotnet publish --self-contained -p:PublishSingleFile=true -p:DebugType=embedded -p:EnableCompressionInSingleFile=false -p:PublishReadyToRun=true -p:TrimmerSingleWarn=false -p:SuppressTrimAnalysisWarnings=false -p:DebuggerSupport=false -c Release -r osx-arm64'