-
Notifications
You must be signed in to change notification settings - Fork 89
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
"Official" Dark Mode for Git GUI #64
Comments
Original issue here git-for-windows/git#3433 . |
Discussion happening in Git Mailing List here: https://marc.info/?l=git&m=163266898221849&w=2 . |
Hey @Sashank999 , I tried replying to you in the git mailing list but I think gmail is messing it up so I'll write here instead. First of all just a BIG +1 to this issue. I'm on windows and opening git-gui sometimes literally hurts my eyes. I even noticed I've started squinting a little before opening it, then I move it to my side monitor and open my IDE (which ofc is dark theme) on my main. Secondly, I would really appreciate it if you could explain how you managed to make git-gui look like that (referring to your screenshot, below). What do I need to do, exactly? And how (if anything) can I help out with this issue? I want dark theme as soon as possible <3 Your screenshot: |
@birgersp You need to set the Tcl/Tk theme and make sure gui.usettk config is true. I am not quite sure how to set the Tk theme on windows though. It is hard enough on Linux, and for that you need to play around with X server settings. If you are willing to run a custom build, you can try this patch: https://lore.kernel.org/all/20211006180348.22e5c2z4pqkwtokx@yadavpratyush.com/ it adds a menu in the options dialog to choose the theme. |
@prati0100 thanks. I tried the patch to get the menu, but none of the selectable themes actually makes git-gui dark. They look different but all the themes are light. (btw if my workplace let me use Linux I definitely would) |
@birgersp Then it looks like you don't have a dark theme installed. See https://wiki.tcl-lang.org/page/List+of+ttk+Themes. You need to source the theme file. Placing it in the lib/ directory should do the trick I think, but I haven't tried that out myself. |
Okay. Trying to get this to work but I'm a little lost. But perhaps more on topic: what about getting a dark theme installed (packed) with the git-gui for windows installation? How would that work? |
@birgersp That is what I suggested @Sashank999 should do. I think Tk theming is very difficult to set up for the average user and we should start shipping themes with the git-gui repo. I didn't see any patches though. I also didn't get time myself to do this. |
@prati0100 so where does this issue belong? Here, or in the git-for-windows project (i.e. repo)? |
@birgersp It should belong here. |
Okay, thanks! I'll try to contribute this weekend |
@birgersp I'm really sorry. I check Gmail really often so I missed it. |
So if I'm not mistaken this is the code as it should be copy-pasted into the console.
So for anyone that wants this changed look for git-gui on Windows here what you can do:
It's hacky, but at least git-gui no longer burns my eyes. |
Thanks to: https://stackoverflow.com/a/57528809 . These lines of code should be enough for Unstaged Files, Staged Files, Diff Area and Commit Message Buffer: |
Where do I put this code? |
There seems to be a problem with this line:
EDIT: Yeah it seems line 3486 is too soon for that command. I added them to 3961 (probably not the same line as it would be for others, but heres a screenshot) |
The additions neatly formatted with detailed instructions by @birgersp above worked for me at the location indicated. Since I did a local install, my The additions to change the border/outline originally mentioned by @Sashank999 above work. As @birgersp said, however, they needed to be just before the "Load window state" comment further down in the file. Here are the lines reformatted into one block for easier copying: .vpane.files.index.list configure -background #333 -highlightbackground #333 -highlightthickness 1
.vpane.files.workdir.list configure -background #333 -highlightbackground #333 -highlightthickness 1
.vpane.lower.diff.body.t configure -background #333 -highlightbackground #333 -highlightthickness 1
.vpane.lower.commarea.buffer.frame.t configure -background #333 -highlightbackground #333 -highlightthickness 1 Although personally I don't mind the white border/outline of the frames. I actually would like the overall window to have one as so many dark themed windows simply blend into one another when they overlap such that I can't tell which window is which. |
thank you all you beautiful people, with the help of your comments thus far, I got both of the provided patches working on my instance. While I wouldn't say the default light theme was burning my eyes (...literally, anyway. I do think it's an apt hyperbole), it was certainly proving to be adverse enough to their proper functioning that I was having trouble focusing on GIT GUI when darker windows, especially with text (like my IDE) were behind it. |
Is there dark mode for Git GUI ? No, I am not asking for ways to edit those
.tcl
files.I tried that. Got myself comfortable with the whole page. But still, the menu bar and the window title bar remain white. And that frustates me a bit.
I have searched in Github Issues and Google Groups for the keyword
dark
but got no results I hoped so I'm posting this.I'm a JS developer. But, I know a little bit of TCL and Tk and happily customised the About page like this. So, I think I can help. Just give me the Ok and I will go ahead.
The text was updated successfully, but these errors were encountered: