dots/.bash_aliases

72 lines
1.5 KiB
Bash
Raw Normal View History

2021-12-31 12:43:26 +01:00
# Config quick-open
2020-04-07 22:24:30 +02:00
alias bashrc="vim ~/.bashrc"
alias aliasrc="vim ~/.aliasrc"
2020-12-03 12:00:52 +01:00
alias vimrc="vim ~/.vimrc"
2020-04-07 22:24:30 +02:00
2021-02-16 21:15:23 +01:00
# Navigation
2020-05-07 02:09:35 +02:00
alias ..="cd .."
2021-02-16 21:15:23 +01:00
alias .2="cd ../.."
alias .3="cd ../../.."
2020-05-07 02:09:35 +02:00
2020-08-18 18:22:50 +02:00
# Colorize output
2021-12-31 12:43:26 +01:00
2020-04-07 22:24:30 +02:00
alias ls="ls --color=auto"
alias grep="grep --color=auto"
2021-12-31 12:43:26 +01:00
alias ip="ip --color"
# Listing
2020-04-07 22:24:30 +02:00
2021-08-31 14:25:24 +02:00
alias l="ls -1"
alias ll="ls -lh"
alias lt="ls -lht"
alias la="ls -lha"
alias lta="ls -lhat"
alias ld="ls -d */" # list directories
2020-12-03 12:00:52 +01:00
# Safety
2021-12-31 12:43:26 +01:00
alias rm="rm -I --preserve-root"
alias mv="mv -iv"
alias cp="cp -iv"
alias ln="ln -i"
alias mkdir="mkdir -pv"
alias chown="chown --preserve-root"
alias chmod="chmod --preserve-root"
alias chgrp="chgrp --preserve-root"
2021-04-25 00:24:50 +02:00
# Clipboard
2020-08-18 18:22:50 +02:00
2021-04-25 00:24:50 +02:00
alias clip='xclip -sel clip'
2021-12-31 12:43:26 +01:00
alias srclip='clip -o | speedread -w 500'
2020-12-03 12:00:52 +01:00
2021-12-31 12:43:26 +01:00
# Other
alias df='df -kTh'
alias path='echo -e ${PATH//:/\\n}' # Pretty print path variables
alias cfg='/usr/bin/git --git-dir=/home/h/.cfg/ --work-tree=/home/h'
2020-05-07 02:09:35 +02:00
alias fzfpac="pacman -Slq | fzf -m --preview 'pacman -Si {1}' | xargs -ro sudo pacman -S"
2021-12-31 12:43:26 +01:00
alias zzz='systemctl suspend && exit'
alias o='xdg-open'
alias now='date +"%T"'
alias week='date +%V'
2020-05-07 02:09:35 +02:00
2021-12-31 12:43:26 +01:00
# Programs
alias g='git'
alias lm='xbacklight -set'
2020-04-07 22:24:30 +02:00
alias vi='vim'
alias py='python'
2020-11-02 18:09:18 +01:00
alias r5rs-repl='plt-r5rs --no-prim'
2021-12-31 12:43:26 +01:00
alias feh="feh -B black --scale-down --auto-zoom"
2020-05-07 16:08:53 +02:00
2021-12-31 12:43:26 +01:00
alias tlmgr='/usr/share/texmf-dist/scripts/texlive/tlmgr.pl --usermode'
2020-05-07 16:08:53 +02:00
2021-12-31 12:43:26 +01:00
reboot_to_windows ()
{
windows_title=$(grep -i windows /boot/grub/grub.cfg | cut -d "'" -f 2)
sudo grub-reboot "$windows_title" && sudo reboot
}
alias reboot-to-windows='reboot_to_windows'