diff --git a/herbstluftwm/panel_content.py b/herbstluftwm/panel_content.py index 99b06fa..3a3ea44 100755 --- a/herbstluftwm/panel_content.py +++ b/herbstluftwm/panel_content.py @@ -2,6 +2,7 @@ import hl_utils import string +import re sep = " | " @@ -89,6 +90,9 @@ def irc(): user = tmp[-1].split(" ")[1][:15] if not "%push" in msg: return "" + pattern = re.compile("(\^+fg[(]+#[0-9]+[)]+)|\n|\r|\t") + msg = re.sub(pattern,msg,"ESC_SEQ") + user = re.sub(pattern,user,"ESC_SEQ") ret_string = "MSG FROM: "+user+"-> "+msg.rstrip('\n')+" - [ "+str(len(tmp))+" total ]" return color_panel(ret_string,RED) except(IOError):