LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 09-25-2006, 05:18 AM   #1
kloss
Member
 
Registered: Nov 2004
Location: France & Germany
Distribution: (Pure) Debian Etch & Sid
Posts: 116

Rep: Reputation: 15
Need a tip from screen (and maybe emacs) gurus


Hi all,

In my university we have only Windows computers. I miss the tools I am used to work with on my linux box (emacs & LaTeX i.e.) and I hate the limitations which are set up (for instance, email websites are blocked).

So I use putty and screen on a daily basis to work with from the university with my computer at home. The problem is, I would like to be notified when I receive new email. I can script the part "detect if I have new email" but I don't know how I can display the notification then.

1. IMO the status line of screen does not allow to display custom information.

2. I have tried the splitvt tool: I wanted to have a one-line window where I could output the notification with 'echo you have new mail in mailbox foo'. This did not work: when you echo information in one window, it is automatically resized (eg 3 echo's => a 3-lines window).

3. Screen can split windows but this sucks, too: if you resize your terminal, the splitted windows may disappear. I found no way to force screen to display a one-line window while resizing only the other window.

4. Since I do a lot of work with emacs, I thought I could simply use a splitted window in emacs. I don't know how I can automate this in emacs, though (if screen is running, start with a one-line window on the top, run the script notification.sh in this window -- oh yeah, and get rid of the status line of the shell buffer).

5. One solution is the good, old wall command. So far this is the simplest and most efficient way I found to know If I have new email. But this is suboptimal: lots of wall notification disturb and annoy you.

Do you have any tip regarding this issue?

Thanks
Kloss
 
Old 09-26-2006, 06:25 AM   #2
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
Do you have any tip regarding this issue?
You could also do something with your Bash in-screen PS1 (see the MAIL* parameters), you could also monitor a check your run in a different window and you could use "screen -X screen command" from outside screen. A listing of screen commands you'll find with meta+?, "screen -X time" would flash the time at the bottom of your screen for a sec or two. While not that specific it's indicative enough I think if you're not looking to configure hundreds of different alerts. If you want a message try: "screen -X title "New mail" ; screen -X windows", of course you'll loose the title of your screen window but that's a small price.

I don't know about any emacs tips, I don't need to run another O.S. ;-p
 
Old 09-26-2006, 12:05 PM   #3
kloss
Member
 
Registered: Nov 2004
Location: France & Germany
Distribution: (Pure) Debian Etch & Sid
Posts: 116

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by unSpawn
you could use "screen -X screen command" from outside screen.
Thanks for putting me on the right track!
Code:
screen -X hardstatus string $a_cool_status_with_the_number_of_new_emails
...does exactly what I wanted


Quote:
Originally Posted by unSpawn
I don't know about any emacs tips, I don't need to run another O.S. ;-p
I think you missed some Lisp Configuration:

Code:
;;Break Zawinski's Law
(setq do-email-irc-diary-coffee nil)
(setq take-bloody-ages-to-start nil)
(setq dumb-rms-acronyms nil)
/me
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: Emacs tips: Customize your Emacs experience LXer Syndicated Linux News 0 08-10-2006 12:21 PM
Screen Refresh during terminal/emacs key 'error' deveraux83 Slackware 0 02-11-2005 05:08 AM
'Screen' ignores bash/emacs prefs! Why? stutterbug Red Hat 0 01-20-2005 06:57 AM
edb (emacs database) won't open file - emacs 20 & 21 tip184 Linux - Software 0 04-03-2004 07:31 AM
Emacs & abiword out of my screen and other questions ninadb Slackware 0 02-28-2004 12:20 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 04:39 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration