Skip to main content

Swapping bottom left and right panes (content and patch summary/file tree) in gitk

Gitk (as of git 2.4.2) has its bottom left and right panes the other way round to what I like: the bottom right shows the file tree or the patch summary, while the bottom left shows the contents of what is selected on the right. Isn't that kinda non-standard?

There is no official way to swap those panes, so here's a little hacky patch to do it.


If there is enough interest I will try sending upstream an official patch with a real preference setting or whatever. If not, It Works For Me.

--- /usr/bin/gitk 2015-01-13 20:47:02.000000000 +0100
+++ bin/gitk2 2015-07-06 20:05:51.100562442 +0200
@@ -2432,11 +2432,6 @@ proc makewindow {} {
     $ctext tag conf wwrap -wrap word -lmargin2 1c
     $ctext tag conf bold -font textfontbold
-    .pwbottom add .bleft
-    if {!$use_ttk} {
- .pwbottom paneconfigure .bleft -width $geometry(botwidth)
-    }
-
     # lower right
     ${NS}::frame .bright
     ${NS}::frame .bright.mode
@@ -2466,6 +2461,13 @@ proc makewindow {} {
     $cflist tag configure bold -font mainfontbold
     .pwbottom add .bright
+
+    .pwbottom add .bleft
+    if {!$use_ttk} {
+ .pwbottom paneconfigure .bleft -width $geometry(botwidth)
+    }
+
     .ctop add .pwbottom

     # restore window width & height if known

Comments