Code Monkey home page Code Monkey logo

gnome-terminal-colors-solarized's Introduction

Solarized Colorscheme for Gnome Terminal

Scripts for setting the Solarized color set with Gnome Terminal. To get nicely colored directory listings, you will also need to set up a dircolors solarised color theme.

For Mate Terminal, you can use mate-terminal-colors-solarized, maintained by @cledoux.

Colors

Only the foreground, background and highlight colors are different in the light and dark color sets, as one of the main ideas behind Ethan Schonoovers work is to use the same colors in the palette for both.

See the Solarized homepage for theory behind the colors, screenshots, details and colorscheme versions for Vim, Mutt, popular terminal emulators and other applications.

For the original works of Ethan Schoonover, visit the Solarized repository. The scripts for Gnome Terminal is maintained in Gnome Terminal Colors Solarized repository.

Installation and usage

To be able to uninstall, we highly recommend that you create a new Gnome Terminal profile, using the menus in Gnome Terminal.

You need the dconf command (if you run a recent Gnome version). With Ubuntu, this can be installed by running

$ sudo apt-get install dconf-cli

Then clone the repository and you can run the installation script:

$ git clone https://github.com/aruhier/gnome-terminal-colors-solarized.git
$ cd gnome-terminal-colors-solarized
$ ./install.sh

And just follow the instructions.

You can also run the set_dark.sh or set_light.sh script, to directly set the dark or light solarized theme to the actived gnome-terminal profile. The options --install-dircolors or --skip-dircolors can also be used to install or not the solarized dircolors in a non-interactive mode.

To run this script remotely or via cron (or from any shell where DBUS_SESSION_BUS_ADDRESS is not set), you need to start a dbus connection:

$ dbus-launch ./install.sh

Uninstall

Change to another profile in Gnome Terminal, then remove the Solarized profile by running:

Gnome 3.6 or lower

$ rm -r ~/.gconf/apps/gnome-terminal/profiles/Solarized/
$ gconftool-2 --recursive-unset /apps/gnome-terminal

Gnome 3.8 or higher

Be sure to have the dconf-cli package installed and do:

$ dconf reset -f /org/gnome/terminal/legacy/profiles:/PROFILE_ID"

Replace PROFILE_ID by your profile ID (you can get it in your profile configuration in gnome-terminal).

Themes

Each theme has is own folder in the colors dir. It contains the following files:

  • bd_color: bold color
  • bg_color: background color
  • fg_color: foreground color
  • palette: list of colors for all standard color codes.

No additional configuration is needed to add a theme, the installation script just list at launch the children folders in the colors dir.

Dircolors

The installation script will ask if a solarized dircolors is wanted. It will be downloaded and installed as ~/.dir_colors/dircolors. On CentOS, it can be an issue (see issue #62), as the default setup use ~/.dir_colors as dircolors. In that case, you should manually move ~/.dir_colors as ~/.dir_colors/dircolors before starting the installation script.

If the dircolors is not applied, please check that your shell actually source your dircolors:

if [ -f ~/.dir_colors/dircolors ]
    then eval `dircolors ~/.dir_colors/dircolors`
fi

This should not be necessary on major distributions (such as Ubuntu, Fedora, etc.) but could be on ArchLinux, Gentoo and others.

Contributors

FAQ

Conflicting background colors in VIM

Use the 16 colors terminal option to get VIM to look like GVIM with solarized colors.

set t_Co=16

gnome-terminal-colors-solarized's People

Contributors

absynce avatar adamv avatar aruhier avatar captbunzo avatar dangra avatar erikbrinkman avatar hustlion avatar jan-warchol avatar reinaldo-z avatar ritesh-pandey avatar sbakker avatar schwastek avatar sigurdga avatar sveiss avatar tarrasch avatar tobinjt avatar ustuehler avatar weynhamz avatar wieczorek1990 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

gnome-terminal-colors-solarized's Issues

Requesting permisson to use theme as default in Evolve OS

Hi there,

I couldn't find a contact button here, so I thought I'd just ask in an issue (Apologies :))

