diff --git a/home-modules/home-git-monitor.nix b/home-modules/home-git-monitor.nix new file mode 100644 index 0000000..1c17428 --- /dev/null +++ b/home-modules/home-git-monitor.nix @@ -0,0 +1,32 @@ +{ config, pkgs, ...}: +{ + home.packages = with pkgs; [ + waybar + + (pkgs.writeShellScriptBin "waybar_mode" '' + #!/bin/bash + + # List of directories to check + directories=( + "~/nix-dots" + "~/shared/HSMW/Praxis/BCAM/bolt-llmserver" + "~/shared/HSMW/Praxis/BCAM/bcam-tools" + ) + for dir in "${directories[@]}"; do + echo "Checking git status in $dir" + # Check if the directory exists + if [ -d "$dir" ]; then + # Change directory and run git status + cd "$dir" || { echo "Cannot change directory to $dir"; exit 1; } + git status + # Change back to the original directory + cd - > /dev/null || { echo "Cannot change back to the original directory"; exit 1; } + else + echo "Directory $dir does not exist." + fi + done + '') + + + ]; +} \ No newline at end of file diff --git a/home.nix b/home.nix index a988788..f5a09b3 100644 --- a/home.nix +++ b/home.nix @@ -33,6 +33,7 @@ ./home-modules/theme/gtk.nix ./home-modules/theme/qt.nix + ./home-modules/home-git-monitor.nix.nix ./home-modules/python.nix ]; home.username = "nx2";