Instantly share code, notes, and snippets.

Embed
What would you like to do?
Ubuntu 16.04 + Terminator + Oh My ZSH with Agnoster Theme

Install Terminator (shell)

sudo add-apt-repository ppa:gnome-terminator
sudo apt-get update
sudo apt-get install terminator

Terminator should be setup as default now. Restart your terminal (shortcut: "Ctrl+Alt+T").

Install ZSH

sudo apt-get install zsh

Restart your terminal. Choose option 2 for Z Shell configuration.
Don't forget to migrate your previous configurations (RVM, Rbenv...) from .bashrc to .zshrc

Install Oh My ZSH

cd
sh -c "$(curl -fsSL https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"

Setup missing fonts (powerline)

Install powerline font

cd
wget https://github.com/powerline/powerline/raw/develop/font/PowerlineSymbols.otf
wget https://github.com/powerline/powerline/raw/develop/font/10-powerline-symbols.conf
mkdir ~/.fonts/
mv PowerlineSymbols.otf ~/.fonts/
mkdir -p .config/fontconfig/conf.d #if directory doesn't exists

Clean fonts cache

fc-cache -vf ~/.fonts/

Move config file

mv 10-powerline-symbols.conf ~/.config/fontconfig/conf.d/

Configure ZSH

vim ~/.zshrc

Theme

Change [ZSH_THEME="robbyrussell"] to [ZSH_THEME="agnoster"]

ZSH_THEME="agnoster"

Change theme colors to solarize

dconf is required if you don't already have it.

sudo apt-get install dconf-cli
git clone git://github.com/sigurdga/gnome-terminal-colors-solarized.git ~/.solarized
cd ~/.solarized
./install.sh
  • I recommend you option 1 (dark theme) which is just great.
  • Choose option 1 to download seebi' dircolors-solarized

After installation, open .zshrc and add the line:

eval `dircolors ~/.dir_colors/dircolors`

To activate dark solarize theme in Terminator just right click on the terminal,

Preferences>Profiles>Colors>Foreground and Background>Built-in schemes: Solarized dark Preferences>Profiles>Colors>Palette>Built-in schemes: Solarized

Restart Terminator and you're done!

Ruby developer (optional)

Plugins

If you are Ruby developer you can use these plugins by replacing plugins in .zshrc

plugins=(git rails rails3 ruby capistrano bundler heroku rake rvm autojump command-not-found python pip github gnu-utils history-substring-search zsh-syntax-highlighting)

Ruby version prompt

(Add one of the line below into your .zshrc file)

RVM users
RPROMPT="\$(~/.rvm/bin/rvm-prompt s i v g)%{$fg[yellow]%}[%*]"
Rbenv users
RPROMPT='%{$fg[yellow]%}$(rbenv version-name)%{$reset_color%}%'

That's it!

@mehranrasulian

This comment has been minimized.

Show comment
Hide comment
@mehranrasulian

mehranrasulian Mar 24, 2016

'Agnoster' is an Awesome theme I've ever seen.
Thank you !!! πŸ‘

mehranrasulian commented Mar 24, 2016

'Agnoster' is an Awesome theme I've ever seen.
Thank you !!! πŸ‘

@wellington1993

This comment has been minimized.

Show comment
Hide comment
@wellington1993

wellington1993 commented May 16, 2016

Thanks!

@panigrc

This comment has been minimized.

Show comment
Hide comment
@panigrc

panigrc Jun 21, 2016

Thanks, awesome guide !!!

panigrc commented Jun 21, 2016

Thanks, awesome guide !!!

@arrchana

This comment has been minimized.

Show comment
Hide comment
@arrchana

arrchana Jul 8, 2016

Thanks for the great guide! Worked like a breeze πŸ‘ 😎

arrchana commented Jul 8, 2016

Thanks for the great guide! Worked like a breeze πŸ‘ 😎

@billhhh

This comment has been minimized.

Show comment
Hide comment
@billhhh

billhhh Jul 23, 2016

great, I made it on CentOS by following your totorial

billhhh commented Jul 23, 2016

great, I made it on CentOS by following your totorial

@addoull

This comment has been minimized.

Show comment
Hide comment
@addoull

addoull Aug 5, 2016

thanks and keep the good work

addoull commented Aug 5, 2016

