3434# Ansi colors
3535ANSI_END = "\033 [0m"
3636ANSI_GREEN = "\033 [0;32m"
37+ ANSI_BGREEN = "\033 [1;32m"
3738ANSI_BLUE = "\033 [0;34m"
39+ ANSI_BBLUE = "\033 [1;34m"
3840ANSI_YELLOW = "\033 [0;33m"
3941ANSI_RED = "\033 [0;31m"
4042ANSI_MAGENTA = "\033 [0;35m"
43+ ANSI_BMAGENTA = "\033 [1;35m"
4144ANSI_CYAN = "\033 [0;36m"
45+ ANSI_BCYAN = "\033 [1;36m"
4246ANSI_LIGHT_BLUE = "\033 [0;94m"
4347ANSI_LIGHT_GREEN = "\033 [0;92m"
4448ANSI_LIGHT_YELLOW = "\033 [0;93m"
@@ -99,15 +103,15 @@ async def process_event_message(mc, ev, json_output, end="\n", above=False):
99103 name = ct ["adv_name" ]
100104
101105 if ct ["type" ] == 3 : # room
102- disp = f"{ ANSI_CYAN } "
106+ disp = f"{ ANSI_BCYAN } "
103107 elif ct ["type" ] == 2 : # repeater
104- disp = f"{ ANSI_MAGENTA } "
108+ disp = f"{ ANSI_BMAGENTA } "
105109 else :
106- disp = f"{ ANSI_GREEN } "
110+ disp = f"{ ANSI_BBLUE } "
107111 disp = disp + f"{ name } "
108112 if 'signature' in data :
109113 sender = mc .get_contact_by_key_prefix (data ['signature' ])
110- disp = disp + f"/{ ANSI_GREEN } { sender ['adv_name' ]} "
114+ disp = disp + f"/{ ANSI_BBLUE } { sender ['adv_name' ]} "
111115 disp = disp + f" { ANSI_YELLOW } ({ path_str } )"
112116 if data ["txt_type" ] == 1 :
113117 disp = disp + f"{ ANSI_LIGHT_GRAY } "
@@ -125,7 +129,7 @@ async def process_event_message(mc, ev, json_output, end="\n", above=False):
125129
126130 elif (data ['type' ] == "CHAN" ) :
127131 path_str = f" { ANSI_YELLOW } ({ path_str } ){ ANSI_END } "
128- disp = f"{ ANSI_GREEN } ch{ data ['channel_idx' ]} { path_str } "
132+ disp = f"{ ANSI_BGREEN } ch{ data ['channel_idx' ]} { path_str } "
129133 disp = disp + f"{ ANSI_END } "
130134 disp = disp + f": { data ['text' ]} "
131135
@@ -256,7 +260,14 @@ def _(event):
256260 prompt = ""
257261 if not last_ack :
258262 prompt = prompt + f"{ ANSI_RED } !"
259- prompt = prompt + f"{ ANSI_BLUE } { contact ['adv_name' ]} >{ ANSI_END } "
263+
264+ if contact ["type" ] == 3 : # room server
265+ prompt = prompt + f"{ ANSI_CYAN } "
266+ elif contact ["type" ] == 2 :
267+ prompt = prompt + f"{ ANSI_MAGENTA } "
268+ else :
269+ prompt = prompt + f"{ ANSI_BLUE } "
270+ prompt = prompt + f"{ contact ['adv_name' ]} >{ ANSI_END } "
260271
261272 if not process_event_message .color :
262273 prompt = escape_ansi (prompt )
0 commit comments