Xterm window title enhancement to hostname:/path II.



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 debi:/etc
mc - root Firewall:/etc
mc - root Planet:/etc
mc - plamen 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

Attachment: main.c.patch
Description: Binary data



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]