Skip to content

Instantly share code, notes, and snippets.

@iesahin
Created March 28, 2022 12:58
Show Gist options
  • Save iesahin/398af2556f5ae809c4b368ffc2ef7130 to your computer and use it in GitHub Desktop.
Save iesahin/398af2556f5ae809c4b368ffc2ef7130 to your computer and use it in GitHub Desktop.
#!/bin/zsh
sleep_counter=0
while true ; do
for d in $HOME/github.com/*/*(/) ; do
if [[ -n "$(git -C $d status -s)" ]] ; then
sleep_counter=0
lazygit -p $d
fi
done
sleep_counter=$((sleep_counter + 1))
sleep_period=$((60 * sleep_counter))
echo "Sleeping for ${sleep_period} seconds"
sleep $sleep_period
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment