marnanel: (Default)
[personal profile] marnanel
The other day, over porter somewhere in Dublin, we were discussing people who run curses-based applications in the X terminal under Maemo, rather than using the GUI. (For example, some people run mutt rather than modest, irssi rather than xchat, and so on.) Sometimes people do this because they want or need to run the client on a remote machine, and they don't want to bother with X forwarding. Sometimes they just prefer the character interface.

The idea was then floated of having an escape sequence which caused the client to pop up a notification, so that even a curses-based application running on a remote server could alert you that you had new mail, or that someone had just said your name in channel.

So on the plane home, I hacked up an example implementation:



You can find the patches here:Further thoughts:
  • it still needs osso-xterm integration, but that should be easy
  • patches to mutt, irssi, and so on to produce these sequences would be useful
  • we need to work out something to do with terminfo to report that this sequence may be generated
  • it uses OSC code 55, which is otherwise unused in gnome-terminal, but I don't know whether anyone else uses it for anything.  (The relevant spec, ECMA-48, says that OSC codes are user-defined, but I'd still rather not tread on anyone's toes.)
  • it only allows the sequence to be terminated by BEL; this is traditional, but ECMA-48 actually requires ST instead.  This will be trivial to allow as well.
  • I'm not at all sure about min/max versions of libnotify
(Of course, there are also other ways to get the same effect.  But I think this is a good general solution.)

(Edit: naltrexone suggests appropriate Flann O'Brien parody.)

Your thoughts (and patches) are welcome, as always.

why not pynotify

Date: 2010-11-19 05:11 pm (UTC)
From: (Anonymous)
why not just use something like:

import sys
import pynotify
title =''
message = sys.argv[0]
pynotify.init("shell")
n = pynotify.Notification(title, message)
n.set_timeout(5)
n.show()

Something else

Date: 2010-11-19 09:35 pm (UTC)
From: (Anonymous)
OOoh, this reminds me of something I'll never get round to doing, but your kinda close:

Make an escape sequence that can mark something as a URL (if it doesn't already).

Then either port apps to output filenames (with file:///).

Ssh would have to be ported to mung these into sftp:///somewhere.


For stuff not ported, it could run in a wrapper that would watch what files it opened, and if they were output linkify them.


Once files were linked, you could right click and manage files displayed by ls, do stuff like copy the location - maybe even drag a file right out of an ls listing onto the desktop somewhere.


Basically joining up the console and the gui a lot more than they are already.

- Stuart Axon

ntWTtTlcbVkqGHuE

Date: 2011-09-27 11:51 pm (UTC)
From: (Anonymous)
KlYZCg Right from this article begin to read this blog. Plus a subscriber:D

in the same vain

Date: 2010-11-20 09:42 pm (UTC)
From: (Anonymous)
This isn't exactly the same thing (it's all 'in terminal'); but you can easily set up Tmux (a more modern GNU Screen) to watch for activity on windows/tabs/panes and there are plugins for programs like Irssi and Weechat that will literally do what you mentioned above and let you know if your nic is mentioned in an IRC room.

http://blog.hawkhost.com/2010/07/02/tmux-%e2%80%93-the-terminal-multiplexer-part-2/#tmux-window-activity

Obviously that's not going to do you any good if you're using Quake/Tilda and have your terminal hidden (when a pop up might be nice); but I tend to find pop-ups really annoying unless it's something I'm very explicitly waiting to be alerted to/about.



lydvvGqXVClOXorLmHo

Date: 2011-09-29 10:57 pm (UTC)
From: (Anonymous)
v7mzHY Read, of course, far from my topic. But still, we can work together. How do you feel about trust management?!...

Date: 2010-11-29 07:16 pm (UTC)
From: (Anonymous)
As the main author of Terminator I would be thrilled if stuff like this could make it into terminals :)

mDKoRZMdEFCYTVBym

Date: 2011-09-28 09:07 am (UTC)
From: (Anonymous)
tDAsSK Interesting, but still I would like to know more about it. Liked the article:D

Profile

marnanel: (Default)
Monument

January 2022

S M T W T F S
      1
2345678
9101112131415
1617 1819202122
23242526272829
3031     

Most Popular Tags

Page Summary

Style Credit

Expand Cut Tags

No cut tags
Page generated Jun. 15th, 2025 05:08 pm
Powered by Dreamwidth Studios