]> gitweb.fluxo.info Git - utils-x11.git/commitdiff
Make terminal work with undefined geometries
authorSilvio Rhatto <rhatto@riseup.net>
Mon, 8 Jun 2015 21:32:59 +0000 (18:32 -0300)
committerSilvio Rhatto <rhatto@riseup.net>
Mon, 8 Jun 2015 21:32:59 +0000 (18:32 -0300)
terminal

index e76974a06ad0bc546f995ee578042dc5e97e728a..955c0a1dc3a09f20330fca89a16f62c3a3fafc4e 100755 (executable)
--- a/terminal
+++ b/terminal
@@ -13,21 +13,25 @@ if [ -z "$TITLE" ]; then
   fi
 fi
 
+if [ ! -z "$GEOMETRY" ]; then
+  DIMENSIONS="-g $GEOMETRY"
+fi
+
 if [ "$TERM" == "rxvt" ]; then
   if [ ! -z "$1" ]; then
-    rxvt-unicode -bg black +sb -fg white -fn $FONT -g $GEOMETRY -title $TITLE \
+    rxvt-unicode -bg black +sb -fg white -fn $FONT $DIMENSIONS -title $TITLE \
                  -e bash -rcfile $HOME/.terminal -c "$*"
   else
-    rxvt-unicode -bg black +sb -fg white -fn $FONT -g $GEOMETRY -title $TITLE \
+    rxvt-unicode -bg black +sb -fg white -fn $FONT $DIMENSIONS -title $TITLE \
                  -e bash -rcfile $HOME/.terminal
   fi
 elif [ "$TERM" == "Eterm" ]; then
   if [ ! -z "$1" ]; then
     Eterm  --background-pixmap 0 --scrollbar 0 +sb -b black -f white -F $FONT --borderless no \
-           --buttonbar 0 -g $GEOMETRY -n$TITLE -e bash -rcfile $HOME/.terminal -c "$*"
+           --buttonbar 0 $DIMENSIONS -n$TITLE -e bash -rcfile $HOME/.terminal -c "$*"
   else
     Eterm  --background-pixmap 0 --scrollbar 0 +sb -b black -f white -F $FONT --borderless no \
-           --buttonbar 0 -g $GEOMETRY -n$TITLE -e bash -rcfile $HOME/.terminal
+           --buttonbar 0 $DIMENSIONS -n$TITLE -e bash -rcfile $HOME/.terminal
   fi
 elif [ "$TERM" == "xterm" ]; then
   if [ ! -z "$1" ]; then