Last active
March 25, 2016 21:05
-
-
Save patmandenver/6bcf570644266b750226 to your computer and use it in GitHub Desktop.
sbt global shell prompt
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| shellPrompt := { state => | |
| def textColor(color: Int) = { s"\033[38;5;${color}m" } | |
| def backgroundColor(color:Int) = { s"\033[48;5;${color}m" } | |
| def reset = { s"\033[0m" } | |
| def formatText(str: String)(txtColor: Int, backColor: Int) = { | |
| s"${textColor(txtColor)}${backgroundColor(backColor)}${str}${reset}" | |
| } | |
| val red = 1 | |
| val green = 2 | |
| val yellow = 11 | |
| val white = 15 | |
| val black = 16 | |
| val orange = 166 | |
| formatText(s"[${name.value}]")(white, orange) + | |
| "\n " + | |
| formatText("\u276f\u276f\u276f ")(orange, black) | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment