+ def __repr__(self):
+ uuid = self.uuid
+ if uuid[-9:-2] == '_backup':
+ uuid = uuid[:-9]
+ suffix = f'{uuid[-6:]}_b{self.uuid[-1:]}'
+ else:
+ suffix = uuid[-6:]
+
+ colorz = [
+ fg('violet red'),
+ fg('red'),
+ fg('orange'),
+ fg('peach orange'),
+ fg('yellow'),
+ fg('marigold yellow'),
+ fg('green yellow'),
+ fg('tea green'),
+ fg('cornflower blue'),
+ fg('turquoise blue'),
+ fg('tropical blue'),
+ fg('lavender purple'),
+ fg('medium purple'),
+ ]
+ c = colorz[int(uuid[-2:], 16) % len(colorz)]
+ fname = self.fname if self.fname is not None else 'nofname'
+ machine = self.machine if self.machine is not None else 'nomachine'
+ return f'{c}{suffix}/{fname}/{machine}{reset()}'
+