You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
71 lines
1.0 KiB
71 lines
1.0 KiB
#!/usr/bin/env bash
|
|
|
|
name=vdn-terminal
|
|
|
|
BIG=0
|
|
|
|
synopsis() {
|
|
cat << EOF
|
|
Usage : $name [-h]
|
|
EOF
|
|
}
|
|
|
|
help() {
|
|
cat << EOF
|
|
|
|
$name lance un terminal exécutant une commande en arrière plan.
|
|
|
|
`synopsis`
|
|
|
|
-h : affiche cette aide
|
|
-b : police de 10 et géométrie de 140x43 (big)
|
|
|
|
EOF
|
|
}
|
|
|
|
usage() {
|
|
synopsis
|
|
exit 1
|
|
}
|
|
|
|
args() {
|
|
local opt
|
|
while getopts "hb" opt; do
|
|
case $opt in
|
|
h) help; exit 0;;
|
|
b) BIG=1;;
|
|
?) usage;;
|
|
esac
|
|
done
|
|
shift $(($OPTIND - 1))
|
|
ARGS=$@
|
|
}
|
|
|
|
# Programme principal
|
|
|
|
args $@
|
|
|
|
VDN_PATH=$(readlink -f $(dirname $0)/..); . $VDN_PATH/bin/functions.sh
|
|
|
|
export VDN_PATH
|
|
|
|
cmd=$ARGS
|
|
|
|
#geom="-fa 'Monospace' -fs 12"
|
|
#[ $BIG = 1 ] && geom="-fa 'Monospace' -fs 10 -geometry 140x43"
|
|
|
|
opts="-j -rightbar -sb -si -sk -vb"
|
|
|
|
geom=""
|
|
[ $BIG = 1 ] && geom="--geometry 140x43 --font 12"
|
|
|
|
|
|
#c="gnome-terminal --name=\"$name\" -- $cmd"
|
|
c="xfce4-terminal $geom --disable-server -T \"$name\" -x $cmd"
|
|
|
|
#c="xterm $opts $geom -T \"$name\" -e $cmd"
|
|
|
|
echo "vdn-terminal cmd:$c"
|
|
eval $c 2> /dev/null &
|
|
#vdn-terminal.rb $@
|