Since the module requires the pulseaudio daemon to be running, in order
to query system information such as the default source/sink and the
current volume, start the daemon, if necessary.
fixes#108
A previous commit broke the traffic module by deleting widgets during
each iteration. This is fatal as the widgets contain the traffic
information from the previous iteration, for delta calculation.
Store previous traffic data in the module itself instead.
In order to (hopefully) achieve localization independence, switch from
using pactl for retrieving pulseaudio information to pacmd, which seems
to be unaffected by the LANG environment variable.
fixes#103
To avoid "stray" devices being kept in the list, empty the widgets list
during each iteration and re-populate it from the list of available
interfaces.
fixes#101
The optional parameter "states" can now be used to filter which
interfaces to display. "^" can be used for negation.
For example, to only show "up" interfaces:
-p traffic.states=up
To show all interfaces not in "down" state:
-p traffic.states=^down
fixes#98
psutil.cpu_percent() only outputs to one decimal place anyway, so the trailing 0 is useless.
The prepended 0 is also not important, will only be not 0 at 100% utilization, so why not let it be 100% then and take up one less column otherwise?
No change to default behaviour, but adds boolean to only display used rather than used, total and percentage.
To only show used memory:
-p memory.usedonly=1
OK - I admit it: Mostly for the benefit of Travis and automated testing,
which complains about the DBusException, move to a more generic
exception.
However, this is probably a good idea anyhow, because independently of
the error, setting the song to an empty string is probably the best bet.
Allow the user to filter the state of devices that should be displayed.
It's possible to use both white- and blacklists (and combinations).
For example, to only show devices in state "up":
-p nic.states=up
To only show devices that are not down:
-p nic.states=^down
fixes#84
For modules that use aliases, until now, *only* the alias theme was
considered. This is typically a bad idea (tm), as the "generic" case is
that of a module theme (e.g. "disk", not that of a theme per instance of
the module (i.e. "home", "root", etc.)).
Therefore, introduce the concept of a "class" theme that can be
optionall overridden by a specific module theme.
As a pleasant side-effect, this should bring back the disk icons for all
instances of the disk module :)
fixes#79