2021-12-31 12:43:26 +01:00
|
|
|
# Config quick-open
|
|
|
|
|
2023-03-12 13:10:50 +01:00
|
|
|
alias bashrc="nvim ~/.bashrc"
|
|
|
|
alias aliasrc="nvim ~/.aliasrc"
|
|
|
|
alias vimrc="nvim ~/.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
|
|
|
|
2022-05-11 00:43:33 +02:00
|
|
|
alias l="ls -1p"
|
|
|
|
alias ll="ls -lhp"
|
|
|
|
alias lt="ls -lhtp"
|
|
|
|
alias la="ls -lhap"
|
|
|
|
alias lta="ls -lhatp"
|
2022-05-12 09:32:07 +02:00
|
|
|
alias ldir="ls -dp" # 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
|
|
|
|
2022-05-11 00:43:33 +02:00
|
|
|
alias clip="xclip -sel clip"
|
|
|
|
alias srclip="clip -o | speedread -w 500"
|
2020-12-03 12:00:52 +01:00
|
|
|
|
2021-12-31 12:43:26 +01:00
|
|
|
# Other
|
|
|
|
|
2023-05-01 15:35:18 +02:00
|
|
|
alias cfg="/usr/bin/git --git-dir=/home/h/.git/ --work-tree=/home/h"
|
2022-05-11 00:43:33 +02:00
|
|
|
alias df="df -kTh"
|
2020-05-07 02:09:35 +02:00
|
|
|
alias fzfpac="pacman -Slq | fzf -m --preview 'pacman -Si {1}' | xargs -ro sudo pacman -S"
|
2023-05-15 13:59:40 +02:00
|
|
|
alias path='echo -e ${PATH//:/\\n}' # Pretty print path variables
|
2020-05-07 02:09:35 +02:00
|
|
|
|
2021-12-31 12:43:26 +01:00
|
|
|
# Programs
|
|
|
|
|
2023-05-15 14:00:41 +02:00
|
|
|
alias o="xdg-open"
|
2022-12-01 16:13:46 +01:00
|
|
|
alias v="nvim"
|
2023-05-01 15:34:27 +02:00
|
|
|
alias zk="nvim +WikiIndex"
|
2021-12-31 12:43:26 +01:00
|
|
|
alias g='git'
|
2023-05-15 14:00:41 +02:00
|
|
|
alias t=' task'
|
|
|
|
alias tsh='tasksh'
|
|
|
|
alias z='zathura --fork'
|
|
|
|
alias f='fzf'
|
|
|
|
alias fm='pcmanfm &>/dev/null &'
|
2021-12-31 12:43:26 +01:00
|
|
|
alias lm='xbacklight -set'
|
2022-05-11 00:43:33 +02:00
|
|
|
alias xev='xev | grep -A2 ButtonPress' # Ignore mouse movements
|
2023-05-15 13:37:29 +02:00
|
|
|
alias conda='micromamba'
|
2020-05-07 16:08:53 +02:00
|
|
|
|
2023-05-15 14:00:41 +02:00
|
|
|
# Languages
|
|
|
|
|
|
|
|
alias js="node"
|
|
|
|
alias ts="ts-node"
|
|
|
|
alias r5="plt-r5rs --no-prim"
|
|
|
|
alias hs="ghci"
|
|
|
|
alias pl="swipl"
|
|
|
|
alias py="python"
|
|
|
|
alias r="R"
|
|
|
|
|
|
|
|
reboot_windows ()
|
2021-12-31 12:43:26 +01:00
|
|
|
{
|
2022-12-01 16:38:19 +01:00
|
|
|
# Check if grub is installed by checking if the command exists, if it does
|
|
|
|
# not, then assume that the system is using systemd-boot
|
|
|
|
if grub-install --version &>/dev/null; then
|
|
|
|
windows_title=$(grep -i windows /boot/grub/grub.cfg | cut -d "'" -f 2)
|
|
|
|
sudo grub-reboot "$windows_title"
|
|
|
|
echo "Grub set to reboot to Windows"
|
|
|
|
else
|
|
|
|
sudo bootctl set-oneshot windows.conf
|
|
|
|
echo "Systemd set to reboot to Windows"
|
|
|
|
fi
|
2021-12-31 12:43:26 +01:00
|
|
|
}
|
2023-05-15 14:00:41 +02:00
|
|
|
alias reboot-windows='reboot_windows'
|
|
|
|
|
|
|
|
alias azerty="setxkbmap be"
|
|
|
|
alias qwerty="setxkbmap us"
|