Skip to content

janjelinek/shell-mac-alarm

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Simple CLI alarm script

What is purpose? If you need to protect your Mac when you are in pablic place (café etc) and you need to go away without device for a while (WC or whatever). When charcger is disconnected, this script will turn volume on, set to 100% and turn off bluetooth (it's because of headphone usages, alarm in headphones it's useless). You can use some app with GUI or this simple script.

Required dependency

For bluetooth disconnection it's using blueutil, so need to be installed first

$ brew install blueutil

Usage

Make armed.sh executable first.

 $ chmod a+x armed.sh
 // If you going to run alarm on background, you can use unarmed.sh as well
 $ chmod a+x unarmed.sh

And then just run it when you need protection.

$ ./armed.sh

Or you can run it as background job

$ ./armed.sh &

And when you need to kill it, just do

$ kill %$(jobs | grep "armed.sh" | grep -o "[0-9]")

Or you can use unarmed.sh which basically contains simillar command.

$ ./unarmed.sh

About

Alarm for Mac OS which can be run in CLI.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •  

Languages