Would it be ok to use your solarized profile by default (as a patch to gnome-terminal) in Evolve OS?
If so, how would proper credit be given in this instance, given it would be the default theme and a
scheme option within gnome-terminal?

Many thanks,
Ikey

Guake comatibility (f12 terminal access)

I am using guake for f12 terminal access and you can easily install this theme just by executing

curl https://raw.githubusercontent.com/varemenos/guake-color-palettes/master/palettes/guake-solarized-light.sh | bash

Help Fedora 25

I chose to install dir colors by chance n install.sh and now every time I run new terminal it pops up:
/usr/bin/cat: /home/myhome/.dir_colors: Is a directory . how do I stop this?

Handle "uncomplete" profiles (for gnome-terminal >= 3.8)

Profiles with no visible-name key in dconf are shown as "invalid" by the script. Not a big deal, except it's not compatible with the -p | --profile.
The default profile is not created correctly by gnome (I mean differently than a profile you would create manually in gterminal), so the key default is not created in /org/gnome/terminal/legacy/profiles:. It's a problem with the scripts set_dark and set_light, which are looking for the default profile indicated by this dconf key.

Need to be fixed

cannot install on ubuntu 16.04

mark@redqueen:~/personal/gnome-terminal-colors-solarized$ sh install.sh
install.sh: 4: install.sh: declare: not found
install.sh: 5: install.sh: Syntax error: "(" unexpected

Unable to select a profile.

Hi!

I am having the same issue as this one: #63

Is it possible that it happens because I am using Ubuntu 18.04 and GNOME Terminal 3.28.2?

Thank you!

image

Uninstall

Hi there, just a quick question:

What about uninstalling? Do not get me wrong, but before I run stuff like install.sh' I always check whether anuninstall.sh' is at hand to clean up the installed stuff.

Thanks and Best regards,
Michael

Color scheme not applied on Gnome 3.6

The uninstall instructions for gnome 3.6 are not working

Gnome 3.6 or lower

$ rm -r ~/.gconf/apps/gnome-terminal/profiles/Solarized/
$ gconftool-2 --recursive-unset /apps/gnome-terminal

There is no "/apps/gnome-terminal" and the profile name is more like Profile0 with an xml inside

install.sh does not work with bash 3

Hi sigurda,

I tried to run the script on a RedHat Enterprise 5 system and it failed. Turns out the system still uses bash 3.2
Bash 3 does not know of associative arrays.

I prepared a patched install.sh in my fork.

Cheers,

Y

Incorrect colours in Ubuntu 13.10?

I'm having a problem in getting this working correctly under Ubuntu 13.10. If I use your install script I end up with colours that look like the screenshot below:

screenshot from 2013-11-21 09 02 12

To me, the background looks completely wrong when compared with the colours on the solarized website. To get this working I find I have to edit the colours to use the colours from the Hex column in the table at the bottom of this page: http://www.zovirl.com/2011/07/22/solarized_cheat_sheet/. Am I missing something obvious here or can you think of something in my settings that might cause this issue?

Palette entry 9 too close to background color

Which makes it invisible when used in output.

I have the same palette as in screenshot in #17 (Palette entry 9 is in the lower left corner).
For now I just changed it to something lighter so I can see the text output by some programs.

Is this a bug?

P.S. I experienced this issue with Grunt's init task (unable to read question text).

CentOS7

Tried this one in CentOS7 and it worked like a charm. Just one thing though, it creates a /.dir_colors directory containing the dircolors file. This seems not to be the way it should be done on CentOS 7 though as the terminal would display a warning, "/.dir_colors is a directory". Tried moving the dircolors file to ~/.dir_colors (with the previous ~/.dir_colors directory deleted), and is now enjoying the solarized theme.

Thank You,
Marz

Install.sh do not work on localized version.

When it try to get the Gnome version it does it by field number, but it can change in localized versions.

