mirror of
https://gitlab.com/dabruh/dotfiles.git
synced 2024-12-25 19:44:17 +01:00
Compare commits
4 commits
b27eda3264
...
00fe271f34
Author | SHA1 | Date | |
---|---|---|---|
|
00fe271f34 | ||
|
cc02c966cb | ||
|
c43ead4a25 | ||
|
d290b0b1a3 |
7 changed files with 62 additions and 45 deletions
28
.config/shell/aliases/common
Normal file
28
.config/shell/aliases/common
Normal 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'"
|
9
.config/shell/aliases/k8s
Normal file
9
.config/shell/aliases/k8s
Normal file
|
@ -0,0 +1,9 @@
|
|||
#!/bin/bash
|
||||
|
||||
# Kubernetes things
|
||||
alias \
|
||||
cx="kubectl-ctx" \
|
||||
f='flux' \
|
||||
h='helm' \
|
||||
k='kubectl' \
|
||||
v='velero'
|
7
.config/shell/aliases/ytdlp
Normal file
7
.config/shell/aliases/ytdlp
Normal 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"
|
|
@ -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'"
|
|
@ -147,4 +147,7 @@ bindkey '^[[B' history-substring-search-down
|
|||
|
||||
RPROMPT='$(git_prompt_string)'
|
||||
[ -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
|
||||
|
|
|
@ -17,5 +17,8 @@ autocorrect = 40
|
|||
[core]
|
||||
editor = vim
|
||||
|
||||
[gitreview]
|
||||
remote = origin
|
||||
|
||||
[include]
|
||||
path = ~/.config/git/.gitconfig
|
||||
|
|
14
.local/bin/t
14
.local/bin/t
|
@ -1,6 +1,14 @@
|
|||
#!/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
|
||||
tmux ls | cut -d: -f1 | grep -q "^${1:?}$" && EXISTS=true
|
||||
$EXISTS && tmux a -t "$1"
|
||||
$EXISTS || tmux new -s "$1"
|
||||
tmux ls | cut -d: -f1 | grep -q "^${1:?}$" && EXISTS=true # Get open sessions
|
||||
$EXISTS && tmux a -t "$1" # Attatch to existing session
|
||||
$EXISTS || tmux new -s "$1" # Create a new session
|
||||
|
|
Loading…
Reference in a new issue