Age | Commit message (Collapse) | Author |
|
|
|
Read /proc/mounts if /etc/mtab can't be read
|
|
Fix error messages
|
|
|
|
|
|
Support non-consecutive CPUs
|
|
Fixes #308
|
|
print_cpu_usage: fix invalid %cpu placeholder output
|
|
|
|
Currently, the module cpu_usage prints %cpu0 information for the invalid
%cpu placeholder (i.e. the cpu number is missing).
Consider the following configuration.
order += "cpu_usage"
cpu_usage {
format = "cpu0=%cpu0 cpu1=%cpu1 cpu=%cpu"
# missing cpu number -------------------^
}
The configuration above produces the output below.
$ i3status -c config
i3status: trying to auto-detect output_format setting
i3status: auto-detected "term"
cpu0=-2% cpu1=-49% cpu=-2%
cpu0=06% cpu1=02% cpu=06%
cpu0=05% cpu1=06% cpu=05%
...
The module prints %cpu0 at the third placeholder where it should report
an error.
This commit fixes this behavior by initializing `number' to -1. If the
cpu is missing in %cpu placeholder, the sscanf function does not set
`number'. Because `number' is -1 (lower to 0), an error is reported and
the placeholder is skipped.
$ i3status -c ./config
i3status: trying to auto-detect output_format setting
i3status: auto-detected "term"
provided CPU number '-1' above detected number of CPU 4
cpu0= cpu1=-48% cpu=
provided CPU number '-1' above detected number of CPU 4
cpu0= cpu1=11% cpu=
provided CPU number '-1' above detected number of CPU 4
cpu0= cpu1=03% cpu=
...
|
|
man: fix typo for max_threshold in load
|
|
Floating values use a dot (not a comma).
Fixes:
invalid floating point value for option 'max_threshold'
|
|
The rationale of the code is explained in the header:
http://git.alsa-project.org/?p=alsa-utils.git;a=blob;f=alsamixer/volume_mapping.c;h=1c0d7c45e6686239464e1b0bbc8983ea57f3914f;hb=HEAD
> The mapping is designed so that the position in the interval is
> proportional to the volume as a human ear would perceive it (i.e., the
> position is the cubic root of the linear sample multiplication
> factor).
and the commit message:
http://git.alsa-project.org/?p=alsa-utils.git;a=commit;h=34bb514b5fd1d6f91ba9a7b3a70b0ea0c6014250
> use a mapping where the bar height is proportional to the audible
> volume, i.e., where the amplitude is the cube of the bar height.
and further explanation can be found in the pull request:
https://github.com/i3/i3status/pull/268#pullrequestreview-147429763
|
|
strlen already assumes that the string is NULL-terminated.
Fixes -Wstringop-overflow warning
|
|
Add support for "POWER_SUPPLY_STATUS=Not charging" (fixes #304)
|
|
|
|
|
|
Added %interface to the ethernet options
|
|
|
|
Fix for issue 300: Correctly print usage for cpu 10
|
|
|
|
switch to clang 3.8 & ignore include sort order
|
|
Detect interface type on DragonFly BSD
|
|
|
|
Do not use pulseaudio for DragonFly BSD
|
|
|
|
|
|
able to print percentage
|
|
|
|
its now possible to have percentage before and after a variable. except
for the date. But percentage with dates does not make much sense to me, so
i skipped it.
|
|
Read multiple batteries on DragonFly BSD.
|
|
fix min_width doc
|
|
|
|
|
|
forgot to remove memory discussion from man page (it is implemented)
|
|
|
|
add format_quality option in wireless
|
|
|
|
hide seconds in battery by default
|
|
Stop requiring CAP_NET_ADMIN
|
|
|
|
Since the following commit in the Linux kernel tree
0fdc100bdc4b ethtool: allow non-netadmin to query settings
it is no longer necessary to have the CAP_NET_ADMIN capability to query
a device speed using ioctl(..., SIOCETHTOOL) in conjonction with the
ETHTOOL_GSET ethtool command.
The mentioned commit landed first in the 2.6.37 version of the Kernel.
This version is no longer maintained nowdays.
Since it is not necessary anymore, it is strongly prefered from a
security standpoint to drop the CAP_NET_ADMIN capability from the
binary.
Signed-off-by: Olivier Gayot <olivier.gayot@sigexec.com>
|
|
Fix potential issues & avoid unnecessary instructions
|
|
Calling globfree(NULL) is undefined behaviour. In Linux (glibc), it
results in a segmentation fault.
It is also undefined behaviour to call globfree(&pglob) if a previous
call to glob(&pglob) returned an error.
Signed-off-by: Olivier Gayot <olivier.gayot@sigexec.com>
|
|
The function slurp_all_batteries(), on Linux, allocates memory
dynamically
Signed-off-by: Olivier Gayot <olivier.gayot@sigexec.com>
|
|
The manual of glob(3) says that the function returns 0 on successful
completion. Any other integer value should be considered an error, not
only negative integers.
In practice, *BSD systems use negative values but Linux uses positive
integers.
Signed-off-by: Olivier Gayot <olivier.gayot@sigexec.com>
|
|
Compiling on Linux with -Wundef produces the following warning:
warning: "__OpenBSD__" is not defined, evaluates to 0 [-Wundef]
Signed-off-by: Olivier Gayot <olivier.gayot@sigexec.com>
|
|
Signed-off-by: Olivier Gayot <olivier.gayot@sigexec.com>
|
|
Signed-off-by: Olivier Gayot <olivier.gayot@sigexec.com>
|
|
Before the following change
f947d0a Breaks configfiles! Major refactoring of i3status, see below
The die(fmt, ...) function was outputting the reason to the status bar
in addition to stderr. For this reason, it was meaningful to create a
temporary string according to the format string and then passing it
around to the different functions.
Nowadays, we only display the error message to stderr so calling
fprintf(stderr, ...) is much simpler.
Signed-off-by: Olivier Gayot <olivier.gayot@sigexec.com>
|