aboutsummaryrefslogtreecommitdiff
path: root/bash/.bash/01-aliases.bash
blob: 514ba5693def20e720e3f635c3618321a0f11d47 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
#!/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 g++='g++ --std=c++20'
alias vim='vim -p'
alias gs='gs -dNOSAFER'

# cd shortcuts
alias ..='cd ..'
alias ...='cd ../..'
alias ....='cd ../../..'
alias b='cd -'

# copy an entire file
alias copy='xclip -sel c <'

# local apps
alias carmine-impact='cd /home/bryson/git/cardboard && ./cardboard_unix'
alias celeste='cd /home/bryson/apps/celeste && ./Celeste.bin.x86_64'
alias dont-move='cd /home/bryson/apps/dont-move && ./DontMove'
alias friday-night-funkin='cd /home/bryson/apps/friday-night-funkin && ./Funkin'
alias overland='cd /home/bryson/apps/overland && ./Overland.x86_64'
alias sm64ex='cd /home/bryson/git/sm64ex/build/us_pc/./sm64.us.f3dex2e'

# 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'
alias nolib='xrandr --output HDMI-A-0 --off --output eDP --auto'

# 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}
}

# common portage files
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'

# 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"
alias emerge-update="sudo emerge --ask --verbose --update --deep --changed-use @world"