Slash Boxes
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

use Perl Log In

Log In

[ Create a new account ]

cog (4665)

Journal of cog (4665)

Monday July 12, 2004
07:59 AM

Displaying my upcoming events

[ #19802 ]

When I log in on my computer (or do I log on in my computer?), four xterms are automatically started... one of them displays my upcoming events... the process is simple enough; on .bash_profile:

touch .upcoming

and on .bashrc:

if [ -f .upcoming ]; then
  rm .upcoming 2>/dev/null
  if [ $? == 0 ]; then

(upcoming is the script that does the rest)

The only problem is... how on Earth do I get it to always be the terminal on the top left corner to do that? :-) Apparently, it's kind of random... :-)

Ideas, anyone? :-)

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
More | Login | Reply
Loading... please wait.
  • I think if you start that xterm first and use the -geometry option it should work.
    xterm -geometry WIDTHxHEIGHT+0+0
    • Oops... I think I wasn't clear enough... I get the four xterms the way I want
      them... they are four, and together they fill up the screen (kind of like
      dividing it into a grid).

      My problem is how to select the one of them that starts the upcoming events
      script... sometimes it's the one on the top left corner, others it's the one
      in the bottom right corner, etc...

      It seems that all the four xterms are started at the same time, so only the
      first that succeeds in deleting the file gets to run the script... I would
      • xterm -geometry WHEREYOUWaNTED -e and have have the code you posted. Remove it from .bashrc
        life is too short
        • Only two problems with that solution... :-(

          1) The Bash switch -e executes the command /and/ terminates the shell... I
          want it to be fully operational afterwards...

          2) The xterms aren't opened by me... I simply logged out and saved the
          configuration with the xterms opened (although that should
          be in some configuration file I'm not aware of...)
    • Here's a link [] to what I'm striving for :-)

      And another [] to what I sometimes get... :-(

  • First, I tried searching for the place where the information about my xterms was written... I tried changing that a little, with -geometry and such, but that didn't work out the way I intended...

    Then, I decided to go for a different approach... my .bash_profile now reads:

    # four xterms to start with
    xterm -bg black -fg white -vb +sk -geometry +0+0 -e " upcoming ; bash "
    xterm -bg black -fg white -vb +sk -geometry +507+0
    xterm -bg black -fg white -vb +sk -geometry +0+340
    xterm -bg black -fg white -vb