-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
36 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,38 +1,51 @@ | ||
# Sand | ||
A systemd service and CLI program for setting countdown timers | ||
|
||
### Building | ||
You'll need a lean toolchain, which can be installed using [elan](https://github.com/leanprover/elan). | ||
# Installation | ||
## Arch linux | ||
A PKGBUILD is provided on the releases page. | ||
|
||
Once that's done, run | ||
``` | ||
lake build | ||
``` | ||
### Dependencies | ||
- libnotify | ||
- pulseaudio (for timer notification sounds) | ||
1. Download the PKGBUILD into an empty directory | ||
2. `makepkg` | ||
3. `sudo pacman -U <built package>` | ||
|
||
### Installation | ||
## Other distros | ||
|
||
This is currently only tested on Arch. If you use a different distro, you'll | ||
want to check and modify `install.sh` as appropriate. Let me know if this | ||
method is sufficient for your distro. PRs for better compatibility welcome. | ||
1. Make sure you have the dependencies: | ||
- systemd | ||
- libnotify | ||
- optionally, pulseaudio or wireplumber (for timer notification sounds) | ||
|
||
Distro specific packages TODO. | ||
2. Download and extract the latest tarball from the releases page | ||
3. `cd release` | ||
4. The install script, `install.sh` is currently only tested on Arch. | ||
It should work on any distro that follows the FHS. However, I would | ||
recommend reading it and confirming that it will work correctly on your | ||
distro. | ||
5. `sudo ./install.sh` | ||
|
||
```bash | ||
$ ./create_release.sh | ||
$ cd release | ||
$ sudo ./install.sh | ||
``` | ||
# Setup: | ||
After installing, you'll need to enable and start the service. | ||
|
||
1. `systemctl --user daemon-reload` | ||
2. `systemctl --user enable --now sand.socket` | ||
|
||
### Usage | ||
``` | ||
$ sand 30 | ||
sent message. Exiting | ||
$ sand list | ||
now: 32544974 | ||
10 | 32573115 (00:00:28:141 remaining) | ||
$ sand ls | ||
#1 | 00:00:04:026 remaining | ||
``` | ||
A notification will be triggered when the timer elapses. | ||
|
||
### Building from source | ||
You'll need a lean toolchain, which can be installed using [elan](https://github.com/leanprover/elan). | ||
|
||
Once that's done, run | ||
``` | ||
lake build | ||
``` | ||
|
||
The executable will be in `./.lake/build/bin/sand`. |