dcop script finally done
Nicolas
ripley at 8d.com
Sun Jul 4 04:08:02 BST 2004
I hope it could help somebody. Not the cleanest script I ever made, but it
works.
My screen id 1400X1050 with this configuration (best if view with fixe fonts)
,---------------.
| |
+-------+-------+
| | |
| | |
| | |
+-------+ |
+-------+ |
+-------+ |
`-------+-------'
and here is the script :
#!/bin/sh
basename=`date +"%H%M%N"`
#Top konsole
name=$basename"_konsoleX1_"
kstart -type Override --window $name konsole --geometry 1400x300+0+0 --script
-T $name > /dev/null 2>&1
pid=`ps aux | grep konsole | grep -v grep | grep $name |awk '{print $2}'`
konsole1=konsole-$pid
#Left top konsole
name=$basename"_konsoleX2_"
kstart -type Override --window $name konsole --geometry 700x440+0+300 --script
-T $name > /dev/null 2>&1
pid=`ps aux | grep konsole | grep -v grep | grep $name |awk '{print $2}'`
konsole2=konsole-$pid
#Left log iptables konsole
name=$basename"_konsoleL1_"
#kstart -type Override --window $name konsole --geometry 700x72+0+740 --script
-T $name --noscrollbar > /dev/null 2>&1
kstart -type Override -- konsole --geometry 700x72+0+740 --script -T $name
--profile log_tiny > /dev/null 2>&1
pid=`ps aux | grep konsole | grep -v grep | grep -v kstart | grep $name |awk
'{print $2}'`
konsolel1=konsole-$pid
#Left log konsole
name=$basename"_konsoleL2_"
#kstart -type Override --window $name konsole --geometry 700x72+0+812 --script
-T $name --noscrollbar > /dev/null 2>&1
kstart -type Override -- konsole --geometry 700x72+0+812 --script -T $name
--profile log_tiny > /dev/null 2>&1
pid=`ps aux | grep konsole | grep -v grep | grep -v kstart | grep $name |awk
'{print $2}'`
konsolel2=konsole-$pid
#Left log konsole
name=$basename"_konsoleL3_"
#kstart -type Override --window $name konsole --geometry 700x72+0+884 --script
-T $name --noscrollbar > /dev/null 2>&1
kstart -type Override -- konsole --geometry 700x72+0+884 --script -T $name
--profile log_tiny > /dev/null 2>&1
pid=`ps aux | grep konsole | grep -v grep | grep -v kstart | grep $name |awk
'{print $2}'`
konsolel3=konsole-$pid
#Left log konsole
name=$basename"_konsoleL4_"
#kstart -type Override --window $name konsole --geometry 700x72+0+956 --script
-T $name --noscrollbar > /dev/null 2>&1
kstart -type Override -- konsole --geometry 700x72+0+956 --script -T $name
--profile log_tiny > /dev/null 2>&1
pid=`ps aux | grep konsole | grep -v grep | grep -v kstart | grep $name |awk
'{print $2}'`
konsolel4=konsole-$pid
#Right konsole
name=$basename"_konsoleX3_"
kstart -type Override --window $name konsole --geometry 700x728+700+300
--script -T $name > /dev/null 2>&1
pid=`ps aux | grep konsole | grep -v grep | grep $name |awk '{print $2}'`
konsole3=konsole-$pid
#Pacing + resize correctly
while ! dcop $konsole1 konsole sessionCount > /dev/null 2>&1
do
sleep 0.1
done
dcop $konsole1 konsole-mainwindow\#1 setGeometry 0 0 1400 300
while ! dcop $konsole2 konsole sessionCount 1>/dev/null 2>/dev/null
do
sleep 0.1
done
dcop $konsole2 konsole-mainwindow\#1 setGeometry 700 300 700 728
while ! dcop $konsole3 konsole sessionCount 1>/dev/null 2>/dev/null
do
sleep 0.1
done
dcop $konsole3 konsole-mainwindow\#1 setGeometry 0 300 700 440
while ! dcop $konsolel1 konsole sessionCount 1>/dev/null 2>/dev/null
do
sleep 0.1
done
dcop $konsolel1 konsole-mainwindow\#1 setGeometry 0 740 700 72
while ! dcop $konsolel2 konsole sessionCount 1>/dev/null 2>/dev/null
do
sleep 0.1
done
dcop $konsolel2 konsole-mainwindow\#1 setGeometry 0 812 700 72
while ! dcop $konsolel3 konsole sessionCount 1>/dev/null 2>/dev/null
do
sleep 0.1
done
dcop $konsolel3 konsole-mainwindow\#1 setGeometry 0 884 700 72
while ! dcop $konsolel4 konsole sessionCount 1>/dev/null 2>/dev/null
do
sleep 0.1
done
dcop $konsolel4 konsole-mainwindow\#1 setGeometry 0 956 700 72
#Left log iptable
sessionl1=`dcop $konsolel1 konsole currentSession`
dcop $konsolel1 $sessionl1 sendSession "sshd"
dcop $konsolel1 $sessionl1 sendSession "tipc"
sessionl2=`dcop $konsolel2 konsole currentSession`
dcop $konsolel2 $sessionl2 sendSession "sshdls"
dcop $konsolel2 $sessionl2 sendSession "tc"
#sessionl3=`dcop $konsolel3 konsole currentSession`
#dcop $konsolel3 $sessionl3 sendSession "ssh -p 7032 localhost"
sessionl4=`dcop $konsolel4 konsole currentSession`
dcop $konsolel4 $sessionl4 sendSession "tc"
##Top konsole
#dcop $konsole1 konsole-mainwindow\#1 setGeometry 0 0 1400 300
session1=`dcop $konsole1 konsole currentSession`
dcop $konsole1 $session1 renameSession "Header GW 1"
dcop $konsole1 $session1 sendSession "cd /local/src/8d/gw/src"
session1=`dcop $konsole1 konsole newSession`
dcop $konsole1 $session1 renameSession "Header GW 2"
dcop $konsole1 $session1 sendSession "cd /local/src/8d/gw/src"
session1=`dcop $konsole1 konsole newSession`
dcop $konsole1 $session1 renameSession "Top 1"
dcop $konsole1 $session1 sendSession "cd /local/src/8d/gw/src"
session1=`dcop $konsole1 konsole newSession`
dcop $konsole1 $session1 renameSession "Top 2"
dcop $konsole1 $session1 sendSession "cd /local/src/8d/gw/src"
#Left top konsole
#dcop $konsole2 konsole-mainwindow\#1 setGeometry 0 300 700 400
session2=`dcop $konsole2 konsole currentSession`
dcop $konsole2 $session2 renameSession "Vi GW 1"
dcop $konsole2 $session2 sendSession "cd /local/src/8d/gw/src/gw"
session2=`dcop $konsole2 konsole newSession`
dcop $konsole2 $session2 renameSession "Vi GW 2"
dcop $konsole2 $session2 sendSession "cd /local/src/8d/gw/src/gw"
session2=`dcop $konsole2 konsole newSession`
dcop $konsole2 $session2 renameSession "Vi GW 3"
dcop $konsole2 $session2 sendSession "cd /local/src/8d/gw/src/gw"
session2=`dcop $konsole2 konsole newSession`
dcop $konsole2 $session2 renameSession "Vi GW A"
dcop $konsole2 $session2 sendSession "cd /local/src/8d/gw/src"
session2=`dcop $konsole2 konsole newSession`
dcop $konsole2 $session2 renameSession "Vi GW B"
dcop $konsole2 $session2 sendSession "cd /local/src/8d/gw/src"
session2=`dcop $konsole2 konsole newSession`
dcop $konsole2 $session2 renameSession "Vi GW C"
dcop $konsole2 $session2 sendSession "cd /local/src/8d/gw/src"
#Right konsole
#dcop $konsole3 konsole-mainwindow\#1 setGeometry 700 300 700 728
session3=`dcop $konsole3 konsole currentSession`
dcop $konsole3 $session3 renameSession "JNI 1"
dcop $konsole3 $session3 sendSession "cd /local/src/8d/gw/src/jni"
session3=`dcop $konsole3 konsole newSession`
dcop $konsole3 $session3 renameSession "JNI 2"
dcop $konsole3 $session3 sendSession "cd /local/src/8d/gw/src/jni"
session3=`dcop $konsole3 konsole newSession`
dcop $konsole3 $session3 renameSession "JNI 3"
dcop $konsole3 $session3 sendSession "cd /local/src/8d/gw/src/jni"
session3=`dcop $konsole3 konsole newSession`
dcop $konsole3 $session3 renameSession "java 1"
dcop $konsole3 $session3 sendSession
"cd /local/src/8d/gw/src/java/com/eightd/gw"
session3=`dcop $konsole3 konsole newSession`
dcop $konsole3 $session3 renameSession "java 2"
dcop $konsole3 $session3 sendSession
"cd /local/src/8d/gw/src/java/com/eightd/gw"
session3=`dcop $konsole3 konsole newSession`
dcop $konsole3 $session3 renameSession "java 3"
dcop $konsole3 $session3 sendSession
"cd /local/src/8d/gw/src/java/com/eightd/gw"
session3=`dcop $konsole3 konsole newSession`
dcop $konsole3 $session3 renameSession "Widget Set 1"
dcop $konsole3 $session3 sendSession
"cd /local/src/8d/gw/src/java/com/eightd/gw/ws"
session3=`dcop $konsole3 konsole newSession`
dcop $konsole3 $session3 renameSession "Widget Set 2"
dcop $konsole3 $session3 sendSession
"cd /local/src/8d/gw/src/java/com/eightd/gw/ws"
#waiting for connection...
while ! netstat -nat | grep "127.0.0.1:7032" | grep LISTEN > /dev/null 2>&1
do
sleep 0.5
done
sessionl3=`dcop $konsolel3 konsole currentSession`
dcop $konsolel3 $sessionl3 sendSession "ssh -p 7032 localhost"
dcop $konsolel3 $sessionl3 sendSession "tc"
--- THE END ---
Nic Cola
--
() ascii ribbon campaign - against html e-mail
/\ - against microsoft attachments
___________________________________________________
This message is from the kde mailing list.
Account management: https://mail.kde.org/mailman/listinfo/kde.
Archives: http://lists.kde.org/.
More info: http://www.kde.org/faq.html.
More information about the kde
mailing list