37 lines
1.3 KiB
Bash
37 lines
1.3 KiB
Bash
#!/bin/sh
|
|
|
|
# New commands
|
|
alias clip="xclip -selection clipboard"
|
|
alias phone="simple-mtpfs"
|
|
alias bell="paplay /usr/share/sounds/freedesktop/stereo/complete.oga"
|
|
alias usage="du -h -d 1 2> /dev/null | sort -h"
|
|
# alias alert='notify-send --urgency=low -i "$([ $? = 0 ] && echo terminal || echo error)" "$(history|tail -n1|sed -e '\''s/^\s*[0-9]\+\s*//;s/[;&|]\s*alert$//'\'')"'
|
|
|
|
# For laptop multi-gpu offloading
|
|
alias nvidia_gpu="DRI_PRIME=1 __NV_PRIME_RENDER_OFFLOAD=1 __GLX_VENDOR_LIBRARY_NAME=nvidia"
|
|
|
|
# Opinionated defaults
|
|
alias feh="swallow feh --force-aliasing --draw-exif --scale-down --draw-filename"
|
|
alias ffplay="swallow ffplay $@"
|
|
alias shutdown="shutdown -P now"
|
|
alias untar="tar -xvf $@"
|
|
alias cura="cura5 -platformtheme gtk3"
|
|
alias cp="cp -iv"
|
|
alias mv="mv -iv"
|
|
alias rm="rm -vI"
|
|
alias vim="nvim"
|
|
|
|
# User lfcd by default (it should exist), fall back
|
|
# to ranger if lfcd isn't found. IDK why you wouldn't
|
|
# have either
|
|
[ -x "$(command -v ranger)"] && alias l=". ranger"
|
|
[ -x "$(command -v lfcd)" ] && alias l="lfcd"
|
|
|
|
# enable color support of ls and also add handy aliases
|
|
if [ -x /usr/bin/dircolors ]; then
|
|
test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dircolors -b)"
|
|
alias ls='ls --color=auto'
|
|
alias grep='grep --color=auto'
|
|
fi
|
|
|