Nvim Update, Some Aliases
This commit is contained in:
parent
275145e822
commit
9ee61f9c33
4 changed files with 38 additions and 1 deletions
|
@ -1 +1 @@
|
||||||
Subproject commit 61d0f5cf4cbd89f5c3676f72e2a3bd31b85880cd
|
Subproject commit 44c9268d6753bdc543fa9f2984aeea94af810e0f
|
1
.config/systemd/user/default.target.wants/ra-multiplex.service
Symbolic link
1
.config/systemd/user/default.target.wants/ra-multiplex.service
Symbolic link
|
@ -0,0 +1 @@
|
||||||
|
/home/snoweuph/.config/systemd/user/ra-multiplex.service
|
|
@ -28,3 +28,4 @@
|
||||||
fl = push --force-with-lease
|
fl = push --force-with-lease
|
||||||
prune-branches = "!git fetch -p && git branch -vv | grep ': gone]' | awk '{print $1}' | xargs -r git branch -d"
|
prune-branches = "!git fetch -p && git branch -vv | grep ': gone]' | awk '{print $1}' | xargs -r git branch -d"
|
||||||
show-last-commit = diff HEAD^
|
show-last-commit = diff HEAD^
|
||||||
|
unstage = "restore --staged"
|
||||||
|
|
35
.zshrc
35
.zshrc
|
@ -39,6 +39,7 @@ WORDCHARS="_-" # Define These Characters as Part of "Words"
|
||||||
|
|
||||||
# Application Envs
|
# Application Envs
|
||||||
#########################################################
|
#########################################################
|
||||||
|
export EDITOR=nvim
|
||||||
|
|
||||||
# GPG
|
# GPG
|
||||||
if [ "${gnupg_SSH_AUTH_SOCK_by:-0}" -ne $$ ]; then
|
if [ "${gnupg_SSH_AUTH_SOCK_by:-0}" -ne $$ ]; then
|
||||||
|
@ -105,3 +106,37 @@ alias edit-zsh-conf="nvim ~/.zshrc"
|
||||||
alias hist="eval \$(cat $HISTFILE | fzf)"
|
alias hist="eval \$(cat $HISTFILE | fzf)"
|
||||||
alias nano="nvim"
|
alias nano="nvim"
|
||||||
alias neofetch="fastfetch"
|
alias neofetch="fastfetch"
|
||||||
|
alias notes="glow $HOME/DOKUMENTE/NOTES --all"
|
||||||
|
ws() {
|
||||||
|
local -A path_icons=(
|
||||||
|
["$HOME/Workspace/Learning"]='3, '
|
||||||
|
["$HOME/Workspace/School"]='3, '
|
||||||
|
["$HOME/Workspace/AdventOfCode"]='3, '
|
||||||
|
["$HOME/Workspace"]='2, '
|
||||||
|
["$HOME/Downloads"]='2,'
|
||||||
|
["$HOME"]='1, '
|
||||||
|
)
|
||||||
|
|
||||||
|
typeset -A display_to_path
|
||||||
|
find "$HOME/Workspace" -type d \( -name ".git" -o -name "go.mod" -o -name "Cargo.toml" -o -name "compose.yaml" -o -name "package.json" \) -exec dirname {} \; | sort -u | \
|
||||||
|
while IFS= read -r line; do
|
||||||
|
display_line="$line"
|
||||||
|
best_prio=0
|
||||||
|
for path_target entry in "${(@kv)path_icons}"; do
|
||||||
|
if [[ $line == $path_target* ]]; then
|
||||||
|
IFS=, read -r prio icon <<< "$entry"
|
||||||
|
if [[ $prio -gt $best_prio ]]; then
|
||||||
|
display_line="$icon${line//$path_target/}"
|
||||||
|
best_prio=$prio
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
display_to_path[$display_line]=$line
|
||||||
|
done
|
||||||
|
|
||||||
|
selected=$display_to_path[$(printf "%s\n" "${(@k)display_to_path}" | fzf)]
|
||||||
|
if [[ -n $selected ]]; then
|
||||||
|
cd $selected
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue