61 lines
1.2 KiB
Bash
61 lines
1.2 KiB
Bash
alias usysctl='systemctl --user'
|
|
|
|
# From https://mastodon.xyz/@CarlCravens/105758509287927276
|
|
alias clear='clear; tput cup $LINES 0'
|
|
|
|
alias camoff='sudo modprobe -r uvcvideo' # sudo rmmod -f uvcvideo
|
|
alias camon='sudo modprobe uvcvideo'
|
|
|
|
alias coderadio='mpv https://coderadio-admin.freecodecamp.org/radio/8010/radio.mp3'
|
|
|
|
alias clip="xclip -sel clip"
|
|
|
|
ahbh(){ # I'm not sure if this works
|
|
git rev-list --left-right --count \
|
|
"$(git remote show origin | sed -n '/HEAD branch/s/.*: //p')"..."$(git branch --show-current)"
|
|
}
|
|
|
|
# use fzf to cd into a ghq directory
|
|
fghq(){
|
|
cd $(ghq root)/$(ghq list | fzf)
|
|
}
|
|
|
|
# use fzf to open a VSCodium project
|
|
fcode(){
|
|
codium $(ghq root)/$(ghq list | fzf)
|
|
}
|
|
|
|
# use fzf to open a file in $EDITOR or neovim
|
|
ffe() {
|
|
fname=$(fzf) || return
|
|
${EDITOR:-nvim} "$fname"
|
|
}
|
|
|
|
if [ -x "$(command -v "exa")" ]; then
|
|
alias ls='exa' # -ag
|
|
alias la='exa -l'
|
|
alias ll='exa -lahg'
|
|
else
|
|
echo "exa not installed"
|
|
fi
|
|
|
|
alias pu='git push'
|
|
alias st='git st'
|
|
|
|
foldersize(){
|
|
du -sh "$@"
|
|
}
|
|
|
|
e(){
|
|
emacsclient -a "" $@
|
|
}
|
|
|
|
# Easy way to create/ connect to a tmux session
|
|
tmm(){
|
|
if [ -z "$1" ]; then
|
|
tmux attach-session -t 0 || tmux
|
|
else
|
|
tmux attach-session -t "$1" || tmux new-session -t "$1" || tmux
|
|
fi
|
|
}
|