gnomeVersion="$(gnome-terminal --version | cut -d" " -f3)"

# newGnome=1 if the gnome-terminal version >= 3.8
if [ "$(echo "$gnomeVersion" | cut -d"." -f1)$(echo "$gnomeVersion" | \
      cut -d"." -f2)" -ge 38 ]

In Spanish is not the third word.

>  gnome-terminal --version
Terminal de GNOME 3.8.3

Can it made more flexible with something like a regex? I'm not an expert with shell.

ubuntu 16.04 : ERROR: Confirmation failed -- ABORTING!

$ gnome-terminal --version
GNOME Terminal 3.18.3

$ ./install.sh 

This script will ask you which color scheme you want, and which Gnome Terminal profile to overwrite.

Please note that there is no uninstall option yet. If you do not wish to overwrite any of your profiles, you should create a new profile before you run this script. However, you can reset your colors to the Gnome default, by running:

    Gnome >= 3.8 dconf reset -f /org/gnome/terminal/legacy/profiles:/
    Gnome < 3.8 gconftool-2 --recursive-unset /apps/gnome-terminal

By default, it runs in the interactive mode, but it also can be run non-interactively, just feed it with the necessary options, see 'install.sh --help' for details.

Please select a color scheme:
1) dark
2) dark_alternative
3) light
#? 3

Please select a Gnome Terminal profile:
1) :b1dcc9dd-5262-4d8d-a863-c897e6d979b9 (No name)
#? 1

You have selected:

  Scheme:  light
  Profile: :b1dcc9dd-5262-4d8d-a863-c897e6d979b9 (No name) (:b1dcc9dd-5262-4d8d-a863-c897e6d979b9)

Are you sure you want to overwrite the selected profile?
(YES to continue) 
ERROR: Confirmation failed -- ABORTING!

Specify in the docs how to restore the default gnome-terminal profile

I've just installed solorized colors in gnome-terminal. I haven't read the
whole README file, so I didn't know that there is no unistall option. As you
can imagine I only had one profile, so I could not delete the solorized
profile and return back to the saved one.

I've spent several minutus finding how to restore the default colors in
gnome-terminal. Here I've found the solution:

gconftool-2 --recursive-unset /apps/gnome-terminal

After this experience I think that 2 thins should be done in this project:

  1. Write in the docs the command that can restore the terminal
  2. Write in the output of install.sh script the warning that there is no
    uninstall and the user should create new profile.

F.A.Q additional info

Hi.
I just updated my desktop in linux mint, and then my solarized color scheme disappeared, I tried to run the install.sh again, but without any luck.
It turns out that gnome-terminal has been updated to above 3.8 and I saw that the install.sh script should be able to handle it.

I dug a little deeper, and realized that the script utilizes dconf, which requires the dconf-cli package to be installed.

So I am just wondering if you could add that information to the F.A.Q section in your README.md file?

Thanks.

vim strange colors

If I use the dark color scheme and the vim-fix set t_Co=16 it doesn't look like suggested.
Screenshot from 2013-02-05 09:42:20

This would be the desired result:
687474703a2f2f692e696d6775722e636f6d2f39304767372e706e67

I use Ubuntu 12.10 with gnome-terminal. What's wrong?

Why color codes so long?

Hello, I've compared colors in built-in palette and in your palette, and your codes have 12 symbols, why not 6 as usual?

Install.sh not working with gnome 2.x

With a gnome 2.16.0, install.sh isn't working due to a bad version recognition:

./install.sh
++ dirname ./install.sh

  • dir=.
    ++++ gnome-terminal --version
    +++ expr 'Gnome gnome-terminal 2.16.0' : '.*(.+[.].+[.].+)$'
    ++ echo 2.16.0
  • gnomeVersion=2.16.0
    ++ echo 2.16.0
    ++ cut -d. -f1
    ++ echo 2.16.0
    ++ cut -d. -f2
  • '[' 216 -ge 38 ']'
  • newGnome=1
  • echo Powabouga
    Powabouga
  • dconfdir=/org/gnome/terminal/legacy/profiles:
  • declare -a schemes
  • schemes=(dark light)
  • declare -a profiles

