rudimentary git_monitor
This commit is contained in:
32
home-modules/home-git-monitor.nix
Normal file
32
home-modules/home-git-monitor.nix
Normal 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
|
||||||
|
'')
|
||||||
|
|
||||||
|
|
||||||
|
];
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user