# strange behavior with nonexistant or partially populated ~/.config/git/gitk

2 messages from 2016-02-06 to 2016-02-06. Participants: Britton Kerin.
Thread: https://gitlist.dev/t/41352

## Britton Kerin, 2016-02-06 03:16

Subject: strange behavior with nonexistant or partially populated ~/.config/git/gitk
Message-ID: <CAC4O8c8qEjcLASu7JwNhyLX+h3uFSUiHAV2yqJhgE+N5-gC0Yw@mail.gmail.com>
URL: https://gitlist.dev/e/CAC4O8c8qEjcLASu7JwNhyLX%2Bh3uFSUiHAV2yqJhgE%2BN5-gC0Yw%40mail.gmail.com

```
If ~/.config/git/gitk doesn't exist, I get small fonts (fine) and ugly
hard-to-read dark green branch labels.

The fix for the dark green problem is here:

     http://stackoverflow.com/questions/26025810/gtk-apps-show-green-too-dark

But after doing:

      echo 'set headbgcolor lime' >~/.config/git/gitk ; gitk

I end up with a much more extensive ~/.config/git/gitk that changes
fonts, window geometry, etc. to be different than the defaults that
you get if you don't have ~/.config/git/gik.  This is weird.

It should work one of these ways:

     1.  Any setting in ~/.config/git/gitk override the defaults, but
the file is not required, and running gitk doesn't create it or change
with it's contents.

     2.  ~/.config/git/gitk is always created if it doesn't exist or
isn't fully populated, and it gets the default values for anything not
defined.

The full ~/.config/git/gitk that gets created for me is below.  I
don't know where the setting that get used if it doesn't exist come
from.

set mainfont {sans 9}
set textfont {monospace 9}
set uifont {sans 9 bold}
set tabstop 8
set findmergefiles 0
set maxgraphpct 50
set maxwidth 16
set cmitmode patch
set wrapcomment none
set autoselect 1
set autosellen 40
set showneartags 1
set maxrefs 20
set visiblerefs {"master"}
set hideremotes 0
set showlocalchanges 1
set datetimeformat {%Y-%m-%d %H:%M:%S}
set limitdiffs 1
set uicolor grey85
set want_ttk 1
set bgcolor white
set fgcolor black
set uifgcolor black
set uifgdisabledcolor #999
set colors {lime red blue magenta darkgrey brown orange}
set diffcolors {red "#00a000" blue}
set mergecolors {red blue lime purple brown "#009090" magenta
"#808000" "#009000" "#ff0080" cyan "#b07070" "#70b0f0" "#70f0b0"
"#f0b070" "#ff70b0"}
set markbgcolor #e0e0ff
set diffcontext 3
set selectbgcolor gray85
set foundbgcolor yellow
set currentsearchhitbgcolor orange
set extdifftool meld
set perfile_attrs 0
set headbgcolor lime
set headfgcolor black
set headoutlinecolor black
set remotebgcolor #ffddaa
set tagbgcolor yellow
set tagfgcolor black
set tagoutlinecolor black
set reflinecolor black
set filesepbgcolor #aaaaaa
set filesepfgcolor black
set linehoverbgcolor #ffff80
set linehoverfgcolor black
set linehoveroutlinecolor black
set mainheadcirclecolor yellow
set workingfilescirclecolor red
set indexcirclecolor lime
set circlecolors {white blue gray blue blue}
set linkfgcolor blue
set circleoutlinecolor black
set geometry(main) 1837x989+5+53
set geometry(state) normal
set geometry(topwidth) 1837
set geometry(topheight) 300
set geometry(pwsash0) "680 1"
set geometry(pwsash1) "1020 1"
set geometry(botwidth) 850
set geometry(botheight) 684
set permviews {}

```

## Britton Kerin, 2016-02-06 03:27

