Change color scheme in Geany

After trying Sublime for a while, and quite liking it, I found myself in the middle of a deep customization of the editor… to make it work like Geany!

For quick editing of local bash/python scripts or configuration files there’s no editor that meets my taste better (I said local cause when dealing with remote files my all-time favorite is vim).

The one thing that I like more in Sublime than in Geany is its look: it’s very elegant, but in the end what I really missed in Geany was a dark editor theme.

I discovered this project on GitHub with several available themes, very easy to install (as in execute-install-script-with-no-options) but.. not that easy to choose from Geany’s interface!

[Update – Mar13] – unjordi posted a nice command line one-liner to get and install the geany-dark color schemes, here it is:

wget -qO- http://geany-dark-scheme.googlecode.com/files/geany_dark_filedefs_20100304_190847.tar.bz2 | tar jxv -C ~/.config/geany/filedefs/

After you’ve downloaded the color schemes and before editing the configuration file as described here below try to restart Geany and check if there’s an entry under View/Editor>Color Schemes>; if it’s there you can choose among all installed color schemes from a nice list! 🙂

If you’re out of luck (no list for you) you must edit Geany’s configuration file ~/.config/geany/geany.conf and find the color_scheme line. You must specify the whole file name of the color scheme you wish to use, without its path (it must be in the ~/.config/geany/colorschemes folder anyway).

So, to set your theme to tango-dark you shall have this line in your geany.conf file:

color_scheme=tango-dark.conf

Restart Geany and there you have your nice dark theme 🙂

[Update – Nov13] – a reader had troubles with the configuration file (always reverting to its original state, or not being read correctly by Geany), scroll down to November 5 2013 in the comments if you have the same issues!

