Showing posts with label aubergine. Show all posts
Showing posts with label aubergine. Show all posts
Thursday, November 7, 2013
Byobu's Ubuntu Color Scheme for Manpages and Grep
I've been trying to bring Ubuntu's beautiful color palette to the command line through Byobu, starting with the command prompt, by defining a new $PS1 value.
As of Byobu 5.63 (in Trusty now, or in the Byobu PPA for other Ubuntu releases), we now have an Ubuntu theme for less, the default interface for reading manpages at a command line, as well as grep.
Double bright mode is defined to a lighter shade of Ubuntu orange, standout mode is either background Ubuntu orange or italics (depending on your terminfo), and underline mode is a lighter shade of aubergine.
Grep highlights matches in an Ubuntu orange. A special thanks to goes to Nick Moffit for that one, who is quite proudly not a Byobu user :-)
Here are some screenshots of Gnome Terminal with a few of the default color profiles. Enjoy!
:-Dustin
As of Byobu 5.63 (in Trusty now, or in the Byobu PPA for other Ubuntu releases), we now have an Ubuntu theme for less, the default interface for reading manpages at a command line, as well as grep.
Double bright mode is defined to a lighter shade of Ubuntu orange, standout mode is either background Ubuntu orange or italics (depending on your terminfo), and underline mode is a lighter shade of aubergine.
Grep highlights matches in an Ubuntu orange. A special thanks to goes to Nick Moffit for that one, who is quite proudly not a Byobu user :-)
Here are some screenshots of Gnome Terminal with a few of the default color profiles. Enjoy!
:-Dustin
Tuesday, August 27, 2013
Ubuntu Fun with $PS1
tl;dr?
From within byobu, just run:
byobu-enable-prompt
Still reading?
I've helped bring a touch of aubergine to the Ubuntu server before. Along those lines, it has long bothered me that Ubuntu's bash package, out of the box, creates a situation where full color command prompts are almost always disabled.
Of course I carry around my own, highly customized ~/.bashrc on my desktop, but whenever I start new instances of the Ubuntu server in the cloud, without fail, I end up back at a colorless, drab command prompt, like this:
That's a decent start, but there's two things I don't like about this prompt:
- There's 3 disparate pieces of information, but only two color distinctions:
- a user name
- a host name
- a current working directory
- The colors themselves are
- a little plain
- 8-color
- and non-communicative
Both of these problems are quite easy to solve. Within Ubuntu, our top notch design team has invested countless hours defining a spectacular color palette and extensive guidelines on their usage. Quoting our palette guidelines:
"Colour is an effective, powerful and instantly recognisable medium for visual communications. To convey the brand personality and brand values, there is a sophisticated colour palette. We have introduced a palette which includes both a fresh, lively orange, and a rich, mature aubergine. The use of aubergine indicates commercial involvement, while orange is a signal of community engagement. These colours are used widely in the brand communications, to convey the precise, reliable and free personality."With this inspiration, I set out to apply these rules to a beautiful, precise Ubuntu server command prompt within Byobu.
First, I needed to do a bit of research, as I would really need a 256-color palette to accomplish anything reasonable, as the 8-color and 16-color palettes are really just atrocious.
The 256-color palette is actually reasonable. I would have the following color palette to chose from:
That's not quite how these colors are rendered on a modern Ubuntu system, but it's close enough to get started.
I then spent quite a bit of time trying to match Ubuntu color tints against this chart and narrowed down the color choices that would actually fit within the Ubuntu design team's color guidelines.
This is the color balance choice that seemed most appropriate to me:
A majority of white text, on a darker aubergine background. In fact, if you open gnome-terminal on an Ubuntu desktop, this is exactly what you're presented with. White text on a dark aubergine background. But we're missing the orange, grey, and lighter purple highlights!
That number I cited above -- the 3 distinct elements of [user, host, directory] -- are quite important now, as they map exactly to our 3 supporting colors.
Against our 256-color mapping above, I chose:
- Username: 245 (grey)
- Hostname: 5 (light aubergine)
- Working directory: 5 (orange)
- Separators: 256 (white)
And in the interest of being just a little more "precise", I actually replaced the trailing $ character with the UTF-8 symbol ❭. This is Unicode's U+276D character, "MEDIUM RIGHT-POINTING ANGLE BRACKET ORNAMENT". This is a very pointed, attention-grabbing character. It directs your eye straight to the flashing cursor, or the command at your fingertips.
I took great care in choosing those 3 colors that they were readable across each of the stock schemes shipped by gnome-terminal.
I also tested it in Terminator and Konsole, where it seemed to work well enough, while xterm and putty aren't as pretty.
Currently, this functionality is easy to enable from within your Byobu environment. If you're on the latest Byobu release (currently 5.57), which you can install from ppa:byobu/ppa, simply run the command:
Of course, this prompt most certainly won't be for everyone :-) You can easily disable the behavior at any time with:
While new installations of Byobu (where there is no ~/.byobu directory) will automatically see the new prompt, starting in Ubuntu 13.10 (unless you've modified your $PS1 in your ~/.bashrc). But existing, upgraded Byobu users will need to run byobu-enable-prompt to add this into their environment.
As will undoubtedly be noted in the comments below, your mileage may vary on non-Ubuntu systems. However, if /etc/issue does not start with the string "Ubuntu", byobu-enable-prompt will provide a tri-color prompt, but employs a hopefully-less-opinionated primary colors, green, light blue, and red:
If you want to run this outside of Byobu, well that's quite doable too :-) I'll leave it as an exercise for motivated users to ferret out the one-liner you need from lp:byobu and paste into your ~/.bashrc ;-)
byobu-enable-prompt
Of course, this prompt most certainly won't be for everyone :-) You can easily disable the behavior at any time with:
byobu-disable-prompt
While new installations of Byobu (where there is no ~/.byobu directory) will automatically see the new prompt, starting in Ubuntu 13.10 (unless you've modified your $PS1 in your ~/.bashrc). But existing, upgraded Byobu users will need to run byobu-enable-prompt to add this into their environment.
As will undoubtedly be noted in the comments below, your mileage may vary on non-Ubuntu systems. However, if /etc/issue does not start with the string "Ubuntu", byobu-enable-prompt will provide a tri-color prompt, but employs a hopefully-less-opinionated primary colors, green, light blue, and red:
If you want to run this outside of Byobu, well that's quite doable too :-) I'll leave it as an exercise for motivated users to ferret out the one-liner you need from lp:byobu and paste into your ~/.bashrc ;-)
Cheers,
:-Dustin
Labels:
aubergine,
Byobu,
Canonical,
Ubuntu,
Ubuntu-Server
Friday, April 15, 2011
The New Look of the Ubuntu 11.04 Server Installer!
With Natty Beta2, the Ubuntu 11.04 Server Installer received a little bit of the same aubergine love that the Ubuntu Desktop has enjoyed now for the last few releases. Moving away from that 1980s MSDOS/PCDOS VGA blue look, the our Server installer now sports a distinctively Ubuntu color scheme!
Note that I used the Ubuntu quick install preseed to install the Ubuntu Server 11.04 Beta2 release, in a 64-bit KVM with 4 virtual CPUs, 2GB of memory, and with both the ISO and the backing qcow2 image in a tmpfs. I captured the video with xvidcap, increased the frame rate a bit to match the music with avidemux, used pitivi to add the music to the video, and the music, of course is Purple Haze by Jimi Hendrix, live from San Diego Sports Arena, May 24, 1969 on The Jimi Hendrix Experience album.
:-Dustin
Note that I used the Ubuntu quick install preseed to install the Ubuntu Server 11.04 Beta2 release, in a 64-bit KVM with 4 virtual CPUs, 2GB of memory, and with both the ISO and the backing qcow2 image in a tmpfs. I captured the video with xvidcap, increased the frame rate a bit to match the music with avidemux, used pitivi to add the music to the video, and the music, of course is Purple Haze by Jimi Hendrix, live from San Diego Sports Arena, May 24, 1969 on The Jimi Hendrix Experience album.
:-Dustin
Labels:
aubergine,
Canonical,
Ubuntu,
Ubuntu-Server
Subscribe to:
Posts (Atom)













