Giter VIP home page Giter VIP logo

powerbg's Introduction

License: GPL-3.0 Development completed

💡 About

PowerBG is a tool that add to color string's background like Powerline written in portable sh.

🚀 Setup

🧾 Dependencies

📥 Installation

🔧 Manually

Option 1: using curl

curl https://raw.githubusercontent.com/info-mono/powerbg/main/bin/powerbg > ~/.local/bin/powerbg
chmod +x ~/.local/bin/powerbg

Option 2: using git

git clone https://github.com/info-mono/powerbg.git ~/.local/share/powerbg
ln -s ~/.local/share/powerbg/bin/powerbg ~/.local/bin/powerbg

📦 Package manager

For Bpkg user:

bpkg install info-mono/powerbg

For Basher user:

basher install info-mono/powerbg

If you can and want to port PowerBG to other package managers, feel free to do so.

⌨️ Usage

Run powerbg in the terminal:

powerbg COLOR STRING COLOR STRING COLOR STRING ...

Examples:

powerbg '0' "$USER" '8' "$PWD"

Example 1

POWERBG_LEFTEND_OUTER='' \
POWERBG_RIGHTEND_OUTER='' \
POWERBG_SEPARATOR_RIGHT='' \
POWERBG_SEPARATOR_SAME=' \033[30m ' \
powerbg '1' '\033[30mRed' '3' '\033[30mYellow' '3' '\033[30mYellow again' '2' '\033[30mGreen' '6' '\033[30mCyan' '4' '\033[30mBlue' '5' '\033[30mPurple'

Example 2

green='\033[30mTree'
cyan='\033[30mSky'
blue='\033[30mWater'
purple='' # Nothing
red='\033[30mApple'

POWERBG_LEFTEND_OUTER='' \
POWERBG_RIGHTEND_OUTER='' \
POWERBG_SEPARATOR_RIGHT='' \
POWERBG_SEPARATOR_SAME=' \033[30m ' \
powerbg '2' "$green" '6' "$cyan" '4' "$blue" '5' "$purple" '1' "$red"

Example 3

⚙️ Configuration

PowerBG is configured through environment variables: export POWERBG_<SETTING>="<value>"

Environment variable Valid Default Description
POWERBG_LEFTEND_OUTER <string> none Set left end outer string
POWERBG_LEFTEND_INNER <string> none Set left end inner string
POWERBG_RIGHTEND_OUTER <string> Set right end outer string
POWERBG_RIGHTEND_INNER <string> none Set right end inner string
POWERBG_SEPARATOR_LEFT <string> none Set separator left string
POWERBG_SEPARATOR_RIGHT <string> Set separator right string
POWERBG_SEPARATOR_SAME <string> Set separator string to use when when separating two elements with the same color

💌 Credits

Special thanks to:






Made with ❤️ by @info-mono

Buy Me a Coffee

powerbg's People

Contributors

nnbnh avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.