45 thoughts on “Change color scheme in Geany

    • the ~ stands for your user’s home, like /home/username. The .config folder is hidden by default, so if you’re using ubuntu for instance you can view it by pressing ctrl+h, or from a shell just cd into it (to view it in ls you must add the -a option)

      Like

      • If you would really like the portable version of Geany you can download it on PortableApps.com: http://portableapps.com/apps/development/geany_portable. Extract the package to your flash drive. The download the Geany themes from http://wiki.geany.org/themes/start (I guess this link points to the same site you gave on your blog post). Extract the themes. Copy all the files in the filedefs folder in Geany themes folder to F:\\\ Your Geany installation/App/DefaultData/filedefs directory. Next, copy all the files in Geanny themes/colorschemes to F:\\\Your Geany Installation/Data/settings/colorschemes folder. Then restart Geany. There you have it; your portable Geany IDE with all these themes to choose from. ;-). No need to search for the config folder plus you got your IDE everywhere you go.

        Like

  1. If this is not working for some people, try closing all projects before restarting Geany. I had a project open, and even after editing the config file with elevated privileges, the file was reverting when I restarted Geany. I found out that my old config files were being restored when Geany opened my project upon restarting. Closing the project and then restarting Geany solved this issue.

    Like

  2. I do trust all the ideas you’ve presented for your post. They’re really convincing and can
    certainly work. Still, the posts are very short for newbies.
    Could you please prolong them a little from next time?
    Thank you for the post.

    Like

    • Ok, I thought that the subject wasn’t really appealing to “newbies”, but I’m glad to have been proven wrong!
      I will provide some more details in the future, thanks 🙂

      Like

  3. After installing this color scheme i can’t change back to the default scheme. I get this error: “The current filetype overrides the default style”.
    Is there any solution to this problem? If not, then can you tell me how to uninstall this color scheme?

    Like

    • have you tried opening .conf/geany/geany.conf with a different editor (I used vim) and simply comment the color-scheme line?

      Like

    • At the expense of bumping an old thread.

      Yes I have found a solution to this. I removed all the local Geany configuration from

      cd ~/.config/geany
      rm -rf *
      cd ..
      rmdir geany

      and then ran geany again.

      I was able to change the color scheme at leisure.

      Like

  4. I know this is old, but this page ranks high in google, and I had the same problem. I had the theme pack from github – codebrainz, but didn’t know how to make geany use it. I now have dark themes and presumably others working thank you.

    I solved two problems others may have:

    1. The configuration file keeps reverting; (color scheme= #[blank] even after saving)
    -Get in there as root, there are several ways. I ran a version of
    gksu geany geany.conf
    from the terminal. Saved fine.

    2. The configuration file saved, but nothing happened anyway.
    -As is, the tarball (zip) extraction slightly buries the themes in extra folders.
    Mine were in something like
    ~/.config/geany/colorschemes/geany-master-themes/colorschemes
    instead of just
    ~/.config/geany/colorschemes
    as mentioned in the post.
    Moving all the files up a couple directories solved this right away.

    (note the encouraged github entry is for geany 1.22 (still current at time of this comment))
    $ geany –version

    Like

  5. Hi everyone, after running the one magic line, I could not change the colour scheme anymore. I tried the above proposed solutions, but did not work for me (Lubuntu13.10). I simply save the folder ~/.config/geany/colorschemes somewhere else, uninstall gean (sudo apt-get remove geany), remove the foldor ~/.config/geany

    install again (sudo apt-get install geany), copy back the “colorschemes” folder and everything was fine.

    Maybe not a stylish solution, but it did the job for me.

    Bye.

    Like

  6. hm, I just copied the *.conf file in the ~/.config/geany/colorschemes and restarted geany and I was able to select the theme from the View->Change color scheme, no problems what so ever

    (I’m using Geany 1.24.1)

    Like

  7. Yes… I’m with all problem like you all… and like @milan say, just copy *.conf and folder to colorschemes then change color scheme from geany… thats all and solve (for me)

    Like

    • In installed the colorscheme.conf files in usr/share/geany/colorschemes st first (but made a backup of the whole geany folder first). When I realized that wasn’t optimal, I installed all of the color .conf files to ~/.config/geany/colorschemes.

      At first, everything worked great. I could setect the colorscheme I wanted and it would instantly change. I worked on some python scripts for awhile, then closed geany.

      Before I shut down the laptop, I went back to usr/share/geany and replaced the modified geany folder (which had all of the colorschemes there as I had first copied them) with the backup I made.

      But then today, I opened up geany and saw some strange colorscheme, so I went to view–>editor –>> colors and before the list came up, I get the message first mentioned in this article: “WARNING: filetype overrides colorscheme” (or something like that). But then I was given the full list of all the colorschemes I had installed in ~/.config/geany/colorschemes as described above…But now, none of them worked…!

      Why is this so erratic? How long has geany been in development? I realize it’s open source and is not going to have all of the niceties that sublime-text has, but if anything is true, it’s that a lot of people put a high value on having different colorful configurations for their editor–especially those who prefer dark over the conventional black text on white of many IDEs.

      At least with python, I don’t see this configuration often enough. I used pycharm last year, and it was nice (a little overkill), but I was irritated I didn’t have more flexibility with color configurations…so I moved on to sublime text 2. Since I would like to stay open source and not buy sublime-text 3, I chose to seek out a different IDE/Editor. I thought Geany would be it, until I was dumbfounded that there were no native color configuration choices for the editor. I was relieved to find the zip at github…. But why…why….why don’t people/developers realize, that while they may think the colors of the editor and related syntax is a trivial matter, I will GLADLY jump to an entirely new editor and relearn everything IF IT NATIVELY HAS numerous editor color configurations to choose from. That’s how I “see” my code… I may be derided for worrying about “pretty colors”, but if source wants my promotion, and not force me to purchase sublime-text…get the editorvcolor configs down as a priority!

      Since I restored the folder at /usr/share/geany (a folder which contains no colorschemes except for “default” and “alt”

      Like

      • hey Paul,
        yeah, I was rather disappointed myself by the lack of a proper color theme selector. It looks like most editors/IDEs follow the Vim approach of having the user fiddle with a bunch of configuration files, and I guess the rationale behind it goes along the lines of “hey, this tool is gonna be used by developers, they can figure this out themselves!”…

        I tend to stick with the same dark color theme across all editors (vim, geany, sublime, pycharm, webstorm, eclipse), so I consider setting the color theme part of the initial setup when configuring a new computer.

        Something like putting your family pictures on your new desk at work, I guess 😀

        Like

  8. I really like the Dark theme in Geany, but how do you change the cursor (caret) from a block to a line? I have tried to modify the conf file, apparently changing the third option will change the cursor. But it’s always a block!

    Like

      • on mine, it’s a 1px-wide red line. As I wrote on this post, I’m using tango-dark, and that scheme has this line (in ~/.config/geany/colorthemes/tango-dark.conf):

        caret=0xff0000;0xff0000;false
        

        I didn’t need to edit the file myself, that’s how it was.

        Like

  9. Hi
    i have installled a dark theme on Geany successfully. but the “Blue Color Font” in the “compiler” tab below in message window is quite hard to see, is there any procedure to change that blue to white? so that it would be easier to view?

    Like

    • hey Ramkumar,
      to change colors you should look inside your ~/.config/geany/colorthemes/ folder, find the file associated with the theme you’re using, and look for the appropriate line. I’m no expert, but names are relatively meaningful in there, and with a bit of trial and error it should be doable. Good luck!

      Like

  10. Hi mb
    i gues u mean “colorschemes” folder instead of “colorthemes”.
    i have checked that but it only affects the editor window. i need to change the font color in the “Message Window”
    which lies below the editor window with tabs named, status, compiler etc..
    i need to change the “blue color font” in “compiler” tab to white. i have checked the possible ways upto my knowledge.
    could you please help me?, i wish i could post a screen shot of what i mean.

    Like

  11. To others for future reference, (to ramkumar’s question): ~/config/geany/geany.css

    /* compiler message colors */
    #geany-compiler-error {
    color: #FF00A5;
    }
    #geany-compiler-context {
    color: #FF7E22;
    }
    #geany-compiler-message {
    color: #D3D3FF;
    }

    #### just highlight a colour and use geany’s own colour chooser in the toolbar ,)
    save, restart. The colours above are changed from default but should work as a base for those who find the red/blue hard to read on the grey (ty colourblind options :D)…

    Like

Leave a comment