Skip to content

Commit

Permalink
updated README with linux note, added wayland
Browse files Browse the repository at this point in the history
  • Loading branch information
cxreiff committed Oct 8, 2024
1 parent 83ef4f8 commit 91d12be
Show file tree
Hide file tree
Showing 3 changed files with 247 additions and 3 deletions.
227 changes: 227 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 5 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "ttysvr"
description = "Screensavers for your terminal."
description = "Screensavers for your terminal"
version = "0.3.0"
edition = "2021"
license = "MIT OR Apache-2.0"
Expand All @@ -11,6 +11,10 @@ homepage = "https://github.com/cxreiff/ttysvr"
categories = ["command-line-interface"]
keywords = ["bevy", "ratatui", "terminal", "tui", "screensaver"]

[features]
default = ["wayland"]
wayland = ["bevy/wayland"]

[dependencies]
avian2d = "0.1.1"
bevy = "0.14.1"
Expand Down
17 changes: 15 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ bevy plugin that allows you to render a bevy application to the terminal using
[ratatui](https://github.com/ratatui-org/ratatui) and
[ratatui-image](https://github.com/benjajaja/ratatui-image).

Triggering the screensaver immediately works in any shell, triggering after a set period of inactivity is currently Zsh only.
Triggering the screensaver immediately works in any shell, triggering after a set period of
inactivity is currently Zsh only.

## installation

Expand All @@ -29,6 +30,12 @@ brew install cxreiff/tap/ttysvr
# arch linux
pacman -S ttysvr
```
> [!IMPORTANT]
> If you are on Linux and install using the cargo method, or otherwise build from source, you
> will first need to refer to
> [docs/linux_dependencies.md](https://github.com/bevyengine/bevy/blob/main/docs/linux_dependencies.md)
> in the bevy repo for your distro's instructions on making sure bevy's required linux dependencies
> are installed.
## usage

Expand All @@ -53,7 +60,7 @@ Cancels the screensaver in your current shell session.
eval `ttysvr --cancel`
```

> [!IMPORTANT]
> [!NOTE]
> Note that the `--init` and `--cancel` options require being wrapped in `eval` and backticks.
> This is because activating the screensaver after a set period of inactivity relies on setting
> the TMOUT environment variable in your _current shell_, instead of the child shell created by
Expand Down Expand Up @@ -90,3 +97,9 @@ This includes a decent variety of terminals, but I have personally confirmed goo
- WezTerm (macOS)
- iTerm2 (macOS)

### ssh

Because bevy is being used here in a somewhat unconventional way, currently bevy will still look for a
windowing system even though a window is never created. This means that there are issues when a window
server is not available, for example when running this over SSH. I am investigating a fix, perhaps through
disabling a default bevy feature.

0 comments on commit 91d12be

Please sign in to comment.