Compare commits

..

4 commits

Author SHA1 Message Date
dabruh
00fe271f34 Add comments 2023-08-28 16:42:02 +02:00
dabruh
cc02c966cb Add git-review config 2023-08-28 16:41:55 +02:00
dabruh
c43ead4a25 Split out aliases 2023-08-28 16:41:40 +02:00
dabruh
d290b0b1a3 Rename alias file 2023-08-28 16:31:58 +02:00
7 changed files with 62 additions and 45 deletions

View file

@ -0,0 +1,28 @@
#!/bin/bash
# shellcheck disable=SC2139
# Verbosity and settings that you pretty much just always are going to want.
alias \
bc="bc -ql" \
cp="cp -iv" \
df='df -h' \
e="${EDITOR:-vim}" \
ffmpeg="ffmpeg -hide_banner" \
free='free -m' \
g="git" \
ka="killall" \
mkd="mkdir -pv" \
mv="mv -iv" \
rm="rm -vI" \
shrd="shred -zuvn3" \
tmux='tmux -f ~/.config/tmux/tmux.conf'
# Misc
alias \
w='curl https://wttr.in/'
which codium >/dev/null && alias code=codium c=codium
which pacman >/dev/null && alias p=pacman
which zathura >/dev/null && alias z=zathura
which ranger >/dev/null && alias r=ranger
[ -s "$NVM_DIR/nvm.sh" ] && alias load-nvm="source '$NVM_DIR/nvm.sh'"

View file

@ -0,0 +1,9 @@
#!/bin/bash
# Kubernetes things
alias \
cx="kubectl-ctx" \
f='flux' \
h='helm' \
k='kubectl' \
v='velero'

View file

@ -0,0 +1,7 @@
#!/bin/bash
# Verbosity and settings that you pretty much just always are going to want.
alias \
yt="yt-dlp --embed-metadata -i" \
yta="yt -x -f bestaudio/best -o '%(uploader)s - %(title)s [%(id)s].%(ext)s'" \
ytmp3="yta --audio-format mp3 --audio-quality 192K"

View file

@ -1,41 +0,0 @@
#!/bin/bash
# Verbosity and settings that you pretty much just always are going to want.
alias \
bc="bc -ql" \
cp="cp -iv" \
ffmpeg="ffmpeg -hide_banner" \
mkd="mkdir -pv" \
mv="mv -iv" \
rm="rm -vI" \
shrd="shred -zuvn3" \
yt="yt-dlp --embed-metadata -i" \
yta="yt -x -f bestaudio/best -o '%(uploader)s - %(title)s [%(id)s].%(ext)s'" \
ytmp3="yta --audio-format mp3 --audio-quality 192K"
# Kubernetes things
alias \
cx="kubectl-ctx" \
f='flux' \
h='helm' \
k='kubectl' \
v='velero'
# These common commands are just too long! Abbreviate them.
alias \
ka="killall" \
g="git" \
e="${EDITOR:-vim}" \
p="pacman" \
z="zathura"
# Misc
alias \
tmux='tmux -f ~/.config/tmux/tmux.conf' \
df='df -h' \
free='free -m' \
r='ranger' \
w='curl https://wttr.in/'
which codium >/dev/null && alias code=codium
[ -s "$NVM_DIR/nvm.sh" ] && alias load-nvm="source '$NVM_DIR/nvm.sh'"

View file

@ -147,4 +147,7 @@ bindkey '^[[B' history-substring-search-down
RPROMPT='$(git_prompt_string)' RPROMPT='$(git_prompt_string)'
[ -f "$ZDOTDIR/completion" ] && . "$ZDOTDIR/completion" # Additional ZSH completion [ -f "$ZDOTDIR/completion" ] && . "$ZDOTDIR/completion" # Additional ZSH completion
[ -f "${XDG_CONFIG_HOME:-$HOME/.config}/shell/aliasrc" ] && . "${XDG_CONFIG_HOME:-$HOME/.config}/shell/aliasrc"
find "${XDG_CONFIG_HOME:-$HOME/.config}/shell/aliases" -type f | while read -r alias_file; do
source "$alias_file"
done

View file

@ -17,5 +17,8 @@ autocorrect = 40
[core] [core]
editor = vim editor = vim
[gitreview]
remote = origin
[include] [include]
path = ~/.config/git/.gitconfig path = ~/.config/git/.gitconfig

View file

@ -1,6 +1,14 @@
#!/bin/bash #!/bin/bash
# TITLE : t
# DESCRIPTION : Creates and re-opens tmux sessions
# AUTHOR : edabrows
# DATE : 20230828
# VERSION : 0.1.0
# USAGE : t <session-name>
# BASH_VERSION : 5.1.16(1)-release
EXISTS=false EXISTS=false
tmux ls | cut -d: -f1 | grep -q "^${1:?}$" && EXISTS=true tmux ls | cut -d: -f1 | grep -q "^${1:?}$" && EXISTS=true # Get open sessions
$EXISTS && tmux a -t "$1" $EXISTS && tmux a -t "$1" # Attatch to existing session
$EXISTS || tmux new -s "$1" $EXISTS || tmux new -s "$1" # Create a new session