-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathalias
More file actions
98 lines (74 loc) · 3.14 KB
/
alias
File metadata and controls
98 lines (74 loc) · 3.14 KB
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
88
89
90
91
92
93
94
95
96
97
98
#!/bin/sh
# Add color support
alias dir='dir --color=auto'
alias vdir='vdir --color=auto'
alias grep='grep --color=auto'
alias fgrep='fgrep --color=auto'
alias egrep='egrep --color=auto'
# bat
alias bat='batcat'
# cmake
alias cmakej="cmake -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -G Ninja"
alias cmakebt='ctest --timeout 1 --build-and-test . build --build-generator Ninja --test-command ctest --output-on-failure'
alias cmakeqt14and='cmakej -DQt5_DIR=${XDG_LOCAL_HOME}/lib/Qt/5.14.1/android/lib/cmake/Qt5'
alias cmakeqt14gcc='cmakej -DQt5_DIR=${XDG_LOCAL_HOME}/lib/Qt/5.14.1/gcc_64/lib/cmake/Qt5'
alias cmakeqt12gcc='cmakej -DQt5_DIR=${XDG_LOCAL_HOME}/lib/Qt/5.12.3/gcc_64/lib/cmake/Qt5'
# darling
alias darling='env -i HOME=${HOME} DPREFIX=${DPREFIX} TERM=${TERM} PATH=${PATH} darling'
# date
alias hours='date +%T'
alias day='date +%A'
alias month='date +%B'
alias year='date +%Y'
# df
alias df='df -h -x tmpfs'
if [ "$(uname -o)" == "Msys" ]; then
alias fd='fd --path-separator //'
alias rg='rg --path-separator //'
fi
alias fd='fdfind'
alias ffmpeg='ffmpeg -hide_banner'
alias ffplay='ffplay -hide_banner'
alias ffprobe='ffprobe -hide_banner'
if [ "$(uname -o)" == "Msys" ]; then
alias finished='if [ $? == 0 ]; then FINISHED_TITLE=Succeeded; FINISHED_ICON="info"; (play-success &); else FINISHED_TITLE="Failed"; FINISHED_ICON="error"; (play-fail &); fi; (notify-send -i ${FINISHED_ICON} "${FINISHED_TITLE}" " " &)'
else
alias finished='if [ $? == 0 ]; then FINISHED_TITLE=Succeeded; FINISHED_ICON="/usr/share/icons/breeze/emblems/8/emblem-success.svg"; (play-success &); else FINISHED_TITLE="Failed"; FINISHED_ICON="/usr/share/icons/Yaru/256x256@2x/status/dialog-error.png"; (play-fail &); fi; notify-send --icon=${FINISHED_ICON} ${FINISHED_TITLE}'
fi;
alias gdb='gdb --silent'
alias gdba='gdb --args'
alias god-gdb='echo -1 | sudo tee /proc/sys/kernel/perf_event_paranoid >/dev/null && echo 0 | sudo tee /proc/sys/kernel/yama/ptrace_scope >/dev/null && echo 0 | sudo tee /proc/sys/kernel/kptr_restrict >/dev/null'
if [ "$(uname -o)" == "Msys" ]; then
alias kill='/usr/bin/kill -f'
fi
# ls
alias ls='ls --color=auto --group-directories-first'
alias ll='ls -lh'
alias la='ls -A'
alias lla='ls -lAh'
# lsblk
alias lsblk='lsblk -e 7'
# neofetch
alias neofetch='neofetch --ascii ${XDG_CONFIG_HOME}/neofetch/$(hostname)_image'
# xdg-open
if [ "$(uname -o)" == "Msys" ]; then
alias open='start'
elif [ "$(uname)" == "Linux" ]; then
alias open='xdg-open'
fi
# qjoypad
alias qjoypad='qjoypad --notray'
# rm
alias rm='rm --preserve-root'
alias serial-number='sudo dmidecode -s system-serial-number'
alias shred='shred -u'
alias syscalls-list='ls /usr/share/man/man2 | sed -e s/.2.gz//g | xargs man -s 2 -k | sort | grep -v "unimplemented system calls"'
# tmux
alias lock='tmux detach > /dev/null'
alias tmux-default-cfg='tmux -Lfoo -f/dev/null start\; show -gw'
alias tmux-current-cfg='tmux -Lfoo -f/dev/null start\; show -g'
# tree
alias tree='tree --dirsfirst'
# watchexec helpers
alias runaout='watchexec --clear --ignore *pp ./a.out'
alias runcmakebt='watchexec --clear --ignore build "ctest --build-and-test . build --build-generator Ninja --test-command ctest --output-on-failure"'