Skip to content
This repository was archived by the owner on Jan 18, 2025. It is now read-only.

Commit a56faa5

Browse files
committedOct 13, 2023
Added gitignore
1 parent c555b8d commit a56faa5

File tree

4 files changed

+44
-16
lines changed

4 files changed

+44
-16
lines changed
 

‎.gitignore

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
*.selfcontrol
2+
schedule.json

‎README.md

+41
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
# 🔨 Hammer Control
2+
3+
A script that uses [hammerspoon](https://github.com/Hammerspoon/hammerspoon) to create schedules
4+
for [SelfControl](https://github.com/SelfControlApp/selfcontrol).
5+
6+
## Features
7+
8+
### Annoyance
9+
10+
Since `v4` of [SelfControl](https://github.com/SelfControlApp/selfcontrol) couldn't get around
11+
prompting the user for the admin password to start the program, it made auto-scheduling scripts
12+
like [auto-selfcontrol](https://github.com/andreasgrill/auto-selfcontrol) not as effective since
13+
the user would have to consciously start the session. Someone could easily just click cancel and
14+
[SelfControl](https://github.com/SelfControlApp/selfcontrol) would be useless. It was much better
15+
when you could forget about it, so when you got distracted, you wouldn't have the chance to fight
16+
back.
17+
18+
Although I couldn't get around the password prompting problem, something I could do is annoy the
19+
living hell out the of the user if they don't start the
20+
[SelfControl](https://github.com/SelfControlApp/selfcontrol) session.
21+
22+
#### Mitigating Hiding
23+
24+
## Installation
25+
26+
### Prerequisites
27+
28+
- hammerspoon
29+
- `brew install hammerspoon`
30+
- SelfControl
31+
- `brew install selfcontrol`
32+
33+
### Setup
34+
35+
1. `mkdir ~/.hammerspoon` if it doesn't exist.
36+
1. `git clone https://github.com/Pandoks/hammer-control.git ~/.hammerspoon/hammer-control`
37+
1. `touch ~/.hammerspoon/init.lua` if it doesn't exist.
38+
1. `sed -i '1s/^/require("hammer-control")\n/' ~/.hammerspoon/init.lua`
39+
- or manually add `require("hammer-control")` to your `init.lua` file
40+
41+
## Usage

‎init.lua

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
local schedule = hs.json.read("./selfcontrol/schedule.json")
1+
local schedule = hs.json.read("./hammer-control/schedule.json")
22
local days = { "sunday", "monday", "tuesday", "wednesday", "thursday", "friday", "saturday" }
33

44
-- initiate time

‎schedule.json

-15
This file was deleted.

0 commit comments

Comments
 (0)
This repository has been archived.