Konsole macros?

Waldo Bastian bastian at kde.org
Wed Apr 16 20:59:46 BST 2003


On Wednesday 16 April 2003 20:16, Kevin Krammer wrote:
> On Wednesday 16 April 2003 16:52, Andy Cowan wrote:
> > I work with konsole sessions on a daily basis, always set up the same.
> > I would like to know if it is possible to do something like the
> > following, and write some kind of script or macro so that I could do it
> > with one command
> >
> > *Open Konsole
> > *Open 4 additional konsole tabs
> > *Name them "Local", "Remote", "Code", "Compiler", and "Data"
> > *cd to the directories I want each to work in, or open an ssh session
> > for the remote tab
> >
> > It seems like this ought to be possible, but I haven't a clue how.  I
> > would appreciate any suggestions.
>
> Do your setup, save the KDE session, done.

Or use:

#!/bin/sh
konsole=`dcopstart konsole`
session=`dcop $konsole konsole currentSession`
dcop $konsole $session renameSession Local
session=`dcop $konsole konsole newSession`
dcop $konsole $session renameSession Remote
session=`dcop $konsole konsole newSession`
dcop $konsole $session renameSession Code
session=`dcop $konsole konsole newSession`
dcop $konsole $session renameSession Compiler
session=`dcop $konsole konsole newSession`
dcop $konsole $session renameSession Data

Hmmm... changing directory is tricky though.

If you add --script to the Exec= line in konsole.desktop you can add things 
like in the above script:

dcop $konsole $session sendSession 'cd /my/work/directory'

Cheers,
Waldo
-- 
bastian at kde.org -=|[ SuSE, The Linux Desktop Experts ]|=- bastian at suse.com

___________________________________________________
This message is from the kde mailing list.
Account management:  http://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