]> gitweb.fluxo.info Git - utils-x11.git/commitdiff
Zsh support on terminal
authorSilvio Rhatto <rhatto@riseup.net>
Mon, 21 Aug 2017 02:17:01 +0000 (23:17 -0300)
committerSilvio Rhatto <rhatto@riseup.net>
Mon, 21 Aug 2017 02:17:01 +0000 (23:17 -0300)
terminal

index 4cbf7cd7ea61e80e6cc78b92fb3d8b40d49a5c35..43302a00aa355d390c69989199fddbe6b9bad35c 100755 (executable)
--- a/terminal
+++ b/terminal
@@ -3,8 +3,15 @@
 # Terminal emulator wrapper
 #
 
+# Load geometry configuration
 source ~/.geometry || exit 1
 
+# Set default dimensions
+if [ ! -z "$GEOMETRY" ]; then
+  DIMENSIONS="-g $GEOMETRY"
+fi
+
+# Set title
 if [ -z "$TITLE" ]; then
   if [ ! -z "$1" ]; then
     TITLE="$1"
@@ -13,46 +20,46 @@ if [ -z "$TITLE" ]; then
   fi
 fi
 
-if [ ! -z "$GEOMETRY" ]; then
-  DIMENSIONS="-g $GEOMETRY"
-fi
-
+# Set default font
 if [ ! -z "$FONT" ]; then
   F_FONT="-F $FONT"
   FN_FONT="-fn $FONT"
   f_FONT="-f $FONT"
 fi
 
+# Set shell
+#SH="bash -rcfile $HOME/.terminal"
+SH="zsh"
+
+# Dispatch
 if [ "$TERM" == "stterm" ]; then
   if [ ! -z "$1" ]; then
-    stterm $f_FONT -T $TITLE -e bash -rcfile $HOME/.terminal -c "$*"
+    stterm $f_FONT -T $TITLE -e $SH -c "$*"
   else
-    stterm $f_FONT -T $TITLE -e bash -rcfile $HOME/.terminal
+    stterm $f_FONT -T $TITLE -e $SH
   fi
 elif [ "$TERM" == "rxvt" ]; then
   if [ ! -z "$1" ]; then
     # Background color should be set at ~/.Xresources
     #rxvt-unicode -bg black +sb -fg white $FN_FONT $DIMENSIONS -title $TITLE \
-    rxvt-unicode +sb -fg white $FN_FONT $DIMENSIONS -title $TITLE \
-                 -e bash -rcfile $HOME/.terminal -c "$*"
+    rxvt-unicode +sb -fg white $FN_FONT $DIMENSIONS -title $TITLE -e $SH -c "$*"
   else
     # Background color should be set at ~/.Xresources
     #rxvt-unicode -bg black +sb -fg white $FN_FONT $DIMENSIONS -title $TITLE \
-    rxvt-unicode +sb -fg white $FN_FONT $DIMENSIONS -title $TITLE \
-                 -e bash -rcfile $HOME/.terminal
+    rxvt-unicode +sb -fg white $FN_FONT $DIMENSIONS -title $TITLE -e $SH
   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 $DIMENSIONS -n$TITLE -e bash -rcfile $HOME/.terminal -c "$*"
+           --buttonbar 0 $DIMENSIONS -n$TITLE -e $SH -c "$*"
   else
     Eterm  --background-pixmap 0 --scrollbar 0 +sb -b black -f white $F_FONT --borderless no \
-           --buttonbar 0 $DIMENSIONS -n$TITLE -e bash -rcfile $HOME/.terminal
+           --buttonbar 0 $DIMENSIONS -n$TITLE -e $SH
   fi
 elif [ "$TERM" == "xterm" ]; then
   if [ ! -z "$1" ]; then
-    xterm -u8 $FN_FONT -geometry $GEOMETRY -title $TITLE -e bash -c "$*"
+    xterm -u8 $FN_FONT -geometry $GEOMETRY -title $TITLE -e $SH "$*"
   else
-    xterm -u8 $FN_FONT -geometry $GEOMETRY -title $TITLE -e bash
+    xterm -u8 $FN_FONT -geometry $GEOMETRY -title $TITLE -e $SH
   fi
 fi