#!/bin/bash # # 01-aliases.bash # bryson's bash aliases # shopt -s expand_aliases alias sudo="doas" # typos alias l='ls' alias sl='ls' alias balls='sudo $(fc -ln -1)' # 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/mountains-2.jpg && xmodmap ~/.Xmodmap' alias nolib='xrandr --output HDMI-A-0 --off --output eDP --auto && feh --bg-fill ~/git/wallpapers-exorcist/gruvbox/mountains-2.jpg' alias hgrep='history | grep' alias keys='xset r rate 300 50' alias gits='git status' alias mac="rm -rf __MACOSX/; rm \$(find . -name '.DS_Store')" alias super='xmodmap -e "remove mod1 = Alt_L"; xmodmap -e "remove mod4 = Super_L"; xmodmap -e "add mod1 = Super_L"; xmodmap -e "add mod4 = Alt_L"' alias make-kernel='sudo genkernel --luks --lvm --install --kernel-config=/proc/config.gz --microcode=intel all && sudo grub-mkconfig -o /boot/grub/grub.cfg' # bash navigation alias aa='vim ~/.bash/01-aliases.bash; . ~/.bash_profile' 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' alias fixkeb='xmodmap ~/.Xmodmap ; xset r rate 200 80 ' # auto elevate alias mount='sudo mount' alias umount='sudo umount' # other garbage alias server="python3 /home/bryson/git/webserver/server.py"