2

I haven't been able to find the location to change the colour I highlighted in the posted image. It isn't in the installed Geany theme. I think it has to do with Ubuntu's theme but I haven't been able to locate it. It is so small I get inconsistent results when I use GIMP to extract the colour from it. I can't find the exact hex code of the colour to help my search.

colour I want to change

my Ubuntu theme is in

/usr/share/themes/Ambiance-Blackout-XFCE-LXDE-Manila

in that directory...

/usr/share/themes/Ambiance-Blackout-XFCE-LXDE-Manila

Does anyone know or have an idea the file in which I may find the colour?

4

If you want to change the color of the text in the "unsaved" tab which seems to be "startup.sh", you don't need to know the current text color.

Geany is still a gtk2 app. Your home folder should have a hidden file called .gtkrc-2.0. Open it and check if it has a line like this:

include "/home/your_login_name/.gtkrc-2.0.mine"

If it does, just close ~/.gtkrc-2.0. If it doesn't, add that line at the very end, making sure you use the correct full path. Save and exit.

If you don't have a file called ~/.gtkrc-2.0, open a terminal, make sure you're in your home folder and run

echo "include \"/home/your_login_name/.gtkrc-2.0.mine\"" > .gtkrc-2.0

But make sure you change your_login_name to whatever is appropriate.

Now, see if you also have a hidden file called ~/.gtkrc-2.0.mine. If you don't have the file, just create it using a plain text editor. If it already exists, back it up for safety and then add the following lines:

# CUSTOM STYLES

# *******GEANY*******
#Styling text (fg) in Geany's tabs
#Note that styling bg is done in the theme's gtkrc, not here, because we want that effect across other programs with tabs as well
# document status colors
style "geany-document-status-changed-style" {
    fg[NORMAL] = "magenta" #tab text when changes are made but not saved and tab is active
    fg[ACTIVE] = "#ff0746" #tab text when changes are made but not saved and tab is not in focus
}
widget "*.geany-document-status-changed" 
style "geany-document-status-changed-style"
# font style and size in Geany's tabs
style "geany" = "geany-tabs" {
    font_name = "Ubuntu Mono 14"
}
widget "GeanyMainWindow.GtkVBox.GtkVPaned.GtkHPaned.GtkNotebook.*" 
style "geany" 

I've also included code to allow you to specify a font just for Geany's UI. You can delete or comment out those lines!

Save the edited file (as plain text). Close all instances of Geany. Then, open Geany and check the effect of what you've done. Obviously, you'll want colors suited to your taste.

Here's what I see.

Geany tab text

All the best.

  • I don't have the hidden file .gtkrc-2.0 in home/myusername/ – deanresin Apr 7 '16 at 4:32
  • I'll add something to cover that situation in a little while. – DK Bose Apr 7 '16 at 4:48
  • 1
    Corrected a typo in echo "include /home/your_login_name/.gtkrc-2.0.mine" > .gtkrc-2.0. – DK Bose Apr 7 '16 at 8:21
  • I tried you solution and it didn't work. I now have both hidden files... one with the include and the other with the styles and it did nothing. I restarted unity and the computer and still nothing. Perhaps my Ubuntu theme supersedes. – deanresin Apr 7 '16 at 19:18
  • 1
    that did it! your solution worked but I think it should be.. echo "include \"/home/your_login_name/.gtkrc-2.0.mine\"" > .gtkrc-2.0. Can you edit your answer? – deanresin Apr 7 '16 at 19:24
0

Condensing @tk-bose's solution to the OPs minimum... (just for convencience)

$> cd ~
$> cat .gtkrc (-<tab>, <tab>... nope, file does not exist..)

Thus let's continue with:
$> echo "include \"/home/(YOUR USERNAME)/.gtkrc-2.0.mine\"" > .gtkrc-2.0      

$> cat .gtkrc-2.0       (just to verify)
include "/home/(YOUR USERNAME)/.gtkrc-2.0.mine"

put in the content show below:
$> pluma .gtkrc-2.0.mine    ( plume or nano or vi or any other editor)

I took milder reds (assuming this blaring red was, what the OP disturbed, like me). And almost identical ones for focus/non-focus (given that saved tabs are also always white, active or not):

# GEANNY custom styles - taken from askubuntu.com/q/754645

style "geany-document-status-changed-style" {
    fg[NORMAL] = "#ff4d4d" #unsaved tab active (aka in focus)
    fg[ACTIVE] = "#dd3d3d" #unsaved tab not active
}
widget "*.geany-document-status-changed" 
style "geany-document-status-changed-style"

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.