Compare commits
3 Commits
05ee0bf5f1
...
4bdbfa0c0d
Author | SHA1 | Date |
---|---|---|
|
4bdbfa0c0d | |
|
ee49296d41 | |
|
e35cf075bf |
|
@ -1,28 +1,9 @@
|
||||||
# shellcheck shell=bash
|
# shellcheck shell=bash
|
||||||
# vim: set ft=bash :
|
# vim: set ft=bash :
|
||||||
|
|
||||||
# Alias aliases
|
|
||||||
alias al=alias
|
|
||||||
alias alf="alias | fzf"
|
|
||||||
alias al-=unalias
|
|
||||||
|
|
||||||
# Edit configuration files
|
|
||||||
alias eba="nvim ~/.bashrc"
|
|
||||||
alias eal="nvim ~/.bash_aliasrc"
|
|
||||||
alias ev="edit_editor_config"
|
|
||||||
|
|
||||||
# Navigation
|
|
||||||
|
|
||||||
alias ..="cd .."
|
alias ..="cd .."
|
||||||
alias .2="cd ../.."
|
|
||||||
alias .3="cd ../../.."
|
|
||||||
|
|
||||||
# Colorize output
|
|
||||||
alias ls="ls --color=auto"
|
alias ls="ls --color=auto"
|
||||||
alias grep="grep --color=auto"
|
|
||||||
alias ip="ip --color"
|
|
||||||
|
|
||||||
# Listing
|
|
||||||
alias l="ls -1p"
|
alias l="ls -1p"
|
||||||
alias ll="ls -lhp"
|
alias ll="ls -lhp"
|
||||||
alias lt="ls -lhtp"
|
alias lt="ls -lhtp"
|
||||||
|
@ -30,7 +11,8 @@ alias la="ls -lhap"
|
||||||
alias lta="ls -lhatp"
|
alias lta="ls -lhatp"
|
||||||
alias ldir="ls -dp" # list directories
|
alias ldir="ls -dp" # list directories
|
||||||
|
|
||||||
# Safety
|
alias grep="grep --color=auto"
|
||||||
|
|
||||||
alias rm="rm -I --preserve-root"
|
alias rm="rm -I --preserve-root"
|
||||||
alias mv="mv -iv"
|
alias mv="mv -iv"
|
||||||
alias cp="cp -iv"
|
alias cp="cp -iv"
|
||||||
|
@ -40,12 +22,13 @@ alias chown="chown --preserve-root"
|
||||||
alias chmod="chmod --preserve-root"
|
alias chmod="chmod --preserve-root"
|
||||||
alias chgrp="chgrp --preserve-root"
|
alias chgrp="chgrp --preserve-root"
|
||||||
|
|
||||||
# Clipboard
|
alias ip="ip --color"
|
||||||
alias clip="xclip -sel clip"
|
alias ipa="ip -brief address"
|
||||||
alias srclip="clip -o | speedread -w 500"
|
alias ipl="ip -brief link"
|
||||||
|
alias ipr="ip route"
|
||||||
|
|
||||||
|
alias clip="xclip -sel clip"
|
||||||
|
|
||||||
# Other
|
|
||||||
alias cfg="/usr/bin/git --git-dir=/home/h/.git/ --work-tree=/home/h"
|
|
||||||
alias df="df -kTh"
|
alias df="df -kTh"
|
||||||
alias fzfpac="pacman -Slq | fzf -m --preview 'pacman -Si {1}' | xargs -ro sudo pacman -S"
|
alias fzfpac="pacman -Slq | fzf -m --preview 'pacman -Si {1}' | xargs -ro sudo pacman -S"
|
||||||
alias path='echo -e ${PATH//:/\\n}' # Pretty print path variables
|
alias path='echo -e ${PATH//:/\\n}' # Pretty print path variables
|
||||||
|
@ -59,12 +42,9 @@ alias tsh='tasksh'
|
||||||
alias z='zathura --fork'
|
alias z='zathura --fork'
|
||||||
alias f='fzf'
|
alias f='fzf'
|
||||||
alias fm='pcmanfm &>/dev/null &'
|
alias fm='pcmanfm &>/dev/null &'
|
||||||
alias xev='xev | grep -A2 ButtonPress' # Ignore mouse movements
|
|
||||||
alias mm='micromamba'
|
alias mm='micromamba'
|
||||||
|
|
||||||
# Languages
|
# Languages
|
||||||
alias js="node"
|
|
||||||
alias ts="ts-node"
|
|
||||||
alias r5="plt-r5rs --no-prim"
|
alias r5="plt-r5rs --no-prim"
|
||||||
alias hs="ghci"
|
alias hs="ghci"
|
||||||
alias pl="swipl"
|
alias pl="swipl"
|
||||||
|
@ -74,33 +54,3 @@ alias r="R"
|
||||||
alias azerty="setxkbmap be"
|
alias azerty="setxkbmap be"
|
||||||
alias qwerty="setxkbmap us"
|
alias qwerty="setxkbmap us"
|
||||||
alias cole="setxkbmap us -variant colemak"
|
alias cole="setxkbmap us -variant colemak"
|
||||||
|
|
||||||
yarn() {
|
|
||||||
if [[ -f "package-lock.json" ]]; then
|
|
||||||
echo "WARNING: package-lock.json exists"
|
|
||||||
read -p "Are you sure you want to run yarn? [y/N] " -n 1 -r
|
|
||||||
echo
|
|
||||||
if [[ $REPLY =~ ^[Yy]$ ]]; then
|
|
||||||
command yarn "$@"
|
|
||||||
else
|
|
||||||
echo "Aborted"
|
|
||||||
fi
|
|
||||||
else
|
|
||||||
command yarn "$@"
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
npm() {
|
|
||||||
if [[ -f "yarn.lock" ]]; then
|
|
||||||
echo "WARNING: yarn.lock exists"
|
|
||||||
read -p "Are you sure you want to run npm? [y/N] " -n 1 -r
|
|
||||||
echo
|
|
||||||
if [[ $REPLY =~ ^[Yy]$ ]]; then
|
|
||||||
command npm "$@"
|
|
||||||
else
|
|
||||||
echo "Aborted"
|
|
||||||
fi
|
|
||||||
else
|
|
||||||
command npm "$@"
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
|
# shellcheck shell=bash
|
||||||
# vim: set ft=bash :
|
# vim: set ft=bash :
|
||||||
|
|
||||||
source "$HOME/.bash_aliases/dualboot"
|
source "$HOME/.bash_aliases/dualboot"
|
||||||
|
|
||||||
alias lm='ddcutil setvcp 10'
|
alias lm='ddcutil setvcp 10'
|
||||||
|
|
||||||
alias cuda-available='python -c "import torch; print(\"CUDA enabled:\", torch.cuda.is_available());"'
|
alias cuda-available='python -c "import torch; print(\"CUDA enabled:\", torch.cuda.is_available());"'
|
||||||
|
|
|
@ -0,0 +1,35 @@
|
||||||
|
# shellcheck shell=bash
|
||||||
|
# vim: set ft=bash :
|
||||||
|
|
||||||
|
alias js="node"
|
||||||
|
alias ts="ts-node"
|
||||||
|
|
||||||
|
yarn() {
|
||||||
|
if [[ -f "package-lock.json" ]]; then
|
||||||
|
echo "WARNING: package-lock.json exists"
|
||||||
|
read -p "Are you sure you want to run yarn? [y/N] " -n 1 -r
|
||||||
|
echo
|
||||||
|
if [[ $REPLY =~ ^[Yy]$ ]]; then
|
||||||
|
command yarn "$@"
|
||||||
|
else
|
||||||
|
echo "Aborted"
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
command yarn "$@"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
npm() {
|
||||||
|
if [[ -f "yarn.lock" ]]; then
|
||||||
|
echo "WARNING: yarn.lock exists"
|
||||||
|
read -p "Are you sure you want to run npm? [y/N] " -n 1 -r
|
||||||
|
echo
|
||||||
|
if [[ $REPLY =~ ^[Yy]$ ]]; then
|
||||||
|
command npm "$@"
|
||||||
|
else
|
||||||
|
echo "Aborted"
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
command npm "$@"
|
||||||
|
fi
|
||||||
|
}
|
1
.bashrc
1
.bashrc
|
@ -14,6 +14,7 @@
|
||||||
[ -f "$HOME/.bash_aliases/all" ] && . "$HOME/.bash_aliases/all"
|
[ -f "$HOME/.bash_aliases/all" ] && . "$HOME/.bash_aliases/all"
|
||||||
[ -f "$HOME/.bash_aliases/hosts/$HOSTNAME" ] && . "$HOME/.bash_aliases/hosts/$HOSTNAME"
|
[ -f "$HOME/.bash_aliases/hosts/$HOSTNAME" ] && . "$HOME/.bash_aliases/hosts/$HOSTNAME"
|
||||||
[ -f "$HOME/.bash_aliases/private" ] && . "$HOME/.bash_aliases/private"
|
[ -f "$HOME/.bash_aliases/private" ] && . "$HOME/.bash_aliases/private"
|
||||||
|
[ -f "$HOME/.bash_aliases/lang-js" ] && . "$HOME/.bash_aliases/lang-js"
|
||||||
command -v jira >/dev/null && [ -f "$HOME/.bash_aliases/jira" ] && . "$HOME/.bash_aliases/jira"
|
command -v jira >/dev/null && [ -f "$HOME/.bash_aliases/jira" ] && . "$HOME/.bash_aliases/jira"
|
||||||
|
|
||||||
# Completions {{{
|
# Completions {{{
|
||||||
|
|
Loading…
Reference in New Issue