From 3e1bafdd8a93d02b7fbcc2ad7d7f3d5f4c27132c Mon Sep 17 00:00:00 2001 From: Andreas Wrede Date: Wed, 11 Mar 2020 16:08:31 -0400 Subject: [PATCH] show watched hosts in bold --- hbd | 1 + hbdclass.py | 3 +++ 2 files changed, 4 insertions(+) diff --git a/hbd b/hbd index c937fa4..0405ada 100755 --- a/hbd +++ b/hbd @@ -967,6 +967,7 @@ if 1 and os.path.exists(pickfile): hbdclass.Connection.htab = {} for h in list(hbdclass.Host.hosts.keys()): hbdclass.Host.hosts[h].dyn = h in dyndnshosts + hbdclass.Host.hosts[h].watched = h in watchhosts hbdclass.Host.hosts[h].fixup() for h in drophosts: if h in hbdclass.Host.hosts: diff --git a/hbdclass.py b/hbdclass.py index f2661ff..3b74502 100644 --- a/hbdclass.py +++ b/hbdclass.py @@ -167,6 +167,7 @@ class Host: Host.hosts[name] = self self.num = num self.dyn = False + self.watched = False self.upcount = 0 self.interval = 0 self.doesack = -1 @@ -181,6 +182,8 @@ class Host: d['name'] = self.name if self.dyn: d['name'] += "*" + if self.watched: + d['name'] = "%s" % d['name'] d['dyn'] = str(self.dyn) d['ver'] = str(self.cver) d['num'] = self.num