valr/cbatticon — pull request #14 by hasufell (2014-08-11 14:53:36+00:00)
Title: allow ac only state and make libnotify optional

Since xfce4 has removed the tray icon for power manager, I thought I fix cbatticon to work even if there is no battery whatsoever (e.g. on my desktop). In that case it shows the ac-adapter icon and allows a custom left-click command.

I think that is reasonably low overhead. However, I had to remove a few `g_return_val_if_fail()` checks to make that codepath work. Please double check if that is ok.

If you don't like the libnotify ifdefs, just cherry pick the other stuff then.