Convert Figma logo to code with AI

pipeseroni logopipes.sh

Animated pipes terminal screensaver

2,445
75
2,445
13

Top Related Projects

A command line tool that recreates the famous data decryption effect seen in the 1992 movie Sneakers.

3,966

Terminal based "The Matrix" like implementation

10,524

A new way to see and navigate directory trees : https://dystroy.org/broot

1,349

Claudio's FIGlet tree

Quick Overview

pipes.sh is a bash script that creates an animated pipe screensaver in the terminal. It simulates pipes of different colors and characters moving across the screen, creating a mesmerizing visual effect reminiscent of classic pipe screensavers.

Pros

  • Lightweight and runs directly in the terminal without additional dependencies
  • Customizable with various options for pipe styles, colors, and animation speed
  • Cross-platform compatibility (works on most Unix-like systems)
  • Fun and nostalgic visual effect for terminal users

Cons

  • Limited practical use beyond entertainment or screen decoration
  • May consume CPU resources, especially on older systems
  • Requires a color-capable terminal for full effect
  • Not suitable for servers or headless environments

Getting Started

To use pipes.sh, follow these steps:

  1. Clone the repository:

    git clone https://github.com/pipeseroni/pipes.sh.git
    
  2. Navigate to the project directory:

    cd pipes.sh
    
  3. Run the script:

    ./pipes.sh
    
  4. To see available options, use:

    ./pipes.sh -h
    

You can customize the animation by using various flags. For example:

./pipes.sh -t 0 -R -r 2000 -p 3

This command uses pipe style 0, rainbow colors, a refresh rate of 2000 microseconds, and 3 pipes.

Competitor Comparisons

A command line tool that recreates the famous data decryption effect seen in the 1992 movie Sneakers.

Pros of no-more-secrets

  • Provides a unique "decryption" effect for text, mimicking the movie "Sneakers"
  • Can be applied to various command outputs and text files
  • Offers a standalone binary for easy integration into scripts or other programs

Cons of no-more-secrets

  • Limited in functionality compared to pipes.sh, which offers more visual variety
  • Lacks customization options for colors or animation speed
  • May not be as visually engaging for long-term terminal decoration

Code Comparison

pipes.sh:

while ! read -t0.0001 -n1; do
    CURR_X=$((RANDOM%COLS))
    CURR_Y=$((RANDOM%LINES))
    printf "\033[${CURR_Y};${CURR_X}f${CHAR}"
done

no-more-secrets:

for (i = 0; i < nms->width; ++i) {
    if (nms->matrix[i].is_space) {
        continue;
    }
    nms->matrix[i].mask = maskchar;
    mvaddch(nms->matrix[i].y, nms->matrix[i].x, maskchar);
}

The code snippets show that pipes.sh focuses on generating random pipe-like patterns, while no-more-secrets emphasizes the "decryption" effect by masking and revealing characters.

3,966

Terminal based "The Matrix" like implementation

Pros of cmatrix

  • More visually appealing with its "Matrix" style digital rain effect
  • Offers customization options for colors and characters
  • Includes screensaver functionality

Cons of cmatrix

  • Less interactive than pipes.sh
  • Limited to a single visual style (digital rain)
  • May be more resource-intensive due to its graphical nature

Code Comparison

cmatrix:

for (j = 0; j <= LINES; j++) {
    for (i = 0; i <= COLS - 1; i += 2) {
        move(j, i);
        if (matrix[i][j].val == 1) {
            attrset(COLOR_PAIR(matrix[i][j].color));
            addch(matrix[i][j].character);
        }
    }
}

pipes.sh:

for ((i = 1; i <= num_pipes; i++)); do
    init_pipe $i
done

while :; do
    for ((i = 1; i <= num_pipes; i++)); do
        draw_pipe $i
    done
    sleep $DELAY
done

The code snippets show that cmatrix is written in C and uses ncurses for terminal manipulation, while pipes.sh is a Bash script. cmatrix's code focuses on rendering characters in a matrix-like pattern, whereas pipes.sh manages multiple "pipes" moving across the screen.

