Skip to content

A worried Git warns you of uncommitted changes across projects before your PC is put to sleep.

Notifications You must be signed in to change notification settings

theGeekyLad/py-crestfallen-git

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Crestfallen Git

That right! Git is upset that you'd put your system to sleep without committing changes across local projects. First world problem for every developer. What's worse than losing all your unsaved changes due to an unfortunate hard drive crash? Been there, seen that just a month back to realise the importance of not just making commits, but making them just in time.

Well! Once bitten twice shy and here's a nifty little tool for help. 🚀

Screenshot

What's required? 📝

  • Linux! Should work across distros but I've tested it for success on my Arch machine
  • The tool hooks into event callbacks offered by acpid and hence requires it to be installed
    • Ubuntu: sudo apt install acpid
    • Arch Linux: sudo pacman -S acpid
    • Other distros: No idea, look it up :D
  • Innately, it intercepts power button presses to conditionally suspend your system and hence requires you to disable the "power button suspends" functionality in system settings
  • You must have superuser (sudo) access ‼️

How to install? 💾

  1. Download this repo and extract the .zip to a directory
  2. Fire up a terminal in that directory
  3. Run sudo chmod a+x install.sh
  4. Run install.sh

⛔ DO NOT:
❌ Run the installer twice (don't want your system sleeping repeatedly right? 💩)
❌ Fire up the terminal for installation from some other directory

How to run? 🏃

You'd now want to enlist your local Git projects to be tracked:

  • Open file ~/.config/py-crestfallen-git/projects in your favorite editor
  • Enlist absolute paths to your Git project directories on separate lines
    • e.g. /home/jerry/Projects/TicTacToe
  • Save and close

Euh, now just press that power button. 🌚

Great! What's next? 🌄

An uninstaller is on the way so stay tuned! If you liked the repo, do 🔨 the ⭐ button and feel free to raise issues, if you face any.

Made with ❤️ by theGeekyLad

About

A worried Git warns you of uncommitted changes across projects before your PC is put to sleep.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published