PDA

View Full Version : Creating a 'macro' to load your prefered development enviroment



chamstar
May 18th, 2007, 12:30 PM
Hi, I was wondering if there is anything in Ubuntu like a macro recorder. When programming I have my IDE open and three terminals each running a different command (eg. tail -f development.log).

Ideally I'd like to just click something or issue one command and all those windows are 'made' and positioned (I have dual screen).

Any ideas would be more than welcome.

Cheers Cham.

FuturePast
May 18th, 2007, 04:57 PM
In Ubuntu a macro is called a shell script.
There are many ways to accomplish what you are attempting.

chamstar
May 21st, 2007, 06:12 PM
But can one shell script actually open separate terminals and run commands on those terminals?
And position those and other windows?

Many thanks for your reply :)

cwaldbieser
May 24th, 2007, 11:17 AM
But can one shell script actually open separate terminals and run commands on those terminals?
And position those and other windows?

Many thanks for your reply :)

Yes.


#! /bin/bash
xterm -geometry '+0+100' -e 'ls -l $HOME | less' &
xterm -geometry '+500+300' &


This is just with a simple xterm. Look at the man pages for "gnome-terminal" or "konsole" if you want to get fancy.

chamstar
May 24th, 2007, 11:52 AM
That is great thanks. I use gnome-terminal so I'll check its options out.

kobewan
May 24th, 2007, 12:50 PM
You could also take a look at a program called "wmctrl" if you want to position etc. windows.