Skip to content

Instantly share code, notes, and snippets.

@renshuki
Last active April 23, 2024 13:04
Show Gist options
  • Save renshuki/3cf3de6e7f00fa7e744a to your computer and use it in GitHub Desktop.
Save renshuki/3cf3de6e7f00fa7e744a to your computer and use it in GitHub Desktop.
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)

Easy way

If your are using Ubuntu >= 16.04 you can simply run: sudo apt-get install fonts-powerline

Alternative way

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 https://github.com/aruhier/gnome-terminal-colors-solarized ~/.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 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!

@Djourdain
Copy link

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

@v1-wizard
Copy link

Thanks. Very usefull.

@chrisarts
Copy link

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

@NazmusShakib
Copy link

ZSH_THEME="bureau" is fairly good.

@hardianlawi
Copy link

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
Copy link
Author

@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
Copy link
Author

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
Copy link

after you install zsh , youre missing a step

chsh -s $(which zsh)

@aneesh-joshi
Copy link

@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
Copy link
Author

renshuki commented Aug 7, 2018

@aneesh-joshi thanks updated =)

@murphyyhuang
Copy link

Thank you! It's indeed helpful!

@shariqmus
Copy link

Thank you!

@mohantysabyasachi27
Copy link

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?

@biiic
Copy link

biiic commented Sep 3, 2018

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

@feinstein
Copy link

I am running Ubuntu inside Windows 10 and this doesn't work for me.

@vanessasoutoc
Copy link

Great. Thank you so much. I use agnoster in Mac OS with iterm and now use in Ubuntu.

@soubhikchatterjee
Copy link

For vscode users, add the following to the settings.json

"terminal.integrated.fontFamily": "Source Code Pro for Powerline",

@semmersultan
Copy link

This repo worked for me
git clone https://github.com/aruhier/gnome-terminal-colors-solarized.git ~/.solarized
instead of
git clone git://github.com/sigurdga/gnome-terminal-colors-solarized.git ~/.solarized

@david-romero
Copy link

Thanks!!!

@NonStatic2014
Copy link

For powerline fonts installation, I think you could simply run sudo apt install fonts-powerline. It works on Ubuntu 16.04.

@ashish328
Copy link

great one... thank you

@renshuki
Copy link
Author

renshuki commented Jan 4, 2020

For powerline fonts installation, I think you could simply run sudo apt install fonts-powerline. It works on Ubuntu 16.04.

I tested it and it works indeed. I'll update the gist with it, thanks for this.

@dalmarcogd
Copy link

great

@Rhithick02
Copy link

I am not getting proper agnoster theme.
image

@hazarguney
Copy link

Thank you!

@gabrielgt99
Copy link

Thanks :D

@flopezre
Copy link

Hello, Can i use with Titix?

@jonasssilveira
Copy link

Thank you :)

@AbstractFruitFactory
Copy link

it seems like the solarized repo has changed - use this one now:

https://github.com/aruhier/gnome-terminal-colors-solarized

@renshuki
Copy link
Author

Good point @AbstractFruitFactory 👍
I updated the gist with the new URL, thx 😃

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