chiark / gitweb /
gitk: copy existing geometry when substituting
authorIan Jackson <ian.jackson@eu.citrix.com>
Thu, 13 Sep 2018 16:47:57 +0000 (17:47 +0100)
committerIan Jackson <ian.jackson@eu.citrix.com>
Thu, 13 Sep 2018 16:47:57 +0000 (17:47 +0100)
templates/gitk.in

index d821e16..3d11b5b 100755 (executable)
@@ -70,13 +70,14 @@ set indexcirclecolor green
 set circlecolors {white blue gray blue blue}
 set linkfgcolor blue
 set circleoutlinecolor black
-set geometry(main) 1245x1535+0+0
-set geometry(state) normal
-set geometry(topwidth) 1245
-set geometry(topheight) 982
-set geometry(pwsash0) "833 1"
-set geometry(pwsash1) "1038 1"
-set geometry(botwidth) 900
-set geometry(botheight) 548
+END
+
+perl <$HOME/.gitk -ne '
+     next unless m{^set geometry\(};
+     s{^(set geometry\(state\)) .*}{$1 normal};
+     print;
+'
+
+cat <<END
 set permviews {}
 END