Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

➡️ Add background color to strings in Powerline ways

License

NotificationsYou must be signed in to change notification settings

info-mono/powerbg

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

License: GPL-3.0Development completed

💡 About

PowerBG is a tool that add to color string's background likePowerline written inportable sh.

🚀 Setup

🧾 Dependencies

📥 Installation

🔧 Manually

Option 1: usingcurl

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

Option 2: usinggit

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

📦 Package manager

ForBpkg user:

bpkg install info-mono/powerbg

ForBasher user:

basher install info-mono/powerbg

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

⌨️ Usage

Runpowerbg 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=''# Nothingred='\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 variableValidDefaultDescription
POWERBG_LEFTEND_OUTER<string>noneSet left end outer string
POWERBG_LEFTEND_INNER<string>noneSet left end inner string
POWERBG_RIGHTEND_OUTER<string>Set right end outer string
POWERBG_RIGHTEND_INNER<string>noneSet right end inner string
POWERBG_SEPARATOR_LEFT<string>noneSet 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


[8]ページ先頭

©2009-2025 Movatter.jp