Repo opening thingy

This commit is contained in:
Maximilian Friedersdorff 2025-10-08 16:58:03 +01:00
parent 51f0da7441
commit 1e350d9b8e
2 changed files with 18 additions and 0 deletions

View file

@ -10,6 +10,9 @@ wofi
kanshi
foot
firefox
zen-browser
pavucontrol
blueman
btop
onefetch
darkman

View file

@ -73,3 +73,18 @@ function chpwd-osc7-pwd() {
(( ZSH_SUBSHELL )) || osc7-pwd
}
add-zsh-hook -Uz chpwd chpwd-osc7-pwd
# git repository greeter
last_repository=
check_directory_for_new_repository() {
current_repository=$(git rev-parse --show-toplevel 2> /dev/null)
if [ "$current_repository" ] && \
[ "$current_repository" != "$last_repository" ]; then
onefetch
fi
last_repository=$current_repository
}
add-zsh-hook -Uz chpwd check_directory_for_new_repository