Xterm window title enhancement to hostname:/path II.

Pavel Vávra plamen at bluetone.cz
Fri Mar 18 15:55:16 UTC 2005


Sorry - I've attached wrong file so now it has to be a bit better.

Hi developers,
  I've found a feature in last version of mc. It is really nice to change xterm window title to current path. One can check Window List in its Window Manager and find the right window there. It is really nice. But it is not enough if one is logged on another machines via ssh. Then Window list can look like:
mc - /etc
mc - /etc
mc - /etc
mc - /usr/src

Well, but what is the right window what I am looking for? I want to switch to configuration window of my firewall. I need a bit different list:

mc - debi:/etc
mc - Firewall:/etc
mc - Planet:/etc
mc - workstation:/usr/src

or better (not coded now)

mc - root at debi:/etc
mc - root at Firewall:/etc
mc - root at Planet:/etc
mc - plamen at workstation:/usr/src

This patch adds hostname to current path in x-terminal window with minimal source code changes into existing code. It works for me and I hope it will be useful for many network administrators too. I hope this patch is safe. It is restricted to hostnames up to 63 bytes long. Please include it into upstream if you'll find it useful. It is possible that during some days I'll add username to make information more complete and if it will be welcomed I'll sent it too. The best way is - of course - to make this feature configurable, but I am not experienced C programmer so I cannot do it :-(

Regards,
  Pavel

-------------- next part --------------
A non-text attachment was scrubbed...
Name: main.c.patch
Type: application/octet-stream
Size: 1196 bytes
Desc: not available
URL: <http://lists.midnight-commander.org/pipermail/mc-devel/attachments/20050318/e428e15f/attachment.obj>


More information about the mc-devel mailing list