Hazel

I currently use Hazel to instantly commit any changes I make to all the curated lists I maintain. As well as CSV files of Web Searches and Ask Create Share.

I also automate commiting the README of my macOS & iOS repo as I want to instantly push any changes I make to the repo.

Since I want to keep my macOS repo always updated, I made a macro to open the README file in Sublime Text so I can quickly make a change, save and the change will instantly be commited with update readme message.

The Hazel rule for this is simple and looks like this:

With this as the shell script:

Here it is in code:

git add README.md
git commit -m "update readme"
git push

To have Hazel know about commands I installed with Nix. I need to run this code first in the shell script:

export USER=nikitavoloboev
if [ -e '/nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh' ]; then
   . '/nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh'
fi

Notes

  • If you want to have your rules to be applied onto subfolders as well as the directory chosen, add this rule.

  • If extensions are hidden, don't add extensions in the rule editor too.

results matching ""

    No results matching ""