Crates.io | ttysvr |
lib.rs | ttysvr |
version | 0.3.3 |
source | src |
created_at | 2024-08-15 00:35:06.313258 |
updated_at | 2024-10-12 01:21:50.110216 |
description | Screensavers for your terminal |
homepage | https://github.com/cxreiff/ttysvr |
repository | https://github.com/cxreiff/ttysvr |
max_upload_size | |
id | 1338159 |
size | 966,824 |
Screensavers for your terminal. Start immediately or after a period of inactivity within a shell.
Uses bevy_ratatui_render, my bevy plugin that allows you to render a bevy application to the terminal using ratatui and ratatui-image.
Triggering the screensaver immediately works in any shell, triggering after a set period of inactivity is currently Zsh only.
# cargo
cargo install --locked ttysvr
# homebrew
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 in the bevy repo for your distro's instructions on making sure bevy's required linux dependencies are installed.
Starts the screensaver immediately. If no variant is specified, one is randomly selected.
ttysvr [VARIANT]
Some variants have subvariants.
ttysvr [VARIANT] [SUBVARIANT]
Sets up the screensaver to activate after DELAY
seconds of inactivity in your current shell session.
eval `ttysvr [VARIANT] --init [DELAY]`
Cancels the screensaver in your current shell session.
eval `ttysvr --cancel`
[!NOTE] Note that the
--init
and--cancel
options require being wrapped ineval
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 thettysvr
process. Issues/PRs are greatly appreciated if somebody is aware of a better way of doing this!
variant | subvariants? | description |
---|---|---|
bubbles | Colorful bubbles bounce around the screen. | |
logo | dvd , tty |
DVD player style bouncing logo. |
maze | brick , hedge |
3D randomly generated maze. |
The screensaver delay works based on setting a session timeout and catching the ALRM signal in a way only compatible with ZSH. If you know a way to achieve something similar in another shell, please open an issue!
This requires that your terminal:
This includes a decent variety of terminals, but I have personally confirmed good results in the following:
I have recently added a change that has allowed me to run the screensavers over SSH. This is not very well tested however, so please open an issue if you run into problems!