Menu

#8 Add NOMORE hook (to complement MORE)

open
nobody
None
5
2008-11-08
2008-11-08
No

A NOMORE hook (to complement the MORE hook) would be useful.

I recently wrote something[1] to watch my tf log and notify me[2] when highlighted patterns are matched. I wanted to have certain notification methods triggered *only* when tf was in backscroll (i.e., the world paused and More displayed) and needed a way to have tf communicate this status to outside applications. I added a NOMORE hook to complement the MORE hook and use these hooks:

/hook MORE = /sys chmod -t ~jwm/.tf.log
/hook NOMORE = /sys chmod +t ~jwm/.tf.log

to set/clear the sticky bit on my tf log to indicate whether tf is in backscroll. The attached patch seems to work correctly in that the NOMORE hook is only called when tf full emerges from pending backscroll (outcount == -1).

[1] http://horde.net/~jwm/software/misc/tf-notifier
[2] via e-mail/SMS, Mac OS X Growl, and/or Gnome libnotify

Discussion

  • Anonymous

    Anonymous - 2010-09-28
     
  • Anonymous

    Anonymous - 2010-09-28

    Looks like my understanding of display_screen->outcount was flawed; that section of code can call the NOMORE hook unconditionally AFAICT. Updated the attached patch.

     

Log in to post a comment.

MongoDB Logo MongoDB