Skip to content
This repository has been archived by the owner on May 17, 2022. It is now read-only.
/ PHP-Cursor Public archive

A simple lib to control the Linux shell cursor!

License

Notifications You must be signed in to change notification settings

witer33/PHP-Cursor

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 

Repository files navigation

PHP-Cursor

A simple lib to control the Linux shell cursor!

Installation

include "Cursor.php";

Functions

up(n = 1) Move the cursor up n lines

Example: Cursor::up(2);

down(n = 1) Move the cursor down n lines

Example: Cursor::down(2);

back(n = 1) Move the cursor back n characters

Example: Cursor::back(2);

forward(n = 1) Move the cursor forward n characters

Example: Cursor::forward(2);

clearline() Clear the line between the cursor and the end of the line

Example: Cursor::clearline();

store() Store the cursor position

Example: Cursor::store();

restore() Restore the cursor positon

Example: Cursor::restore();

underline(true|false) Active/deactive the underline text

Example: Cursor::underline(true)

blink(true|false) Active/deactive the blink text

Example: Cursor::blink(true);

reverse(true|false) Reverse/unreverse the text and the background

Example: Cursor::reverse(true);

reset() Reset all the colors and attributes to default

Example: Cursor::reset();

black($bg = true|false,$light = true|false) Change the foreground/background to dark/light black

Example: Cursor::black($bg = false,$light = true);

red($bg = true|false,$light = true|false) Change the foreground/background to dark/light red

Example: Cursor::red($bg = false,$light = true);

green($bg = true|false,$light = true|false) Change the foreground/background to dark/light green

Example: Cursor::green($bg = false,$light = true);

yellow($bg = true|false,$light = true|false) Change the foreground/background to dark/light yellow

Example: Cursor::yellow($bg = false,$light = true);

blue($bg = true|false,$light = true|false) Change the foreground/background to dark/light blue

Example: Cursor::blue($bg = false,$light = true);

magenta($bg = true|false,$light = true|false) Change the foreground/background to dark/light magenta

Example: Cursor::magenta($bg = false,$light = true);

cyan($bg = true|false,$light = true|false) Change the foreground/background to dark/light cyan

Example: Cursor::cyan($bg = false,$light = true);

white($bg = true|false,$light = true|false) Change the foreground/background to dark/light white

Example: Cursor::white($bg = false,$light = true);

color($hexcolor,$bg = true|false) Change the foreground/background to any hex color

Example: Cursor::color("#FFFFFF",$bg = false);

About

A simple lib to control the Linux shell cursor!

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages