Archive for the ‘fix’ Category

xmobar on debian SID

Wednesday, June 17th, 2009

If you are using xmonad and xmobar on debian SID on a laptop, and don’t see any battery information, you may have test this solution.

If this didn’t solve your problem, try this patch on SysfsBatt.hs :

52c52
<     let path = sysfsPath ++ p ++ "/charge_full"
---
>     let path = sysfsPath ++ p ++ "/energy_full"
62c62
<     let path = sysfsPath ++ p ++ "/charge_now"
---
>     let path = sysfsPath ++ p ++ "/energy_now"
74c74
<     else showWithColors (printf "%.2f%%") stateInPercentage
---
>     else showWithColors (printf "Batt: %.2f%%") stateInPercentage

Then as before:

runhaskell Setup.lhs configure --user
runhaskell Setup.lhs build
runhaskell Setup.lhs install --user

Battery information should be visible.

offlineimap on osx

Tuesday, August 19th, 2008

If you are using offlineimap on leopard, on an imap connection with ssl (like gmail) and it keep crashing because of the following error:

  File "/Library/Python/2.5/site-packages/offlineimap/imaplibutil.py", line 70, in _read
    return self.sslsock.read(n)
MemoryError

you can fix it with this fix:

sudo vim /Library/Python/2.5/site-packages/offlineimap/imaplibutil.py +70

then, comment line 70 and add this line

        return self.sslsock.read(min(n, 16384))
        #return self.sslsock.read(n)

you can read a description of the bug here.