10,524

A new way to see and navigate directory trees : https://dystroy.org/broot

Pros of broot

  • Practical file management tool with advanced features like fuzzy search and tree view
  • Actively maintained with regular updates and improvements
  • Comprehensive documentation and user guide

Cons of broot

  • More complex to use, requiring learning specific commands and shortcuts
  • Larger codebase and dependencies, potentially slower to install and run

Code comparison

broot (Rust):

pub fn start(cli_options: &CliOptions) -> Result<(), ProgramError> {
    let mut w = W::new(cli_options)?;
    w.run()
}

pipes.sh (Bash):

while :; do
    for ((i = 0; i < p; i++)); do
        # [...] pipe drawing logic
    done
    read -t 0.0001 -n 1 && [[ $REPLY = q ]] && exit 0
    $clear
done

Key differences

  • broot is a feature-rich file manager, while pipes.sh is a simple ASCII art animation
  • broot is written in Rust, offering better performance and safety compared to pipes.sh's Bash script
  • broot has a more extensive codebase with multiple modules, while pipes.sh is a single script file
  • broot provides practical utility for file system navigation, whereas pipes.sh is purely for entertainment

Both projects serve different purposes and cater to distinct user needs. broot offers a powerful file management tool, while pipes.sh provides a fun, lightweight animation for terminal customization.

1,349

Claudio's FIGlet tree

Pros of figlet

  • More practical utility for text formatting and ASCII art generation
  • Wider range of output styles and fonts
  • Actively maintained with recent updates

Cons of figlet

  • Less visually dynamic compared to pipes.sh's animated output
  • Requires input text to generate output, unlike pipes.sh's automatic generation
  • More complex usage with various options and parameters

Code Comparison

figlet:

void putcharacter(char c)
{
    int row, col;
    for (row = 0; row < char_height; row++) {
        for (col = 0; col < currchar[row].length; col++)
            putchar(currchar[row].contents[col]);
        if (row + 1 < char_height)
            putchar('\n');
    }
}

pipes.sh:

init_pipes() {
    for ((i = 1; i <= p; i++)); do
        init_pipe "$i"
    done
}

The figlet code snippet shows a function for outputting characters in ASCII art format, while the pipes.sh code initializes the pipes for the animation. figlet's code is in C, focusing on character rendering, whereas pipes.sh uses Bash scripting for setting up the visual elements of its animation.

Convert Figma logo designs to code with AI

Visual Copilot

Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.

Try Visual Copilot

README

======== pipes.sh

Animated pipes terminal screensaver.

.. note on taking the screenshots

Font is Inconsolata, font size 24 as in 16x35 pixel per character

Image size is 640x210. A sample command, where terminal at +0+18, window border is 2, terminal is urxvt, seems to 2 pixels as padding:

xsnap -region 640x210+$((2+2))+$((20+2)) -file i/pipes.png

.. figure:: i/pipes.png :target: screencast_

Screenshot of pipes.sh, click to watch a screencast_ on YouTube.

.. _screencast: http://youtu.be/q_nYfR6CVEY

.. contents:: Contents :local: :backlinks: top

Requirements

  • Bash 4+ since version 1.0.0.

  • ncurses for tput

    • = 6.1 (2018-01-27) for 24-bit colors and TERM=*-direct.

Installation

If you want to install, you can run:

.. code:: sh

$ make install

By default, it installs to /usr/local; for user home, you can run:

.. code:: sh

$ make PREFIX=$HOME/.local install

Or any PREFIX you prefer.

The Makefile also provides uninstall target.

If you are a Homebrew <http://brew.sh>_ user, you can install via:

.. code-block:: sh

$ brew install pipes-sh

Options

See |pipes.sh(6)|_ for a full list of options.

.. |pipes.sh(6)| replace:: pipes.sh(6) .. _pipes.sh(6): https://pipeseroni.github.io/pipes.sh/pipes.sh.6.html

