An over-engineered rewrite of pipes.sh in Rust

Overview

pipes-rs

An over-engineered rewrite of pipes.sh in Rust

pipes-rs preview

Installlation

macOS

Install using Homebrew or download manually from releases.

$ brew install CookieCoder15/tap/pipes-rs

Linux & Windows

See releases.

Configuration

pipes-rs can be configured using TOML located at ~/.config/pipes-rs/config.toml. The following is an example file with the default settings:

bold = true
color_mode = "ansi" # ansi, rgb or none
palette = "default" # default, darker, pastel or matrix
delay_ms = 20
inherit_style = false
kinds = ["heavy"] # heavy, light, curved, knobby, emoji, outline, dots
num_pipes = 1
reset_threshold = 0.5 # 0.0–1.0
turn_chance = 0.15 # 0.0–1.0

Color Modes

Mode Description
ansi pipe colors are randomly selected from the terminal color profile, default option
rgb pipe colors are randomly generated rgb values, unsupported in some terminals
none pipe colors will not be set and use the current terminal text color

Palettes

Palette Description
default bright colors – good on dark backgrounds, default option
darker darker colors – good on light backgrounds
pastel pastel colors – good on dark backgrounds
matrix colors based on Matrix digital rain – good on dark backgrounds

Pipe Kinds

Kind Preview
heavy ┃ ┃ ━ ━ ┏ ┓ ┗ ┛
light │ │ ─ ─ ┌ ┐ └ ┘
curved │ │ ─ ─ ╭ ╮ ╰ ╯
knobby ╽ ╿ ╼ ╾ ┎ ┒ ┖ ┚
emoji 👆 👇 👈 👉 👌 👌 👌 👌
outline ║ ║ ═ ═ ╔ ╗ ╚ ╝
dots • • • • • • • •

Due to emojis having a different character width, using the emoji pipe kind along side another pipe kind can cause spacing issues.

Options

There are also command line options that can be used to override parts of the configuration file:

Option Usage Example
-b toggles bold text -b true
-c sets the color mode -c rgb
-d sets the delay in ms -d 15
-i toggles if pipes inherit style when hitting the edge -i false
-k sets the kinds of pipes, each kind separated by commas -k heavy,curved
-p sets the number of pipes onscreen -p 5
-r sets the percentage of the screen to be filled before resetting -r 0.75
-t chance of a pipe turning each frame -t 0.15
--palette sets the color palette, RGB mode only --palette pastel

Credits

Contributors

pipes-rs is maintained by CookieCoder15 and arzg; any other contributions via PRs are welcome! Forks and modifications are implicitly dual-licensed under Apache 2.0 OR MIT. Please credit the above contributers and pipes.sh when making modifications.

Inspiration

This project is based off of pipes.sh.

