From 1e350d9b8efc567340a1b6c67cd352e340dc0e49 Mon Sep 17 00:00:00 2001 From: Maximilian Friedersdorff Date: Wed, 8 Oct 2025 16:58:03 +0100 Subject: [PATCH] Repo opening thingy --- home/dot_config/sway/pkglist.txt | 3 +++ home/dot_zshrc | 15 +++++++++++++++ 2 files changed, 18 insertions(+) diff --git a/home/dot_config/sway/pkglist.txt b/home/dot_config/sway/pkglist.txt index cf3c72f..324133a 100644 --- a/home/dot_config/sway/pkglist.txt +++ b/home/dot_config/sway/pkglist.txt @@ -10,6 +10,9 @@ wofi kanshi foot firefox +zen-browser pavucontrol blueman btop +onefetch +darkman diff --git a/home/dot_zshrc b/home/dot_zshrc index dce8a61..173cbb2 100644 --- a/home/dot_zshrc +++ b/home/dot_zshrc @@ -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