Skip to content

Commit

Permalink
docs: improve readme
Browse files Browse the repository at this point in the history
- Adds demo asciiname
- Better indented download script
  • Loading branch information
sne11ius committed May 28, 2024
1 parent f7b8103 commit c64ad99
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 10 deletions.
13 changes: 8 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,13 @@ only webpage to watch the game:
terminal.
- **Lightweight:** Zero dependencies native binary.

## Demo

*asciinema seems not to handle unicode well, so please blame the slightly broken
layout on them ;)

[![asciicast](https://asciinema.org/a/661370.svg)](https://asciinema.org/a/661370)

## Installation

pp is a single native executable and currently available for x86_64 based linux.
Expand All @@ -42,7 +49,7 @@ The following lines should have you running the latest version in no time
curl -s https://api.github.com/repos/sne11ius/pp/releases/latest | \
jq -r '.assets[] | select(.name == "pp") | .browser_download_url' | \
xargs curl -L -o pp && \
chmod +x ./pp
chmod +x ./pp
```

### From source
Expand Down Expand Up @@ -108,10 +115,6 @@ Use env var `SERVER` or parameter `-s` (or `--server`) to connect a different
server (default is `https://pp.discordia.network`):
`SERVER=http://localhost:8080 ./pp`

## Screenshots

***Coming soon...***

## Contributing

***Make this a "how to dev" section or link to dedicated doc
Expand Down
13 changes: 8 additions & 5 deletions client/tui.go
Original file line number Diff line number Diff line change
Expand Up @@ -72,11 +72,14 @@ func (tui *TUI) createHeader() (*tview.Flex, []inputCapturer) {

copyButton := tview.NewButton("Copy room name")
copyButton.SetSelectedFunc(func() {
cmd := exec.Command("xclip", "-selection", "c")
cmd.Stdin = bytes.NewBufferString(tui.Room.RoomID)
err := cmd.Run()
if err != nil {
panic(err)
_, err := exec.LookPath("xclip")
if err == nil {
cmd := exec.Command("xclip", "-selection", "c")
cmd.Stdin = bytes.NewBufferString(tui.Room.RoomID)
err := cmd.Run()
if err != nil {
panic(err)
}
}
})

Expand Down

0 comments on commit c64ad99

Please sign in to comment.