File tree Expand file tree Collapse file tree 1 file changed +18
-4
lines changed Expand file tree Collapse file tree 1 file changed +18
-4
lines changed Original file line number Diff line number Diff line change @@ -139,12 +139,26 @@ def _generate_alert_str(self) -> str:
139
139
return alert_str
140
140
141
141
def _generate_colored_prompt (self ) -> str :
142
- """Randomly generates a colored prompt
142
+ """
143
+ Randomly generates a colored prompt
143
144
:return: the new prompt
144
145
"""
145
- fg_color = random .choice (list (ansi .FG_COLORS .keys ()))
146
- bg_color = random .choice (list (ansi .BG_COLORS .keys ()))
147
- return ansi .style (self .visible_prompt .rstrip (), fg = fg_color , bg = bg_color ) + ' '
146
+ rand_num = random .randint (1 , 20 )
147
+
148
+ status_color = 'reset'
149
+
150
+ if rand_num == 1 :
151
+ status_color = 'bright_red'
152
+ elif rand_num == 2 :
153
+ status_color = 'bright_yellow'
154
+ elif rand_num == 3 :
155
+ status_color = 'cyan'
156
+ elif rand_num == 4 :
157
+ status_color = 'bright_green'
158
+ elif rand_num == 5 :
159
+ status_color = 'bright_blue'
160
+
161
+ return ansi .style (self .visible_prompt , fg = status_color )
148
162
149
163
def _alerter_thread_func (self ) -> None :
150
164
""" Prints alerts and updates the prompt any time the prompt is showing """
You can’t perform that action at this time.
0 commit comments