chiark / gitweb /
dot/xinitrc: Fix detection of GTK 2.0-based `pterm'.
authorMark Wooding <mdw@distorted.org.uk>
Tue, 28 Apr 2020 12:42:34 +0000 (13:42 +0100)
committerMark Wooding <mdw@distorted.org.uk>
Tue, 28 Apr 2020 12:42:34 +0000 (13:42 +0100)
Firstly, the match is usually preceded at least by whitespace, and
secondly, it seems that the library may, at least sometimes, be called
`libgtk-x11-2.0.so'.

dot/xinitrc

index e493b873d02781d38e7a6d68a1718e4743b2fc8b..4e03412ab0ec9fdd3983973631ae4c57502682b9 100755 (executable)
@@ -278,10 +278,10 @@ case "$term" in
     ## The pterm width differs according to whether it's linked against Gtk 2
     ## or 3.  Let's find out...
     case $(ldd $(command -v pterm) | grep libgtk) in
-      libgtk-2*) t_wd=504 ;;
+      *libgtk-2* | *libgtk-x11-2*) t_wd=504 ;;
       *) t_wd=503 ;;
     esac
-    t_lineht=13 t_vextra=23 geom=-geometry;;
+   t_lineht=13 t_vextra=23 geom=-geometry;;
   Eterm) t_wd=504 t_lineht=13 t_vextra=23 geom=-g;;
   xterm) t_wd=507 t_lineht=13 t_vextra=27 geom=-geometry;;
 esac