thanks and keep the good work

@pataiadam

This comment has been minimized.

Show comment
Hide comment
@pataiadam

pataiadam Aug 11, 2016

Thanks for putting this together. :) Awesome guide!

pataiadam commented Aug 11, 2016

Thanks for putting this together. :) Awesome guide!

@gracefulife

This comment has been minimized.

Show comment
Hide comment
@gracefulife

gracefulife Sep 28, 2016

Thanks πŸ˜„

gracefulife commented Sep 28, 2016

Thanks πŸ˜„

@quang-ha

This comment has been minimized.

Show comment
Hide comment
@quang-ha

quang-ha Sep 30, 2016

@renshuki This is lovely - can the directory address be shortened?

quang-ha commented Sep 30, 2016

@renshuki This is lovely - can the directory address be shortened?

@renshuki

This comment has been minimized.

Show comment
Hide comment
@renshuki

renshuki Oct 7, 2016

@quang-ha
In .oh-my-zsh/themes/agnoster.zsh-theme look for line #189:

# Dir: current working directory
prompt_dir() {
  prompt_segment blue black '%~'
}

Replace prompt_segment blue black '%~' by prompt_segment blue black '%(4~|.../%3~|%~)' and restart your terminal :)
It will add "..." and keep the last 3 directories.

Owner

renshuki commented Oct 7, 2016

@quang-ha
In .oh-my-zsh/themes/agnoster.zsh-theme look for line #189:

# Dir: current working directory
prompt_dir() {
  prompt_segment blue black '%~'
}

Replace prompt_segment blue black '%~' by prompt_segment blue black '%(4~|.../%3~|%~)' and restart your terminal :)
It will add "..." and keep the last 3 directories.

@luispcosta

This comment has been minimized.

Show comment
Hide comment
@luispcosta

luispcosta Dec 17, 2016

Awesome mate! Thank you so much for this πŸ‘

luispcosta commented Dec 17, 2016

Awesome mate! Thank you so much for this πŸ‘

@bluemanos

This comment has been minimized.

Show comment
Hide comment
@bluemanos

bluemanos Jan 13, 2017

πŸ‘ from me! Thanks!

bluemanos commented Jan 13, 2017

πŸ‘ from me! Thanks!

@silne30

This comment has been minimized.

Show comment
Hide comment
@silne30

silne30 Feb 10, 2017

πŸ‘ This is a fantastic writeup! I really appreciate it! bitmoji

silne30 commented Feb 10, 2017

πŸ‘ This is a fantastic writeup! I really appreciate it! bitmoji

@kuo77122

This comment has been minimized.

Show comment
Hide comment
@kuo77122

kuo77122 Feb 27, 2017

Thinks!! Awesome instruction

kuo77122 commented Feb 27, 2017

Thinks!! Awesome instruction

@GauravChaddha1996

This comment has been minimized.

Show comment
Hide comment
@GauravChaddha1996

GauravChaddha1996 Apr 9, 2017

I so wanted this setup. Thank you for the gist.

GauravChaddha1996 commented Apr 9, 2017

I so wanted this setup. Thank you for the gist.

@louispetitjean

This comment has been minimized.

Show comment
Hide comment
@louispetitjean

louispetitjean May 22, 2017

Super clear, thanks a lot !

louispetitjean commented May 22, 2017

Super clear, thanks a lot !

@naseer036

This comment has been minimized.

Show comment
Hide comment
@naseer036

naseer036 Jun 6, 2017

thanks man

naseer036 commented Jun 6, 2017

thanks man

@dillanjwilding

This comment has been minimized.

Show comment
Hide comment
@dillanjwilding

dillanjwilding Jun 7, 2017

As of writing this comment, dircolors.ansi-dark is a file not a directory so after you run

mv dircolors.ansi-dark .solarized

You need to add

eval `dircolors ~/.solarized`

Instead of

eval `dircolors ~/.solarized/dircolors.ansi-dark`

dillanjwilding commented Jun 7, 2017

As of writing this comment, dircolors.ansi-dark is a file not a directory so after you run

mv dircolors.ansi-dark .solarized

You need to add

eval `dircolors ~/.solarized`

Instead of

eval `dircolors ~/.solarized/dircolors.ansi-dark`
@renshuki

This comment has been minimized.