As you can notice, the version is converted to an integer.
Here, 2.16.0 is converted to 216. The test with gnome 3.8 fail as the condition is 216 < 38.

Regards

Is it just me, or are the colors reversed?

When I run the shell script, it always ends up that all the greys are in the bottom row (when viewing the colors in the profile preferences), and all the bright colors are in the top row. However, when I use solarized as a preloaded colorscheme in vim or Konsole, the colors appear to be the same as what you get if all the brights are in the bottom row, and all the bright colors are in the top. Is the script incorrect, or are all the other implementations that I have seen of this colorscheme incorrect?

Thanks! I LOVE this colorscheme, and have been using it for years!

Include a compatible .dircolors

I think most users have a check for .dircolors in their .bashrc or similar to set ls colors.

In https://github.com/sigurdga/ls-colors-solarized there is a dircolors file that is compatible with solarized and could be used.

We should then first check if the .dircolors file the user already has is different from the one we are installing, and if different taking a backup using either a suffix of .before.solarized or .backup+date or similar and then copying or symlinking our new file.

Profile not found on gnome-terminal 3.22.1

I am not sure if this is related to #47. I get the following output when installing on a fresh install of Arch w/ Gnome 3/gnome-terminal 3.22.1. Any ideas? Thanks!

code/Anthony25/gnome-terminal-colors-solarized ‹master› » ./install.sh

This script will ask you which color scheme you want, and which Gnome Terminal profile to overwrite.

Please note that there is no uninstall option yet. If you do not wish to overwrite any of your profiles, you should create a new profile before you run this script. However, you can reset your colors to the Gnome default, by running:

    Gnome >= 3.8 dconf reset -f /org/gnome/terminal/legacy/profiles:/
    Gnome < 3.8 gconftool-2 --recursive-unset /apps/gnome-terminal

By default, it runs in the interactive mode, but it also can be run non-interactively, just feed it with the necessary options, see 'install.sh --help' for details.

Please select a color scheme:
1) dark
2) dark_alternative
3) light
#? 1

Please select a Gnome Terminal profile:

You have selected:

  Scheme:  dark
