Age | Commit message (Collapse) | Author |
|
Exposed via -f with_freebsd flag, uses sysctl to query battery status.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
The first option applied here is a default value for a field that's not always
reported to be there, namely the 'weather' field. It now defaults to saying
"normal" instead of displaying an empty string.
|
|
|
|
|
|
|
|
|
|
The DateZone plugin calls `getTimeZoneSeriesFromOlsonFile` using the
hard-coded path /usr/share/zoneinfo. While that may work just fine on
most Linux distros, it does not work on NixOS since that directory is
always locates somewhere under /nix/store.
Based on mild research, it seems the environment variable TZDIR is
commonly set to the absolute path to `zoneinfo` (but without a trailing
slash).
This change modifies the DateZone plugin to first try getting
the zoneinfo path from the TZDIR environment variable, falling back
to the hard-coded path /usr/share/zoneinfo
|
|
|
|
- use strict ByteString as the Lazy version of readFile allocates a 32k
buffer even though we usually need much less (isUp needs a few bytes)
- refactor NetDev datatype and use unsafeInterleaveIO in isUp to avoid
reading the operstate file entirely if we're not interested in that
device
- postpone ByteString unpacking in netParser to shave off some cycles,
and avoid ByteString unpacking in isUp entirely
On my system with 8 network devices (and more if docker is up), this
seems to reduce xmobar's CPU usage noticeably. I have two "Run Network"
in xmobar configuration, for eth and wlan, so without these changes,
xmobar would evaluate isUp 16 times a second, and each evaluation would
allocate a buffer for the IO Handle and then another buffer for the lazy
ByteString readFile. Now it only does isUp once for every device I'm
interested in, and the only large buffers allocated are the IO Handle
ones (getting rid of these isn't worth the code complexity).
|
|
|
|
|
|
* add filtering option for Net devices
* relate to comments
* upd readme
* add few more words to readme
|
|
This time taking into account that ~/.config/xmobar could be populated
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
[low,medium,high]String
|
|
|
|
|
|
This fixes printing of Kbd from terminate(ctrl_alt_bksp)
to RU as expected given this config stanza:
, Run Kbd [("us", "US"), ("ru", "RU")]
and this layout:
% setxkbmap -print
xkb_keymap {
xkb_keycodes { include "xfree86+aliases(qwerty)" };
xkb_types { include "complete" };
xkb_compat { include "complete" };
xkb_symbols { include "pc+us+inet(pc105)+terminate(ctrl_alt_bksp)+ru:2+capslock(grouplock)" };
xkb_geometry { include "pc(pc105)" };
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Write xmobar.errors to XMOBAR_DATA_DIR, not XMOBAR_CONFIG_DIR. This
allows XMOBAR_CONFIG_DIR to be read-only. This brings xmobar into
alignment with how xmonad manages its analogous directories (before this
change, a read-only DATA dir worked with xmonad but not with xmobar).
|
|
|
|
|