Subject: Re: strange behavior with nonexistant or partially populated ~/.config/git/gitk
Message-ID: <CAC4O8c-3-x+symzH1GVzFHNj7UtcGF9mBxRgpcVO1zKOeR01Mw@mail.gmail.com>
URL: https://gitlist.dev/e/CAC4O8c-3-x%2BsymzH1GVzFHNj7UtcGF9mBxRgpcVO1zKOeR01Mw%40mail.gmail.com
In-Reply-To: <CAC4O8c8qEjcLASu7JwNhyLX+h3uFSUiHAV2yqJhgE+N5-gC0Yw@mail.gmail.com>

```
My bad, problem was I missed existence of .gitk (used only if
~/.config/git/gitk doesn't exist).

On Fri, Feb 5, 2016 at 6:16 PM, Britton Kerin <britton.kerin@gmail.com> wrote:
> If ~/.config/git/gitk doesn't exist, I get small fonts (fine) and ugly
> hard-to-read dark green branch labels.
>
> The fix for the dark green problem is here:
>
>      http://stackoverflow.com/questions/26025810/gtk-apps-show-green-too-dark
>
> But after doing:
>
>       echo 'set headbgcolor lime' >~/.config/git/gitk ; gitk
>
> I end up with a much more extensive ~/.config/git/gitk that changes
> fonts, window geometry, etc. to be different than the defaults that
> you get if you don't have ~/.config/git/gik.  This is weird.
>
> It should work one of these ways:
>
>      1.  Any setting in ~/.config/git/gitk override the defaults, but
> the file is not required, and running gitk doesn't create it or change
> with it's contents.
>
>      2.  ~/.config/git/gitk is always created if it doesn't exist or
> isn't fully populated, and it gets the default values for anything not
> defined.
>
> The full ~/.config/git/gitk that gets created for me is below.  I
> don't know where the setting that get used if it doesn't exist come
> from.
>
> set mainfont {sans 9}
> set textfont {monospace 9}
> set uifont {sans 9 bold}
> set tabstop 8
> set findmergefiles 0
> set maxgraphpct 50
> set maxwidth 16
> set cmitmode patch
> set wrapcomment none
> set autoselect 1
> set autosellen 40
> set showneartags 1
> set maxrefs 20
> set visiblerefs {"master"}
> set hideremotes 0
> set showlocalchanges 1
> set datetimeformat {%Y-%m-%d %H:%M:%S}
> set limitdiffs 1
> set uicolor grey85
> set want_ttk 1
> set bgcolor white
> set fgcolor black
> set uifgcolor black
> set uifgdisabledcolor #999
> set colors {lime red blue magenta darkgrey brown orange}
> set diffcolors {red "#00a000" blue}
> set mergecolors {red blue lime purple brown "#009090" magenta
> "#808000" "#009000" "#ff0080" cyan "#b07070" "#70b0f0" "#70f0b0"
> "#f0b070" "#ff70b0"}
> set markbgcolor #e0e0ff
> set diffcontext 3
> set selectbgcolor gray85
> set foundbgcolor yellow
> set currentsearchhitbgcolor orange
> set extdifftool meld
> set perfile_attrs 0
> set headbgcolor lime
> set headfgcolor black
> set headoutlinecolor black
> set remotebgcolor #ffddaa
> set tagbgcolor yellow
> set tagfgcolor black
> set tagoutlinecolor black
> set reflinecolor black
> set filesepbgcolor #aaaaaa
> set filesepfgcolor black
> set linehoverbgcolor #ffff80
> set linehoverfgcolor black
> set linehoveroutlinecolor black
> set mainheadcirclecolor yellow
> set workingfilescirclecolor red
> set indexcirclecolor lime
> set circlecolors {white blue gray blue blue}
> set linkfgcolor blue
> set circleoutlinecolor black
> set geometry(main) 1837x989+5+53
> set geometry(state) normal
> set geometry(topwidth) 1837
> set geometry(topheight) 300
> set geometry(pwsash0) "680 1"
> set geometry(pwsash1) "1020 1"
> set geometry(botwidth) 850
> set geometry(botheight) 684
> set permviews {}

```
