#!/bin/bash # # 01-aliases.bash # bryson's bash aliases # shopt -s expand_aliases alias sudo="doas" # typos alias l='ls' alias sl='ls' # always run with args alias grep='grep --color=auto' alias fgrep='fgrep --color=auto' alias egrep='egrep --color=auto' alias ls='ls --color=auto' alias la='ls -a' alias ll='ls -lh' alias cp='cp -iv' alias mv='mv -iv' alias rm='rm -vI' alias diff='diff --color=auto' alias g++='g++ --std=c++20' alias vim='vim -p' alias gs='gs -dNOSAFER' # cd shortcuts alias ..='cd ..' alias ...='cd ../..' alias ....='cd ../../..' alias b='cd -' # portage aliases alias emerge-update="sudo emerge --ask --verbose --update --deep --changed-use @world" alias package.use='sudo vim /etc/portage/package.use' alias make.conf='sudo vim /etc/portage/make.conf' alias package.license='sudo vim /etc/portage/package.license' alias world='vim -R /var/lib/portage/world' # copy an entire file alias copy='xclip -sel c <' # binary substitutions alias java='/usr/local/java/jdk-18.0.1.1/bin/java' alias java11='/usr/bin/java' alias python='python3' alias ed='fzf --height=15 --layout=reverse | sed "s/^/\"/g;s/$/\"/g" | xargs -ro vim' # common combinations alias dj='python manage.py' alias smci='sudo make clean install' alias smi='sudo make install' alias lib='xrandr --output HDMI-A-0 --auto --output eDP --off && xset r rate 300 50 && feh --bg-fill ~/git/wallpapers-exorcist/gruvbox/volcano-landscape.jpg' alias nolib='xrandr --output HDMI-A-0 --off --output eDP --auto' alias keys='xset r rate 300 50' alias gits='git status' # bash navigation alias aa='vim ~/.bash/01-aliases.bash; . ~/.bash_profile' s() { find . -type f -exec grep ${1} {} \; } ssh-pixel() { ssh -p 8022 uO_14O@${1} } # fixes alias fixwifi='sudo rc-service wpa_supplicant restart' alias fixaudio='pacmd set-default-sink alsa_output.usb-0c76_USB_PnP_Audio_Device-00.analog-stereo' alias fixjava='export _JAVA_AWT_WM_NONREPARENTING=1 && export AWT_TOOLKIT=MToolkit && wmname LG3D' # auto elevate alias mount='sudo mount' alias umount='sudo umount' # other garbage alias macos="cd /home/bryson/git/macOS-Simple-KVM && ./basic.sh" alias server="python3 /home/bryson/git/webserver/server.py"