Re: too many mutts
> Is there a script I could make that I could use to start mutt, and if
> mutt were already running, then it could just take me to the already-
> running instance of it, instead of starting a new mutt?
> I know some Python if it could be done in there. But I suspect I need
> a bash script?
Chances are bash would be the last thing you want to use for something
like this. Often times WMs and DEs will have bindings for Perl or
Python. I've yet to hear of bindings written for bash.
The first part of the problem is easy. You've got the crude method
already offered of checking ps but that kind of fails if you're on a
multi-user system and someone else is running mutt. A simpler dotlock
in ~ would work universally. I know that's not part of your original
specification but it is unspecified whether the machine is multiuser so
I err on the side of universal solutions in those cases. ;)
As for the second issue, bringing the current terminal to the fore, is
where the environment specific bindings comes in. I don't know if
Fluxbox has such bindings for any scripting language but what you need
is for a way for a script to tell the WM to bring a specific window to
the top. Barring something like that I doubt there is any really neat
way to do it.
Maybe a change in work habits would be more appropriate? I got into the
habit ages ago of using multiple desktops and throwing specific tasks on
certain desktops. Communications, IE, email/im go on desktop 1. If I
need to work on those I pop over there where it's always open and always
on the top. Browsing is on 4. Productivity (programming, writing,
sysadmin) goes on desktop 3. By splitting it up that way I can dedicate
the entire screen to a task, organize the screen to fit that task and
not worry about opening specific programs from the taskbar. I only need
to know where the desktop buttons and those never change position. :)
As you can imagine no matter what mail client I use, GUI or CLI, I never
opened more than one because it always occupied the same space on