Show comment
Hide comment
@renshuki

renshuki Jun 12, 2017

I've not done a fresh install for a while but it seems gnome-terminal-colors-solarized repository has been updated. This Gist has been modified accordingly. I try to keep it up to date as possible so if you notice something wrong, feel free to drop me a line here =)

Owner

renshuki commented Jun 12, 2017

I've not done a fresh install for a while but it seems gnome-terminal-colors-solarized repository has been updated. This Gist has been modified accordingly. I try to keep it up to date as possible so if you notice something wrong, feel free to drop me a line here =)

@keeblers-n-bits

This comment has been minimized.

Show comment
Hide comment
@keeblers-n-bits

keeblers-n-bits commented Sep 13, 2017

Thank you!

@djm158

This comment has been minimized.

Show comment
Hide comment
@djm158

djm158 Oct 3, 2017

This is exactly what I was looking for thank you!

djm158 commented Oct 3, 2017

This is exactly what I was looking for thank you!

@Vimalraj578

This comment has been minimized.

Show comment
Hide comment
@Vimalraj578

Vimalraj578 Nov 3, 2017

When i install the

git clone git://github.com/sigurdga/gnome-terminal-colors-solarized.git ~/.solarized cd ~/.solarized ./install.sh

my terminal font color,size,resolution are all changed !
Uploading Screenshot from 2017-11-03 19-48-30.png…

terminal setting gone from left to right

Vimalraj578 commented Nov 3, 2017

When i install the

git clone git://github.com/sigurdga/gnome-terminal-colors-solarized.git ~/.solarized cd ~/.solarized ./install.sh

my terminal font color,size,resolution are all changed !
Uploading Screenshot from 2017-11-03 19-48-30.png…

terminal setting gone from left to right

@gdahboy

This comment has been minimized.

Show comment
Hide comment
@gdahboy

gdahboy Nov 9, 2017

perfect ... really thank you πŸ‘

gdahboy commented Nov 9, 2017

perfect ... really thank you πŸ‘

@cgnitash

This comment has been minimized.

Show comment
Hide comment
@cgnitash

cgnitash Nov 21, 2017

Worked like a charm. Thanks a ton.

cgnitash commented Nov 21, 2017

Worked like a charm. Thanks a ton.

@ZhiyuanSun

This comment has been minimized.

Show comment
Hide comment
@ZhiyuanSun

ZhiyuanSun Nov 22, 2017

THANK YOU!!!

ZhiyuanSun commented Nov 22, 2017

THANK YOU!!!

@Djourdain

This comment has been minimized.

Show comment
Hide comment
@Djourdain

Djourdain Dec 3, 2017

Very nice walkthrough, very helpfull. love my new prompt :)

Djourdain commented Dec 3, 2017

Very nice walkthrough, very helpfull. love my new prompt :)

@v1-wizard

This comment has been minimized.

Show comment
Hide comment
@v1-wizard

v1-wizard Dec 28, 2017

Thanks. Very usefull.

v1-wizard commented Dec 28, 2017

Thanks. Very usefull.

@chrisarts

This comment has been minimized.

Show comment
Hide comment
@chrisarts

chrisarts Dec 29, 2017

Thank you, no complications in the process, just brilliant!

chrisarts commented Dec 29, 2017

Thank you, no complications in the process, just brilliant!

@NazmusShakib

This comment has been minimized.

Show comment
Hide comment
@NazmusShakib

NazmusShakib Jan 15, 2018

ZSH_THEME="bureau" is fairly good.

NazmusShakib commented Jan 15, 2018

ZSH_THEME="bureau" is fairly good.

@hardianlawi

This comment has been minimized.

Show comment
Hide comment
@hardianlawi

hardianlawi Jan 21, 2018

image

When I run the command htop, some of the numbers are invisible because of the background color.

Here is how it looks if I used solarized light

image

Is there any workaround for the solarized dark? I found this altercation/solarized#220, but couldn't find anything related to ubuntu

hardianlawi commented Jan 21, 2018

image

When I run the command htop, some of the numbers are invisible because of the background color.

Here is how it looks if I used solarized light

image

Is there any workaround for the solarized dark? I found this altercation/solarized#220, but couldn't find anything related to ubuntu

@renshuki

This comment has been minimized.

