rudimentary git_monitor

This commit is contained in:
Lennart J. Kurzweg (Nx2)
2024-04-22 18:17:50 +02:00
parent f6b0f2585c
commit e2b3e0ee9d
2 changed files with 33 additions and 0 deletions

View File

@@ -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
'')
];
}

View File

@@ -33,6 +33,7 @@
./home-modules/theme/gtk.nix ./home-modules/theme/gtk.nix
./home-modules/theme/qt.nix ./home-modules/theme/qt.nix
./home-modules/home-git-monitor.nix.nix
./home-modules/python.nix ./home-modules/python.nix
]; ];
home.username = "nx2"; home.username = "nx2";