Comments
  • Seeing tofu instead of heavy, curved, knobby, emoji on windows 10

    Seeing tofu instead of heavy, curved, knobby, emoji on windows 10

    https://gfycat.com/heftyparallelannelid ~it keeps resetting! Am I doing something wrong? or this is a bug? using this command pipes-rs.exe -b true -c rgb -i true -k curved -p 100~

    Seems like I don't have the required Character set to view the heavy, curved, knobby, emojis pipe faces on my system!

    Edit: *curved instead of dots Edit: I forgot to set the reset threshold! it was my fault! forgive me guys!

    bug 
    opened by Droyk 6
  • [Merged by Bors] - Bump regex from 1.5.4 to 1.5.6

    [Merged by Bors] - Bump regex from 1.5.4 to 1.5.6

    Bumps regex from 1.5.4 to 1.5.6.

    Changelog

    Sourced from regex's changelog.

    1.5.6 (2022-05-20)

    This release includes a few bug fixes, including a bug that produced incorrect matches when a non-greedy ? operator was used.

    1.5.5 (2022-03-08)

    This releases fixes a security bug in the regex compiler. This bug permits a vector for a denial-of-service attack in cases where the regex being compiled is untrusted. There are no known problems where the regex is itself trusted, including in cases of untrusted haystacks.

    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

    You can disable automated security fix PRs for this repo from the Security Alerts page.

    dependencies 
    opened by dependabot[bot] 5
  • [Merged by Bors] - Add new rainbow setting

    [Merged by Bors] - Add new rainbow setting

    Resolves #102

    Use --rainbow to set the new setting, the number is the hue in degrees to shift each pipe. Only applies to RGB mode, defaults to None/0, which means no change in hue.

    opened by lhvy 4
  • [Merged by Bors] - Reuse `Vec<Pipe>` allocation across resets

    [Merged by Bors] - Reuse `Vec` allocation across resets

    Prior to this PR, a new Vec<Pipe> is allocated every time the screen is reset. Now, the same allocation is reused across App::reset_loop calls, meaning only one Vec<Pipe> is ever created.

    opened by arzg 4
  • [Merged by Bors] - Don’t unnecessarily store all on-screen text in `Screen`

    [Merged by Bors] - Don’t unnecessarily store all on-screen text in `Screen`

    Currently all text on-screen is stored in Screen so we can correctly calculate what portion of the screen has text on it so we know when to clear the screen. Turns out we don’t ever examine what the text is, just whether it’s present, so this PR just stores a bool for each cell instead of a char. Technically we could use bitvec instead of a Vec<bool>, but this would reduce code clarity without a guaranteed performance win (indexing bits is more expensive than indexing bytes).

    opened by arzg 4
  • rainbow mode!

    rainbow mode!

    Hi,

    First of all, I love this, thank you for making it. We all deserve nice things in Rust and what better than pipes.sh!

    That having been said, I recently saw a screenshot of a particular wayland compositor that features pipes with rainbow colors.

    This is the link to that screenshot: https://camo.githubusercontent.com/7481081d2b3d79ed59007f1978b7364da1c503c0c767f0131344da7728428fb6/68747470733a2f2f692e696d6775722e636f6d2f427058784d38482e706e67

    tl;dr: -c rgb is sweet, but can we have a -c rainbow too?!

    opened by colemickens 3
  • [Merged by Bors] - Bump crossbeam-utils from 0.8.5 to 0.8.8

    [Merged by Bors] - Bump crossbeam-utils from 0.8.5 to 0.8.8

    Bumps crossbeam-utils from 0.8.5 to 0.8.8.

    Release notes

    Sourced from crossbeam-utils's releases.

    crossbeam-utils 0.8.8

    • Fix a bug when unstable loom support is enabled. (#787)

    crossbeam-utils 0.8.7

    • Add AtomicCell<{i*,u*}>::{fetch_max,fetch_min}. (#785)
    • Add AtomicCell<{i*,u*,bool}>::fetch_nand. (#785)
    • Fix unsoundness of AtomicCell<{i,u}64> arithmetics on 32-bit targets that support Atomic{I,U}64 (#781)

    crossbeam-utils 0.8.6

    • Re-add AtomicCell<{i,u}64>::{fetch_add,fetch_sub,fetch_and,fetch_or,fetch_xor} that were accidentally removed in 0.8.0 0.7.1 on targets that do not support Atomic{I,U}64. (#767)
    • Re-add AtomicCell<{i,u}128>::{fetch_add,fetch_sub,fetch_and,fetch_or,fetch_xor} that were accidentally removed in 0.8.0 0.7.1. (#767)
    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

    You can disable automated security fix PRs for this repo from the Security Alerts page.

    dependencies 
    opened by dependabot[bot] 3
  • Fails to install

    Fails to install

    Brief Description of the issue

    After attempting to install pipes-rs through cargo build fails with error.

    Expected Behavior

    Build succeeds and pipes-rs is installed in the system.

    Actual Behavior

    Errors,

    Updating git repository `https://github.com/lhvy/pipes-rs.git`
      Installing pipes-rs v1.4.1 (https://github.com/lhvy/pipes-rs.git#889d5e7f)
        Updating crates.io index
      Downloaded structopt v0.3.21
      Downloaded oorandom v11.1.3
      Downloaded unicode-segmentation v1.7.1
      Downloaded dirs-next v2.0.0
      Downloaded heck v0.3.2
      Downloaded mio v0.7.11
      Downloaded pin-project-internal v1.0.6
      Downloaded mimalloc v0.1.25
      Downloaded dirs-sys-next v0.1.2
      Downloaded thiserror v1.0.24
      Downloaded thiserror-impl v1.0.24
      Downloaded toml v0.5.8
      Downloaded anyhow v1.0.40
      Downloaded futures-sink v0.3.13
      Downloaded futures-core v0.3.13
      Downloaded crossterm v0.19.0
      Downloaded pin-project v1.0.6
      Downloaded nanorand v0.5.2
      Downloaded structopt-derive v0.4.14
      Downloaded proc-macro-error v1.0.4
      Downloaded proc-macro-error-attr v1.0.4
      Downloaded serde v1.0.125
      Downloaded syn v1.0.67
      Downloaded version_check v0.9.3
      Downloaded spinning_top v0.2.2
      Downloaded flume v0.10.2
      Downloaded getrandom v0.2.2
      Downloaded serde_derive v1.0.125
      Downloaded libc v0.2.91
      Downloaded tincture v0.5.0
      Downloaded etcetera v0.3.2
      Downloaded libmimalloc-sys v0.1.21
      Downloaded 32 crates (2.7 MB) in 18.16s
       Compiling libc v0.2.91
       Compiling proc-macro2 v1.0.24
       Compiling unicode-xid v0.2.1
       Compiling syn v1.0.67
       Compiling cfg-if v1.0.0
       Compiling version_check v0.9.3
       Compiling getrandom v0.2.2
       Compiling scopeguard v1.1.0
       Compiling bitflags v1.2.1
       Compiling log v0.4.14
       Compiling serde_derive v1.0.125
       Compiling unicode-width v0.1.8
       Compiling smallvec v1.6.1
       Compiling anyhow v1.0.40
       Compiling lazy_static v1.4.0
       Compiling cc v1.0.67
       Compiling serde v1.0.125
       Compiling futures-core v0.3.13
       Compiling unicode-segmentation v1.7.1
       Compiling futures-sink v0.3.13
       Compiling strsim v0.8.0
       Compiling ansi_term v0.11.0
       Compiling vec_map v0.8.2
       Compiling oorandom v11.1.3
       Compiling tincture v0.5.0
       Compiling instant v0.1.9
       Compiling lock_api v0.4.2
       Compiling textwrap v0.11.0
       Compiling heck v0.3.2
       Compiling spinning_top v0.2.2
       Compiling quote v1.0.9
       Compiling proc-macro-error-attr v1.0.4
       Compiling proc-macro-error v1.0.4
       Compiling signal-hook-registry v1.3.0
       Compiling parking_lot_core v0.8.3
       Compiling mio v0.7.11
       Compiling atty v0.2.14
       Compiling dirs-sys-next v0.1.2
       Compiling clap v2.33.3
       Compiling dirs-next v2.0.0
       Compiling nanorand v0.5.2
       Compiling rng v0.1.0 (/home/sebas/.cargo/git/checkouts/pipes-rs-a78de783e7e290ef/889d5e7/crates/rng)
       Compiling parking_lot v0.11.1
       Compiling signal-hook v0.1.17
       Compiling crossterm v0.19.0
       Compiling libmimalloc-sys v0.1.21
       Compiling mimalloc v0.1.25
       Compiling pin-project-internal v1.0.6
       Compiling thiserror-impl v1.0.24
       Compiling structopt-derive v0.4.14
       Compiling thiserror v1.0.24
       Compiling etcetera v0.3.2
       Compiling pin-project v1.0.6
       Compiling flume v0.10.2
       Compiling terminal v0.1.0 (/home/sebas/.cargo/git/checkouts/pipes-rs-a78de783e7e290ef/889d5e7/crates/terminal)
       Compiling structopt v0.3.21
       Compiling model v0.1.0 (/home/sebas/.cargo/git/checkouts/pipes-rs-a78de783e7e290ef/889d5e7/crates/model)
       Compiling toml v0.5.8
    error[E0658]: use of unstable library feature 'array_value_iter'
       --> crates/model/src/pipe/kind.rs:191:30
        |
    191 |             .flat_map(|kind| array::IntoIter::new(kind.chars()))
        |                              ^^^^^^^^^^^^^^^^^^^^
        |
        = note: see issue #65798 <https://github.com/rust-lang/rust/issues/65798> for more information
    
    error: aborting due to previous error
    
    For more information about this error, try `rustc --explain E0658`.
    error: could not compile `model`.
    
    To learn more, run the command again with --verbose.
    warning: build failed, waiting for other jobs to finish...
    error: failed to compile `pipes-rs v1.4.1 (https://github.com/lhvy/pipes-rs.git#889d5e7f)`, intermediate artifacts can be found at `/tmp/cargo-installRYbLqA`
    
    Caused by:
      build failed
    

    System info

    OS: PopOS 20.10 Kernel: 5.8.0-7642-generic

    opened by sebasptsch 3
  • Build Linux, Windows and Mac binaries using CD workflow

    Build Linux, Windows and Mac binaries using CD workflow

    Currently CD only builds for macOS and publishes to the Homebrew tap. Support to publish a release of Windows, Linux and macOS binaries would be good.

    opened by lhvy 3
Releases(v1.6.0)
Owner
Lucas
Lucas
Trup-rewrite in rust! Finally!

Trup, but Rust! A Discord bot for the Unixporn community Now written in a good language! Dependencies Rust nightly sqlx-cli (if you need to change the

r/unixporn 106 Dec 22, 2022
This project now lives on in a rewrite at https://gitlab.redox-os.org/redox-os/parallel

MIT/Rust Parallel: A Command-line CPU Load Balancer Written in Rust This is an attempt at recreating the functionality of GNU Parallel, a work-stealer

Michael Murphy 1.2k Nov 20, 2022
minimalistic command launcher in rust

rrun Note: Apart from the occasional fix, this project is not actively developed anymore. rrun works fine and should run/compile for the time being on

null 105 Nov 18, 2022
Yet another fancy watcher. (Rust)

funzzy Yet another fancy watcher. (Inspired by antr / entr) Configure execution of different commands using semantic yaml. # .watch.yaml # list here a

Cristian Oliveira 188 Dec 12, 2022
A modern replacement for ps written in Rust

procs procs is a replacement for ps written in Rust. Documentation quick links Features Platform Installation Usage Configuration Features Output by t

null 3.6k Jan 5, 2023
A more intuitive version of du in rust

Dust du + rust = dust. Like du but more intuitive. Why Because I want an easy way to see where my disk is being used. Demo Install Cargo cargo install

andy.boot 5.5k Jan 8, 2023
Blazing 💥 fast terminal-ui for git written in rust 🦀

Blazing fast terminal client for git written in Rust Features Fast and intuitive keyboard only control Context based help (no need to memorize tons of

Stephan Dilly 11.8k Jan 5, 2023
A simple and fast download accelerator, written in Rust

zou A simple and fast download accelerator, written in Rust Zou is a Snatch fork by @k0pernicus. Snatch is a fast and interruptable download accelerat

Antonin Carette 173 Dec 4, 2022
Fuzzy Finder in rust!

Life is short, skim! Half of our life is spent on navigation: files, lines, commands… You need skim! It is a general fuzzy finder that saves you time.

Jinzhou Zhang 3.7k Jan 4, 2023
A bash-like Unix shell written in Rust

Cicada Unix Shell Cicada is a simple Unix shell written in Rust. Documents Install cicada Environment Variables Cicada Builtins Completion RC File His

Hugo Wang 921 Dec 28, 2022
Performs distributed command execution, written in Rust w/ Tokio

Concurr: Distributed and Concurrent Command Execution, in Rust This project is dual licensed under MIT and Apache 2.0. Originally inspired by the GNU

Michael Murphy 93 Dec 18, 2022
A library to listen to global hotkeys in Rust

Rust Hotkey A library to listen to global hotkeys in Rust How to use See the examples folder for how to use this library. OS Support This lib aims to

James Birtles 44 Dec 12, 2022
🔮 Futuristic take on hexdump, made in Rust.

hex (hx) Futuristic take on hexdump. hx accepts a file path as input and outputs a hexadecimal colorized view to stdout. $ hx tests/files/alphanumeric

Julian Sitkevich 387 Dec 27, 2022
A TUI system monitor written in Rust

NO LONGER MAINTAINED. For a similar program, check out https://github.com/ClementTsang/bottom. ytop Another TUI based system monitor, this time in Rus

Caleb Bassi 2.1k Jan 3, 2023
A rust layered configuration loader with zero-boilerplate configuration management.

salak A layered configuration loader with zero-boilerplate configuration management. About Features Placeholder Key Convension Cargo Features Default

Daniel YU 28 Sep 20, 2022
Untrusted IPC with maximum performance and minimum latency. On Rust, on Linux.

Untrusted IPC with maximum performance and minimum latency. On Rust, on Linux. When is this Rust crate useful? Performance or latency is crucial, and

null 72 Jan 3, 2023
A collection of small Rust programs for doing weird things

This is a repo of small programs, proof of concepts, or templates written in Rust that relate in some way to hacking and/or CTF. I think Rust is real

d3npa 22 Nov 9, 2022
🍂 A Rust-based simulated DOM (browser-independent replacement for web_sys)

DOM in Rust without a browser Hello and welcome. This library provides server-side or browserless simulation of a DOM. Example Usage use std::sync::Ar

Philip Peterson 45 Dec 13, 2022
Rust implementation to simply convert between coordinate systems

GeoMorph Simple conversion between different coordinate systems without external wrappers

Victor Lopes 10 Nov 8, 2022