Failed to get value for `/apps/gnome-terminal/profiles//visible_name': Bad key or directory name: "/apps/gnome-terminal/profiles//visible_name": Can't have two slashes '/' in a row
  Profile: (No name) ()

Are you sure you want to overwrite the selected profile?
(YES to continue) 

How to get this script to run from cron? - with solution

I was trying to get this to run via cron so the colors would change automatically. dconf doesn't work unless the environment contains $DBUS_SESSION_BUS_ADDRESS. cron is a very minimal environment and does not include this variable. I found this stack overflow answer which helped get it working on Ubuntu 16.04. I added the following three lines to a streamlined script and it's currently working as expected.

export DISPLAY=:0
PID=$(pgrep gnome-terminal)
export DBUS_SESSION_BUS_ADDRESS=$(grep -z DBUS_SESSION_BUS_ADDRESS /proc/$PID/environ|cut -d= -f2-)

Adding these three lines to the top of install.sh will let the set_light and set_dark scripts be called from cron. I tested only on Ubuntu 16.04

Colors wrong in Ubuntu

I have noticed that colors are wrong when logging in under Ubuntu. Specifically, directories and executables are just a varying shade of grey.

Oddly, enough, when I ssh from that Ubuntu Gnome Terminal session into a Redhat server, the ls colors in the Redhat ssh session are great. If I logout from SSH (back to the terminal connection only on Ubuntu desktop) then the ls colors are bad again.

If I ssh into an Ubuntu server, I get the same problem. So this seems Ubuntu related.

A small incompatibility with solarized.vim

With the default colour setup from this script and solarized.vim, terminal vim looks pretty bad. solarized.vim assumes that white (entry 8) is Base3, but in g-t-c-s it's in entry 16 (for light mode). Swapping the two fixes the problem. Same thing with dark mode, for entries 1 and 9.

Install.sh not running

I'm running the install.sh, but it returns:

install.sh: 4: install.sh: declare: not found
install.sh: 5: install.sh: Syntax error: "(" unexpected

Any ideas?

Dark almost impossible to see

Maybe something went wrong with my install, but I'm not sure how this is particularly practical color scheme, at least for someone working at the command line:
Dark Solarized

That's using the dark theme on Ubuntu 12.10 gnome-terminal under Gnome Shell. Almost everything is so close to the background colour as to be difficult to distinguish. It's almost entirely unusable with a semi-transparent background. This is what the preferences dialogue became, if this helps
Preferences

Here's an specific example directory. Three objects in it. One normal file, one executable, one directory, all of which ought to be easy to distinguish:
Example

Hope this is of any value in any way.

Is vim working for others running Debian Stretch, gnome-terminal 3.20.2?

Thanks for this great work! I have been using it happily for years with Debian Wheezy and Jessie.

Unfortunately I am struggling to get the colors right on Stretch after a couple hours of debugging.

➜  ~ echo $TERM        
xterm-256color
➜  ~ tput colors       
256
➜  ~ tail -n 1 ~/.vimrc
set t_Co=16
➜  ~ vim --version
➜  ~ vim "+runtime syntax/colortest.vim"

vim version returns http://pastie.org/10870984

colortest screenshot:

colortest

Interestingly, if I remove set t_Co=16 from my .vimrc and execute TERM=xterm vim "+runtime syntax/colortest.vim", my black_on_* colors all show up correctly, but several of my *_on_white colors are wrong:

colors2

Can't get the $terminfo[bold] colors in zsh

Hey, I've been using your solarized version of gnome-terminal for a few months, and finding it great. Yet one thing seems to go wrong, and I think I'm now grown enough to be able to explain it.

Running zsh shell, I get the following strange behavior:

capture du 2014-12-15 21 13 12

That is, the colors don't seem to work in bold version.
I've had a rapid glance at the install.sh and changed those two lines, replacing 'false' by 'true':

capture du 2014-12-15 21 25 29
capture du 2014-12-15 21 25 47

.. then I reinstalled the whole stuff, but it didn't change.. everything

capture du 2014-12-15 21 21 27
(notice the $ prompt has turned white, which I haven't understood yet)

Do you know then how to get bold solarized colors?

Gnome 3.8

Hello,
With Gnome 3.8.0 your script doesn't work anymore because the gnome terminal profile location has been moved from gconf to dconf.

It is still possible to set manually the colors in gnome terminal, but is it possible to fix it please ?

Many Thanks !

All colors are washed out

I've made an install of Solarized on Debian Jessie (Gnome-Terminal 3.10.1) and I get colors that are very washed out.

Solarized Dark - ls of dev
20140117-solarized_dev

Solarized Dark - Gnome-terminal Colors
20140117-solarized_colors

Solarized Light - ls of dev
20140117-solarized_light_dev

Solarized Light - Gnome-terminal Colors
20140117-solarized_light_colors

Dark username

After install I got dark username in shell, but on PC it's blue and looks nice. But PS1 equal.

Some text are invisible (same as background color)

So because the 9th color in the palette is Base03 which is the same as the background, so now in a lot of my log outputs or test results and so on, that color is used..

The issue is that I can change that color in the palette but then my vim background color is that same color because of the fact that when you do background=dark in VIM, it seems to use that 9th color in the palette..

Any ideas on how I can handle both cases?

Items barely visible in htop using Solarized Dark

Using the htop software and Solarized Dark for gnome terminal installed from this repo, some items are barely visible (1 min load average, and totals in the cpu/mem bar graphs):
htop with Solarized color theme

I'm not sure if this is a htop or Solarized bug, si I'm opening an issue on both projects.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.