Change Background Color In Geany
- Adam Douglas
With the dark style or mode in various software and web applications becoming a norm there are still some applications that do not provide clear direction on how to accomplish this. Geany a powerful, lightweight, and open source IDE (integrated development environment)/editor seems to not make it clear to everyone how one can achieve a dark style or mode. However, there is a way and it is not as hard as one may think.
By default, as of Geany v1.38 the background edit area of the application has a white background color even if the system is set to use dark style mode. Unfortunately there is no known setting within the Geany’s graphical interface that can manually set the editor background color. There is however one option by inverting the syntax highlighting colors which by default changes to white text on black background. This can be done as follows.
- Open the Geany application.
- Go to the menu “Edit” > “Preferences” > “Editor” > Display.
- Click on “Invert syntax highlighting colors”.
- Click on the “OK” button to apply changes.
This solution may not be for everyone and is quite limiting if you desire more control over the colors used.
Geany themes, called color schemes provide almost complete control over the colors used within the application interface. The color scheme can be easily modified as desired by simply editing the text configuration file. The background color is set within a color scheme by the variable default within “[named_styles]” section. The value is broken up into 4 parts (e.g. default=#baae9e;#28211c;false;false), foreground color, background color, use foreground color and use background color. The 3rd and 4th arguments determine if colors are used when overridden, therefore if not overridden the colors will be used as default.
Refer to the Geany documentation for further details.
Color scheme support requires Geany v1.22 or greater.
Install Color Schemes
Arch Linux Package
- Install an AUR helper.
Install package Replace “pikaur” with the installed AUR helper command.
$ pikaur -Syu geany-themes [sudo] password for username:
- Download desired theme (color scheme).
Place the color scheme file(s) within the configuration file paths.
By default, one of the following directories is used.
- ~/.config/geany/colorschemes (Linux, user configuration)
- /usr/share/geany/colorschemes/ (Linux, system configuration)
- C:\Documents and Settings\UserName\Application Data\geany (Windows XP, user configuration)
- C:\users\UserName\Roaming\geany (Windows 7 or greater, user configuration)
The ~ (tilde) represents the $HOME (/home/username) of the current user.
Change Color Scheme
Once color scheme(s) are installed, it is quite simple to switch to another color scheme following these instructions.
- Open the Geany application.
- Click on the menu “View” > “Change color scheme…”.
- Click on desired theme to select.
- Click on the “Close” button.
Disable "Invert syntax highlighting colors" to ensure color scheme works as intended.
This is post 35 of 100, and is round 2 of the 100 Days To Offload challenge.
- Geany logo, Wikimedia Commons
- Geany Themes project, Geany’s Git
- Geany Themes project, GitHub
- Geany Themes
- Geany, Wikipedia
- Integrated development environment, Wikipedia
- Change topic
- Change 100DaysToOffload message