-t [#]: pipe types

.. note on taking the screenshots

Font is Inconsolata, font size 24 as in 16x35 pixel per character

Image size is 480x140. A sample command, where terminal at +0+18, window border is 2, terminal is urxvt, seems to 2 pixels as padding:

xsnap -region 480x140+$((2+2))+$((20+2)) -file i/pipes.t#.png

+----------+------------------------+----------------------------+ | -t # | Characters | Screenshots | +==========+========================+============================+ | -t 0 | ┃┏ ┓┛━┓ ┗┃┛┗ ┏━ | .. figure:: i/pipes.t0.png | +----------+------------------------+----------------------------+ | -t 1 | │╭ ╮╯─╮ ╰│╯╰ ╭─ | .. figure:: i/pipes.t1.png | +----------+------------------------+----------------------------+ | -t 2 | │┌ ┐┘─┐ └│┘└ ┌─ | .. figure:: i/pipes.t2.png | +----------+------------------------+----------------------------+ | -t 3 | ║╔ ╗╝═╗ ╚║╝╚ ╔═ | .. figure:: i/pipes.t3.png | +----------+------------------------+----------------------------+ | -t 4 | |+ ++-+ +|++ +- | .. figure:: i/pipes.t4.png | +----------+------------------------+----------------------------+ | -t 5 | |/ \/-\ \|/\ /- | .. figure:: i/pipes.t5.png | +----------+------------------------+----------------------------+ | -t 6 | .. .... .... .. | .. figure:: i/pipes.t6.png | +----------+------------------------+----------------------------+ | -t 7 | .o oo.o o.oo o. | .. figure:: i/pipes.t7.png | +----------+------------------------+----------------------------+ | -t 8 | | -\ /\|/ /-\/ \| | .. figure:: i/pipes.t8.png | | | | (railway) | | +----------+------------------------+----------------------------+ | -t 9 | | ╿┍ ┑┚╼┒ ┕╽┙┖ ┎╾ | .. figure:: i/pipes.t9.png | | | | (knobby) | | +----------+------------------------+----------------------------+

-t c[16 chars]: custom pipe

For example, -t cMAYFORCEBWITHYOU.

.. note on taking the screenshot

Font is Inconsolata, font size 24 as in 16x35 pixel per character

Image size is 640x140. A sample command, where terminal at +0+18, window border is 2, terminal is urxvt, seems to 2 pixels as padding:

xsnap -region 640x140+$((2+2))+$((20+2)) -file i/pipes.tc.png

.. figure:: i/pipes.tc.png

Controls

Press any key to exit the program, except the following :kbd:Shift + :kbd:Key:

=================== ====================================================== Keys Actions =================== ====================================================== :kbd:P / :kbd:O Increase/decrease probability of straight pipes :kbd:F / :kbd:D Increase/decrease frame rate :kbd:B Toggle bold effect :kbd:C Toggle no colors :kbd:K Toggle keeping pipe color and type when crossing edges =================== ======================================================

History

(Read full history_ in |pipes.sh(6)|_)

.. _history: https://pipeseroni.github.io/pipes.sh/pipes.sh.6.html#HISTORY

pipes.sh was originally created by Matthew Simpson and posted to the Arch Linux Forums__ in early 2010. It was also later posted to Gist__ released in the public domain.

__ https://bbs.archlinux.org/viewtopic.php?pid=728932#p728932 __ https://gist.github.com/msimpson/1096939

In 2015, the MIT License was added and the Pipeseroni_ collective was formed to maintain pipes.sh.

.. _Pipeseroni: https://pipeseroni.github.io/

Reporting an Issue

  • Reporting a bug__

__ https://github.com/pipeseroni/pipes.sh/issues/new?template=BUG.md&title=Brief+bug+summary

Contribution

Feel free to fork and/or create pull request following the guideline_. If you're contributing, remember your changes will be released under the MIT license.

.. _guideline: CONTRIBUTING.rst

Copyright

pipes.sh is licensed under the MIT License.