dotfiles/.bashrc

50 lines
1.6 KiB
Bash
Raw Normal View History

2023-08-14 07:44:10 +00:00
#
# ~/.bashrc
#
# If not running interactively, don't do anything
[[ $- != *i* ]] && return
# alias ls='ls --color=auto'
2023-09-05 03:24:29 +00:00
PS1='\[\e[38;5;249m\]+$(jobs | wc -l)\[\e[38;5;24m\][$(ip route get 1.1.1.1 2>/dev/null | awk -F"src " '"'"'NR==1{split($2,a," ");print a[1]}'"'"')\[\e[38;5;46m\]:\[\e[38;5;208m\]\W\[\e[38;5;24m\]]\$ \[\e[0m\]'
2023-08-14 07:44:10 +00:00
alias luamake=/home/oliver/sources/lua-language-server/3rd/luamake/luamake
alias l=lfcd
alias clip="xclip -selection clipboard"
alias phone="simple-mtpfs"
alias bell="paplay /usr/share/sounds/freedesktop/stereo/complete.oga"
2023-12-14 08:26:52 +00:00
alias usage="du -h -d 1 2> /dev/null | sort -h"
2023-08-14 09:56:55 +00:00
# For laptop multi-gpu offloading
alias nvidia_gpu="DRI_PRIME=1 __NV_PRIME_RENDER_OFFLOAD=1 __GLX_VENDOR_LIBRARY_NAME=nvidia"
2023-08-20 12:42:01 +00:00
# Opinionated defaults
2023-08-14 11:18:55 +00:00
alias feh="swallow feh --force-aliasing --draw-exif --scale-down --draw-filename"
2023-08-20 12:42:01 +00:00
alias ffplay="swallow ffplay $@"
alias shutdown="shutdown -P now"
alias untar="tar -xvf $@"
2023-12-14 08:26:52 +00:00
alias cura="cura5 -platformtheme gtk3"
2023-08-14 07:44:10 +00:00
export DENO_INSTALL="/home/oliver/.deno"
export PATH="$PATH:$DENO_INSTALL/bin:$HOME/.cargo/bin:$HOME/.local/bin/"
2023-08-14 07:44:10 +00:00
export DOTNET_CLI_TELEMETRY_OPTOUT=1
export TORCH_CUDA_VERSION="cu117"
export LIBTORCH="/home/oliver/sources/libtorchcxx11"
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:${LIBTORCH}/lib"
2023-08-14 07:44:10 +00:00
export WINEPREFIX="$HOME/.wine/"
export DXVK_HUD="fps,compiler"
2023-08-14 07:44:10 +00:00
export EDITOR="nvim"
export TZ='America/Denver'
2023-08-14 07:44:10 +00:00
2023-08-14 11:18:55 +00:00
lfcd() {
tmp="$(mktemp)"
lfrun -last-dir-path="$tmp" "$@"
if [ -f "$tmp" ]; then
dir="$(cat "$tmp")"
rm -f "$tmp"
if [ -d "$dir" ]; then
if [ "$dir" != "$(pwd)" ]; then
# needs to be in the .bashrc so it can cd for us
cd "$dir"
fi
fi
fi
}