diff options
author | Andrew Cady <d@cryptonomic.net> | 2022-09-22 00:06:17 -0400 |
---|---|---|
committer | Andrew Cady <d@cryptonomic.net> | 2022-09-22 00:06:17 -0400 |
commit | eb4522fbc1487b6bdaff379aa18d3530876b2581 (patch) | |
tree | 08692287753567069f5cf30ca60a8c3f70e0a373 | |
parent | 05e4647d7bef90f7b095bc24ba14701392b415ec (diff) |
add "make install-stack" target and update README
-rw-r--r-- | Makefile | 3 | ||||
-rw-r--r-- | README.md | 13 |
2 files changed, 11 insertions, 5 deletions
@@ -2,6 +2,9 @@ all: | |||
2 | stack build | 2 | stack build |
3 | ln -sfT $$(stack path --local-install-root)/bin ./bin | 3 | ln -sfT $$(stack path --local-install-root)/bin ./bin |
4 | 4 | ||
5 | install-stack: | ||
6 | curl -sSL https://get.haskellstack.org/ | sh | ||
7 | |||
5 | .PHONY: all run install install-dev-tools | 8 | .PHONY: all run install install-dev-tools |
6 | 9 | ||
7 | run: all | 10 | run: all |
@@ -4,22 +4,25 @@ A countdown timer based on Carl Sagan's Cosmic Calendar. | |||
4 | 4 | ||
5 | ## Building | 5 | ## Building |
6 | 6 | ||
7 | Type `make` to build. | 7 | First you need `stack` installed. You can install `stack` by running |
8 | `make install-stack`. This requires `curl` and root access via `sudo`. | ||
9 | Alternatively, you can follow the instructions here: | ||
10 | https://docs.haskellstack.org/en/stable/ | ||
8 | 11 | ||
9 | You need stack already installed. https://docs.haskellstack.org/en/stable/ | 12 | Type `make` to build. |
10 | 13 | ||
11 | ## Running | 14 | ## Running |
12 | 15 | ||
13 | Type `make run` to build and then run. | 16 | Type `make run` to build and then run. |
14 | 17 | ||
15 | Or type `make install` and then run `countdown`. Make sure `$HOME/.local/bin` is | 18 | Or type `make install` and then run `countdown`. You need `$HOME/.local/bin` |
16 | in your `$PATH` environment variable. | 19 | in your `$PATH` environment variable. |
17 | 20 | ||
18 | ## Using | 21 | ## Using |
19 | 22 | ||
20 | Use `p` to pause the clock. | 23 | Use `p` to pause the clock. |
21 | 24 | ||
22 | Use `,` and `.` to navigate between calendar entries. | 25 | Use `,` and `.` to navigate between calendar entries (mnemonic: `<` and `>`). |
23 | 26 | ||
24 | To jump forward and backward in time by one day, use `PgUp` and `PgDown`. | 27 | To jump forward and backward in time by one day, use `PgUp` and `PgDown`. |
25 | 28 | ||
@@ -28,5 +31,5 @@ Press `Home` to jump to the current time. | |||
28 | Press `End` to jump to the New Year's Eve final countdown. | 31 | Press `End` to jump to the New Year's Eve final countdown. |
29 | 32 | ||
30 | You can also use the arrow keys with or without modifiers to jump forward and | 33 | You can also use the arrow keys with or without modifiers to jump forward and |
31 | backward by different amounts. For details about keybindings, see the | 34 | backward by different amounts of time. For details about keybindings, see the |
32 | `handleEvent` function in the source file `countdown.hs`. | 35 | `handleEvent` function in the source file `countdown.hs`. |