moniker23
variable c can be sometimes non string object and the script crashes. i fixed it by explicit conversion of c to string. it happened to me when opened brave browser. interestingly enough when i did i3 reload, the error never occured. ``` r = re.compile(r'chrom|edge|signal|brave', re.I) fd = open("/tmp/libinput_discrete_deltay_multiplier", "r+b") m = mmap.mmap(fd.fileno(), 0, access=mmap.ACCESS_WRITE) def on_window_focus(i3loc, e): v = 1 c = e.container.window_class if r.search(str(c)): v = 6 m.seek(0) m.write(str(v).encode()) ```