Skip to content

Commit

Permalink
tweak theme help file
Browse files Browse the repository at this point in the history
  • Loading branch information
xvxx committed Dec 4, 2022
1 parent 2a55fc3 commit 8eb15db
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 23 deletions.
49 changes: 30 additions & 19 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,32 @@
## v1.2.0-dev

phetch is all about fun colors, but your options are limited. You
can turn off colors with the `NO_COLOR` env variable or you can
leave them on. That's it.
phetch is all about fun colors, but your options have always been
limited. You could turn off colors via `NO_COLOR` env variable or
you could leave them on. That's it.

Well, not anymore. As of `v1.2`, phetch now supports themes.
Well, not anymore. As of `v1.2`, phetch now supports themes, in
addition to a few new config options.

### Config Options

The new config options in this release, for your convenience, are
as follows:

- `scroll` controls how many lines to jump by when paging up/down.
If set to 0 (the new default), you'll jump by an entire screen.
- `autoplay` controls whether you'll be prompted to play media files
or not. By default it's false, but one might find it handy to set
to `true` if hosting, say, a Gopher-powered music server.

### Keyboard Shortcuts

Just one, but it's a doozy - you can now reload the current URL by
pressing `R` (`shift+r`). Super handy when developing your own Gopherhole!

### Themes

Themes are simple files with the same format as `phetch.conf`:
As mentioned, themes are simple files with roughly the same format as
`phetch.conf`:

$ cat ~/.config/phetch/default.theme
# Color Scheme
Expand All @@ -32,23 +50,16 @@ Themes are simple files with the same format as `phetch.conf`:
Create your theme file and launch phetch with `-t FILE`, or set
the `theme FILE` option in your `~/.config/phetch/phetch.conf`

You can see available colors and learn more about themes by opening
phetch's help - press `h` then `7` to get there quickly.

### Config Options
You can also set theme colors directly in your `phetch.conf`.

This release also adds a few new config options, for your convenience:

- `scroll` controls how many lines to jump by when paging up/down.
If set to 0 (the new default), you'll jump by an entire screen.
- `autoplay` controls whether you'll be prompted to play media files
or not. By default it's false, but one might find it handy to set
to `true` if hosting, say, a Gopher-powered music server.
Learn more about themes, including which colors are available,
by opening phetch's on-line help: press `h` then `7` to get
there quickly.

### Keyboard Shortcuts
For reference, we've included a few fun themes in the repo itself
that you can download and play with:

Last but not least, you can now reload the current URL by pressing `R`.
Handy when developing your own Gopherhole!
<https://github.com/xvxx/phetch/tree/master/themes>

## v1.1.0

Expand Down
13 changes: 9 additions & 4 deletions src/help.rs
Original file line number Diff line number Diff line change
Expand Up @@ -264,12 +264,17 @@ itheme file with --theme/-t or
iby setting `theme FILE` in
iyour phetch.conf.
i
iyou can also view the current
itheme with:
iyou can also set colors directly
iin your phetch.conf.
i
iview the current theme with:
i
i$ phetch --print-theme
i
itheme files look like this:
i ** examples **
i
itheme files are plain text files
ithat look like this:
i
iui.cursor white bold
iui.number magenta
Expand All @@ -285,7 +290,7 @@ iitem.download white underline
iitem.media green underline
iitem.unsupported whitebg red
i
ivalid colors:
i ** valid colors **
i
ibold
iunderline
Expand Down

0 comments on commit 8eb15db

Please sign in to comment.