Age | Commit message (Collapse) | Author |
|
NL80211 was introduced in Linux 2.6.24 in 2007 as a new extensible
universal API, replacing "wireless extensions" ioctls. It works on top
of netlink, and allows direct communication to cfg80211 kernel
subsystem. Since then it became a hard requirement for all upstream
wireless drivers to hook into cfg80211 (SoftMAC drivers do it via the
common mac80211 layer). There's still additional compatibility code that
allows limited Wext functionality for cfg80211 drivers but it's buggy
and can be disabled altogether when CONFIG_CFG80211_WEXT is not set.
This patch makes use of "netlink" Haskell library which doesn't have any
additional runtime dependencies (so neither iwlib nor libnl are
required). The operation is the same as performed by "iw dev <devname>
link" command.
The signal level is transformed to "quality" by first clamping it to
[-110; -40], then adding 110 and dividing by 70 (same meaningless
formula as used by the cfg80211 Wext compatibility layer).
"essid" template argument is replaced by more appropriate "ssid" (with
the old variant still available for backwards compatibility)
|
|
A preparation for timer coalescing: tenthSeconds is just a sleep whereas
doEveryTenthSeconds enables using a central timer and waiting for all
monitors to update before refreshing the window. This commit is just a
simple refactor, the actual timer coalescing code comes later.
|
|
The calculations are based on the assumption that current_now (or
power_now) are always positive. However, power_supply documentation in
the kernel sources say nothing about it, and so some drivers provide a
signed value (e.g. bq27xxx_battery_current).
Discovered and fixed on ac100/paz00 netbook.
|
|
|
|
|
|
|
|
|
|
This reverts commit 1f1f0bd8b811740c84215f9ed4fa5ebd8309a990.
|
|
This reverts commit efb6d6817c092fe08e9b0f1b8a17bddd29d97cdb.
|
|
|
|
|
|
|
|
|
|
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
|
|
|
|
|
|
|
|
[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)" };
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|