Show comment
Hide comment
@renshuki

renshuki Jan 24, 2018

@hardianlawi
It's a color conflict between htop and solarized.
My advice is to change colors in htop.

  1. htop
  2. F2 Setup
  3. Colors β†’ Broken Gray
  4. F10 Done

2018-01-24_125202

Hope it will help ;)

Owner

renshuki commented Jan 24, 2018

@hardianlawi
It's a color conflict between htop and solarized.
My advice is to change colors in htop.

  1. htop
  2. F2 Setup
  3. Colors β†’ Broken Gray
  4. F10 Done

2018-01-24_125202

Hope it will help ;)

@renshuki

This comment has been minimized.

Show comment
Hide comment
@renshuki

renshuki Jan 24, 2018

Hey all,
If you have a question please drop a comment on my website instead. There is no notifications system implemented in Gist :/

Owner

renshuki commented Jan 24, 2018

Hey all,
If you have a question please drop a comment on my website instead. There is no notifications system implemented in Gist :/

@aramatev

This comment has been minimized.

Show comment
Hide comment
@aramatev

aramatev Feb 20, 2018

after you install zsh , youre missing a step

chsh -s $(which zsh)

aramatev commented Feb 20, 2018

after you install zsh , youre missing a step

chsh -s $(which zsh)

@aneesh-joshi

This comment has been minimized.

Show comment
Hide comment
@aneesh-joshi

aneesh-joshi Jul 3, 2018

@renshuki
Thanks for the help!

It would be a bit better if you add a command to make ~/.fonts
people can just copy paste then

Install powerline font

cd
wget https://github.com/powerline/powerline/raw/develop/font/PowerlineSymbols.otf
wget https://github.com/powerline/powerline/raw/develop/font/10-powerline-symbols.conf
mkdir ~/.fonts/
mv PowerlineSymbols.otf ~/.fonts/
mkdir -p .config/fontconfig/conf.d #if directory doesn't exists

aneesh-joshi commented Jul 3, 2018

@renshuki
Thanks for the help!

It would be a bit better if you add a command to make ~/.fonts
people can just copy paste then

Install powerline font

cd
wget https://github.com/powerline/powerline/raw/develop/font/PowerlineSymbols.otf
wget https://github.com/powerline/powerline/raw/develop/font/10-powerline-symbols.conf
mkdir ~/.fonts/
mv PowerlineSymbols.otf ~/.fonts/
mkdir -p .config/fontconfig/conf.d #if directory doesn't exists
@renshuki

This comment has been minimized.

Show comment
Hide comment
@renshuki

renshuki Aug 7, 2018

@aneesh-joshi thanks updated =)

Owner

renshuki commented Aug 7, 2018

@aneesh-joshi thanks updated =)

@EstelleHuang666

This comment has been minimized.

Show comment
Hide comment
@EstelleHuang666

EstelleHuang666 Aug 17, 2018

Thank you! It's indeed helpful!

EstelleHuang666 commented Aug 17, 2018

Thank you! It's indeed helpful!

@shariqmus

This comment has been minimized.

Show comment
Hide comment
@shariqmus

shariqmus Aug 28, 2018

Thank you!

shariqmus commented Aug 28, 2018

Thank you!

@mohantysabyasachi27

This comment has been minimized.

Show comment
Hide comment
@mohantysabyasachi27

mohantysabyasachi27 Aug 31, 2018

Hi It didn't work for me.
Am using Pop Os 18.04
Agnoster theme got applied but the powerline font is not reflecting.
screenshot from 2018-08-31 02-51-47
Can you help me to setup the agnoster theme?

mohantysabyasachi27 commented Aug 31, 2018

Hi It didn't work for me.
Am using Pop Os 18.04
Agnoster theme got applied but the powerline font is not reflecting.
screenshot from 2018-08-31 02-51-47
Can you help me to setup the agnoster theme?

@BoobsAreBait

This comment has been minimized.

Show comment
Hide comment
@BoobsAreBait

BoobsAreBait Sep 3, 2018

@mohantysabyasachi27: Change your terminal font to "Source Code Pro for Powerline Regular". Then it should work :)

BoobsAreBait commented Sep 3, 2018

@mohantysabyasachi27: Change your terminal font to "Source Code Pro for Powerline Regular". Then it should work :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment