update
This commit is contained in:
parent
4f0e213f4a
commit
117b20bb7b
15 changed files with 1204 additions and 33 deletions
|
|
@ -17,32 +17,35 @@ alias \
|
|||
|
||||
# Exa for listing
|
||||
alias \
|
||||
ls='exa -lh --color=always --icons --git ' \
|
||||
la='exa -alh --color=always --icons --git ' \
|
||||
ld='exa -la --no-permissions --no-filesize --no-time --no-time --no-user'
|
||||
ls='exa -lh --color=always --icons --git ' \
|
||||
la='exa -alh --color=always --icons --git ' \
|
||||
ld='exa -la --no-permissions --no-filesize --no-time --no-time --no-user'
|
||||
|
||||
# Pacman
|
||||
alias \
|
||||
pkgu="paru -Syu --removemake --cleanafter --sudoloop --color always" \
|
||||
pkgi="paru --skipreview --removemake --cleanafter --sudoloop --color always --needed" \
|
||||
pkgr="paru -R" \
|
||||
cleanup='sudo pacman -Rns $(pacman -Qtdq)' \
|
||||
pkglast="expac --timefmt='%Y-%m-%d %T' '%l\t%n %v' | sort | tail -25 | nl"
|
||||
pkgu="paru -Syu --removemake --cleanafter --sudoloop --color always" \
|
||||
pkgi="paru --skipreview --removemake --cleanafter --sudoloop --color always --needed" \
|
||||
pkgr="paru -R" \
|
||||
cleanup='sudo pacman -Rns $(pacman -Qtdq)' \
|
||||
pkglast="expac --timefmt='%Y-%m-%d %T' '%l\t%n %v' | sort | tail -25 | nl"
|
||||
|
||||
|
||||
alias \
|
||||
reload='exec $SHELL -l' \
|
||||
reload='exec $SHELL -l' \
|
||||
|
||||
# Query Stuff
|
||||
# Query Stuff
|
||||
alias \
|
||||
ip='ip -human -color -brief addr' \
|
||||
df='df -h'
|
||||
ip='ip -human -color -brief addr' \
|
||||
df='df -h'
|
||||
|
||||
## Lofi
|
||||
## Music Streams
|
||||
lofi_url="https://youtu.be/jfKfPfyJRdk"
|
||||
nintendo_url="https://youtu.be/Ns_uXoOJ7iw"
|
||||
alias \
|
||||
lofi='celluloid "$lofi_url"& ; disown %1' \
|
||||
lofi-bg='ts lofi -d "mpv --no-video $lofi_url"'
|
||||
music-lofi='celluloid "$lofi_url" &>/dev/null &!' \
|
||||
music-lofi-bg='ts lofi -d "mpv --no-video $lofi_url"' \
|
||||
music-ninten='celluloid "$nintendo_url" &>/dev/null &!' \
|
||||
music-ninten-bg='ts lofi -d "mpv --no-video $nintendo_url"'
|
||||
|
||||
#--------------------------------------------------------------------#
|
||||
# Global #
|
||||
|
|
|
|||
|
|
@ -36,18 +36,6 @@ pvenv() {
|
|||
source "$dir/bin/activate"
|
||||
}
|
||||
|
||||
# tm - create new tmux session, or switch to existing one. Works from within tmux too. (@bag-man)
|
||||
# `tm` will allow you to select your tmux session via fzf.
|
||||
# `tm irc` will attach to the irc session (if it exists), else it will create it.
|
||||
|
||||
tm() {
|
||||
[[ -n "$TMUX" ]] && change="switch-client" || change="attach-session"
|
||||
if [ $1 ]; then
|
||||
tmux $change -t "$1" 2>/dev/null || (tmux new-session -d -s $1 && tmux $change -t "$1"); return
|
||||
fi
|
||||
session=$(tmux list-sessions -F "#{session_name}" 2>/dev/null | fzf --select-1 --exit-0) && tmux $change -t "$session" || echo "No sessions found."
|
||||
}
|
||||
|
||||
# Print bottlenecks
|
||||
profzsh() {
|
||||
shell=${1-$SHELL}
|
||||
29
config/zsh/functions/tmux.zsh
Normal file
29
config/zsh/functions/tmux.zsh
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
SEPARATOR=" │ "
|
||||
FZF_SEPARATOR="│" # Same character, without whitespaces
|
||||
|
||||
format_values() {
|
||||
values="$1"
|
||||
shift
|
||||
divider="$1"
|
||||
shift
|
||||
echo -e "$(echo "$values" | column --table --separator $divider --output-separator $SEPARATOR)"
|
||||
}
|
||||
|
||||
tmux_switch_or_create() {
|
||||
target=$1
|
||||
[[ -n "$TMUX" ]] && change="switch-client" || change="attach-session"
|
||||
|
||||
tmux $change -t "$target" 2>/dev/null || (tmux new-session -d -s $target && tmux $change -t "$target"); return
|
||||
}
|
||||
|
||||
# tm - create new tmux session, or switch to existing one. Works from within tmux too. (@bag-man)
|
||||
# `tm` will allow you to select your tmux session via fzf.
|
||||
# `tm irc` will attach to the irc session (if it exists), else it will create it.
|
||||
|
||||
tm() {
|
||||
[[ -n "$TMUX" ]] && change="switch-client" || change="attach-session"
|
||||
if [ $1 ]; then
|
||||
tmux $change -t "$1" 2>/dev/null || (tmux new-session -d -s $1 && tmux $change -t "$1"); return
|
||||
fi
|
||||
session=$(tmux list-sessions -F "#{session_name}" 2>/dev/null | fzf --exit-0 --select-1) && tmux $change -t "$session" || echo "No sessions found."
|
||||
}
|
||||
|
|
@ -36,3 +36,5 @@ update_path "$PYENV_ROOT/bin"
|
|||
. "$HOME/.cargo/env"
|
||||
|
||||
eval "$(pyenv init --path)"
|
||||
|
||||
tmux new-session -d "default"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue