Give a fresh beer after the hard work of brewing #16020

Closed
wants to merge 1 commit into
from

Projects

None yet
@samueljohn

This is a little visual tuning and a bit of fun, too.

At the beginning of the summary line a 🍺 is given out (but only on Mountain Lion or above). This acts as a nice visual marker for the end of a (successful) brew-ing process. Helpful, especially when several deps are being brewed. It's also a little bit of branding for Homebrew.

  • Name of the brewed formula in "Summary" heading. It was so hard to quickly scan for the name in homebrew/Cellar/sqlite/3.7.14.1: 9 files, 1,9M, built in 23 seconds
  • Name of the currently brewing formula (or dep) is in green. That makes is possible to scan for the formula names effortlessly. See shots below.

Tested with Terminal.app and all kind of different fonts. Please test with iTerm and what-so-ever your favorite term is.

sample
...snip...
sample
...snip...
sample

@samueljohn

@humdedum well first, I'd like to get some feed-back and second, let's see how far we can get with unicode :-)

Right now, it's not optional. Worst thing that can happen is you see the unicode sequence <U+1F37A> instead of a 🍺.

@MikeMcQuaid
Homebrew member

This is amazing

@ghost

😱 😱 😱 😱 😱 😱 😱 😱 😱

@MindTooth

iTerm 2, Adobe Source Code Pro, base16 theme.

Beer Console

@bjoernalbers

awesome!

@asparagui
Homebrew member

👍 🍺

@mxcl
Homebrew member

Hah. I am 80% in love.

Bit tacky maybe? @jacknagel, @adamv, @mistydemeo, @Sharpie.

@adamv

Fine by me.

@Sharpie

What's the point of having a beer theme if we don't use it? +1 here.

@samueljohn

@humdedum That is syntax highlighting of the zsh (I use zprezto (search on github)).
@MindTooth thanks for the iTerm check!
@mxc for the missing 20%, there is an emoji with two beer jugs for brew2 ;-P

Oh, I haven't tested ssh yet.

@mistydemeo

👍

Works just fine for me in Lion, btw:

@samueljohn

@mistydemeo shall I replace the guard MacOS.version >= :mountain_lion by MacOS.version >= :lion, then?
I'd expect you don't get a beer with your Lion.

@bjoernalbers

@mxcl 80% are enough (Pareto)

Just let me know when the official t-shirts are ready to order...

@mistydemeo

@samueljohn Yeah, I tested by changing the guard. The emoji is in Lion so totally should be enabled there.

@samueljohn

@mistydemeo Ok, fixed. Now the Lion gets drunk, too.

@samueljohn

Let me know, if there is anything holding you back.

/offtopic: "Adobe Source Code Pro" looks fantastic, @MindTooth. I switched.

@samueljohn

We won't get moar_beer until someone pulls it :-)

@samueljohn samueljohn Give a fresh 🍺 after hard work of brew install
- Name of the brewed formula in "Summary" heading.
- At the beginning of the summary line a 🍺  is given out
  (but only on Lion or above). This acts as a nice
  visual marker for the end of a brew-ing process.
- When brewing a dependency, the name is highlighted in green.
- `oh1` is bold, too (like ohai).
6e3758d
@samueljohn

🎵

@MikeMcQuaid MikeMcQuaid added a commit that closed this pull request Jan 11, 2013
@samueljohn samueljohn Give a fresh 🍺 after hard work of brew install
- Name of the brewed formula in "Summary" heading.
- At the beginning of the summary line a 🍺  is given out
  (but only on Lion or above). This acts as a nice
  visual marker for the end of a brew-ing process.
- When brewing a dependency, the name is highlighted in green.
- `oh1` is bold, too (like ohai).

Closes #16020.

Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
21617a7
@MikeMcQuaid
Homebrew member

You think just because I'm in a good mood I'll pull this? You are right. We can always revert if it breaks the universe.

@samueljohn

Harhar! Now I am going to re-brew everything just to see the beer coming in!

Quite some people have tested this now ... but you never know ... let's see.

@samueljohn samueljohn deleted the samueljohn:moar_beer branch Jan 11, 2013
@samueljohn

Now that I see it

🍺 /usr/local/Cellar/python/2.7.3: 5169 files, 79M, built in 87 seconds

I wish I had replaces "built" by "brewed" ...

@MikeMcQuaid
Homebrew member

I'm up for that. @mxcl ?

@justinkb

shows a white background pic on a dark background for me. iterm2/solarized colors.

can I just revert 21617a7 to disable this or is it more involved?

@MikeMcQuaid
Homebrew member

Screenshot please?

@adamv

It's a beer in a white square on a black terminal background, I see it too. Use your imagination.

@samueljohn

On Mountain Lion it shows correctly with transparency around the 🍺
@justinkb are you on Lion?

We can deactivate it on Lion as in the initial revision.

@samueljohn

On 10.8 transparency works (Terminal.app) on a bright background.

Screen Shot 2013-01-11 at 18 53 47

@samueljohn

print "🍺 " if MacOS.version >= :lion

