Skip to content

Commit

Permalink
.aoml not json
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexanderDickie committed Apr 4, 2023
1 parent 019926b commit 3bd0771
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Schedule automatic activations of [SelfControl](https://github.com/SelfControlAp

## Usage + how it works
The cli accepts 4 commands:
- **- -write_example_config** <br> Writes an example configuration file to ~/.config/auto-self-control-rs/config.json.
- **- -write_example_config** <br> Writes an example configuration file to ~/.config/auto-self-control-rs/config.aoml.
- **- -remove_agents** <br> Removes all launch agents installed by the program. They live in ~/Library/LaunchAgents/ .
- **- -deploy** <br> Parses the config file then installs a launch agent which will call - -execute on this program at the start times of the blocks specified in the config.
- **- -execute** <br> If the current time is within a block, activates SelfControl for the duration remaining until the block ends.
Expand All @@ -30,7 +30,7 @@ The config file contains a path to the SelfControl app and a path to the LaunchA

./auto-selfcontrol-rs --write_example_config

// now edit the config at ~/.config/auto-selfcontrol-rs/config.json to your liking
// now edit the config at ~/.config/auto-selfcontrol-rs/config.aoml to your liking

./auto-selfcontrol-rs --deploy

Expand All @@ -44,7 +44,7 @@ The config file contains a path to the SelfControl app and a path to the LaunchA

./auto-selfcontrol-rs --write_example_config

// now edit the config at ~/.config/auto-selfcontrol-rs/config.json to your liking
// now edit the config at ~/.config/auto-selfcontrol-rs/config.aoml to your liking

./auto-selfcontrol-rs --deploy

Expand Down
6 changes: 3 additions & 3 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ fn main() -> Result<(), MainError>{

arg!(-r --remove_agents "Remove any launch agent installed by this program"),

arg!(--write_example_config "Writes an example configuration file to \
~/.config/auto-self-control-rs/config.json"),
arg!(-w --write_example_config "Writes an example configuration file to \
~/.config/auto-self-control-rs/config.aoml"),
])
.group(
ArgGroup::new("commands")
Expand All @@ -49,7 +49,7 @@ fn main() -> Result<(), MainError>{
.join("auto-self-control-rs/");
// if path to config does not exist, create it
fs::create_dir_all(&config_dir)?;
let config_path = config_dir.join("config.json");
let config_path = config_dir.join("config.aoml");

if matches.get_flag("write_example_config") {
let example_config = build_example_config(home_dir)?;
Expand Down

0 comments on commit 3bd0771

Please sign in to comment.