Something that I do at least a couple of times every day when working here in Linux is to take a blank screen and set up a few command line terminals for developing with Zope. One terminal in which I'll run the editor (Jed of course), one in which I'll run Zope in debug mode and one in which I'll run my product refreshing script. I want the terminal windows of certain sizes and positions and I want to be in a particular directory in each terminal so that I have easy access to stuff like ./bin/runzope and jed Products/SomeProduct/....

Still with me? Cool, that means that you probably do something similar or that you're just extremely bored and have too much time. To make it easier to get started like this I've written a little bash shell script that starts Eterm (my preferred terminal) at certain positions and sizes. To be able to figure out which zope development directory I've written a little Tkinter script (my first ever!) that shows a list of buttons and when I select one it "feeds into the shell script" to get the Eterms to start in the right directory.

So how did I do that? Two scripts, first '~/bin/ZopeEditing.sh':


#!/bin/sh
cd `python ~/bin/ZopePathSelector.py`
Eterm --geometry 92x55+0+0 --name Programming --title Programming &
Eterm --geometry 69x14+579+535 --name Refreshing --title Refreshing &
Eterm --geometry 69x20+579+0 --name Debugger --title Debugger  &

Secondly, the Tkinter script called ~/bin/ZopePathSelector.py which you download here if you're interested.

The last thing I do is that I bind a key-commend (since I use Enlightenment16 I use e16keyedit) such that pressing Ctrl+Shift+z runs the command ~/bin/ZopeEditing.sh. These pictures hopefully shows what's going on.

One of many screens on my X The Tkinter script in action After all the terminal windows have been opened

Comments

Your email will never ever be published.

Related posts