should be :mountain_lion then if :lion user see it ugly. @justinkb drag'n'drop a shot!

@justinkb

sorry to burst your bubble, but I'm on mountain lion ;-) I guess the difference is that you use Terminal.app and I use iTerm.app? TERM_PROGRAM env variable could be used here, set to Apple_Terminal for Terminal.app, iTerm.app for iTerm.

Screen Shot 2013-01-11 at 7 13 59 PM

@MindTooth

Can confirm with iTerm:

Maybe it's a bug related to how iTerm renders stuff?

@dcoeurjo

A bit out-of-topic, sorry for that but @justinkb, how have you setup this neat prompt in your iTerm?

@Sharpie Sharpie pushed a commit to Sharpie/homebrew that referenced this pull request Jan 11, 2013
@samueljohn samueljohn Give a fresh 🍺 after hard work of brew install
- Name of the brewed formula in "Summary" heading.
- At the beginning of the summary line a 🍺  is given out
  (but only on Lion or above). This acts as a nice
  visual marker for the end of a brew-ing process.
- When brewing a dependency, the name is highlighted in green.
- `oh1` is bold, too (like ohai).

Closes #16020.

Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
f0d2b6e
@samueljohn

in iTerm2 (just downloaded) it looks good on the default black bg. How do I set up a bright bg?

@samueljohn

Found bright bg and transparency. But looks good still. Do you use an old iTerm?
Screen Shot 2013-01-11 at 20 31 03

@dcoeurjo

@MindTooth @justinkb thanks ! The complete combo is: zsh/"oh my zsh"/"agnoster" theme/iTerm2

By the way, the beer symbol is fine in my setting.

@samueljohn

Instead of "oh my zsh", I recommend zprezto.

I tested @MindTooth's theme suggestion, but works perfectly well in 10.8 with iTerm2.

@MindTooth

I ran a self-compiled build. With the dec. 24 release, it works just fine :)

@samueljohn

@MindTooth I tried with your link to base16-eighties.dark.256.itermcolors, imported that into iTerm2, but still, it looks flawless (without a rectangle). Even tried to add a background image or whatever. I can't break it.

@MindTooth

Sorry. I didn't elaborate enough. I download the latest release from iTerm2. And it do work for me :)

@matrixagent

Doesn't work here either, latest Mountain Lion, latest iTerm2. I'm happy to share my iTerm settings and colors in case you want to debug.

Edit: wow, pretty weird. I copy&pasted the emoji into my Terminal, then aborted the command with Ctrl+C. This results in the first, previously broken, occurrence of the emoji being shown properly, without white background. This is reproducable for me, i.e. repeating the copy&paste and Ctrl+C results in the next occurrence being shown correctly.

@samueljohn

Ensure you have UTF-8 encoding (which is the default for iTerm and Terminal)

@samueljohn

Please send me your config to github@samueljohn.de @matrixagent

@yrammos

If I submit a pull request enabling a --brewcoffee option, does it stand any chance?

@amarshall

This iTerm issue suggests the unicode emoji background color problem is fixed in trunk, but not in a released version yet.

@dholm dholm added a commit to dholm/homebrew that referenced this pull request Jan 14, 2013
@samueljohn samueljohn Give a fresh 🍺 after hard work of brew install
- Name of the brewed formula in "Summary" heading.
- At the beginning of the summary line a 🍺  is given out
  (but only on Lion or above). This acts as a nice
  visual marker for the end of a brew-ing process.
- When brewing a dependency, the name is highlighted in green.
- `oh1` is bold, too (like ohai).

Closes #16020.

Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
9720e6f
@norioxkimura norioxkimura added a commit to norioxkimura/homebrew that referenced this pull request Jan 16, 2013
@samueljohn samueljohn Give a fresh 🍺 after hard work of brew install
- Name of the brewed formula in "Summary" heading.
- At the beginning of the summary line a 🍺  is given out
  (but only on Lion or above). This acts as a nice
  visual marker for the end of a brew-ing process.
- When brewing a dependency, the name is highlighted in green.
- `oh1` is bold, too (like ohai).

Closes #16020.

Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
958ea23
@FredericJacobs

Thanks guys, this made my day 👍
Screen Shot 2013-01-16 at 6 30 55 PM

@justinkb

building iTerm from the latest git revision indeed fixed this.

@konstantinbe

No offense, is it possible to disable the emojis (not a fan of emojis)?

@samueljohn

export HOMEBREW_NO_EMOJI=1 it's in the wiki.

@konstantinbe

@samueljohn: wonderful, thanks!

@rajeeja rajeeja pushed a commit that referenced this pull request Apr 19, 2013
@samueljohn samueljohn Give a fresh 🍺 after hard work of brew install
- Name of the brewed formula in "Summary" heading.
- At the beginning of the summary line a 🍺  is given out
  (but only on Lion or above). This acts as a nice
  visual marker for the end of a brew-ing process.
- When brewing a dependency, the name is highlighted in green.
- `oh1` is bold, too (like ohai).

Closes #16020.

Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
0a5a6f8
@xu-cheng xu-cheng locked and limited conversation to collaborators Feb 16, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.