]> git.sur5r.net Git - i3/i3status/log
i3/i3status
5 years agoImplement %devicename specifier for volume module (#325)
Denton Liu [Wed, 23 Jan 2019 07:45:51 +0000 (23:45 -0800)]
Implement %devicename specifier for volume module (#325)

This commit implements the %devicename specifier for the volume module
for both PulseAudio and ALSA. This way, i3status will be able to display
the specific device that corresponds to the volume indicator.

Note that this is not implemented for the OSS API but is left in a state
where someone can pick it up for the future.

5 years agoMerge pull request #328 from jdevelop/fix/capture-volume-status
Ingo Bürk [Sun, 13 Jan 2019 17:54:14 +0000 (18:54 +0100)]
Merge pull request #328 from jdevelop/fix/capture-volume-status

Fixed ALSA capture device monitoring.

5 years agoFixed ALSA capture device monitoring. 328/head
Eugene Dzhurinsky [Fri, 28 Dec 2018 17:17:53 +0000 (12:17 -0500)]
Fixed ALSA capture device monitoring.

When using ALSA, the "Capture" mixer doesn't have the playback channel,
instead "capture"-related methods should be used to get information
about the current volume / state of the mixer.

6 years agoMerge pull request #321 from eplanet/autodisplay-tz
Ingo Bürk [Sat, 17 Nov 2018 15:28:38 +0000 (16:28 +0100)]
Merge pull request #321 from eplanet/autodisplay-tz

Add timezone switch

6 years agoCorrections according to PR review 321/head
eplanet [Thu, 15 Nov 2018 21:27:23 +0000 (22:27 +0100)]
Corrections according to PR review

6 years agoAdd timezone switch
eplanet [Sat, 10 Nov 2018 09:47:05 +0000 (10:47 +0100)]
Add timezone switch

6 years agoMerge pull request #319 from eplanet/fix-etc-mtab
Orestis [Thu, 8 Nov 2018 09:52:47 +0000 (11:52 +0200)]
Merge pull request #319 from eplanet/fix-etc-mtab

Read /proc/mounts if /etc/mtab can't be read

6 years agoMerge pull request #320 from eplanet/fix-error-msg
Ingo Bürk [Thu, 8 Nov 2018 07:01:23 +0000 (07:01 +0000)]
Merge pull request #320 from eplanet/fix-error-msg

Fix error messages

6 years agoRead /proc/mounts if /etc/mtab can't be read 319/head
eplanet [Wed, 7 Nov 2018 21:39:22 +0000 (22:39 +0100)]
Read /proc/mounts if /etc/mtab can't be read

6 years agoFix error messages 320/head
eplanet [Wed, 7 Nov 2018 22:00:22 +0000 (23:00 +0100)]
Fix error messages

6 years agoMerge pull request #309 from TwentyFourD/NonConsecutiveCPUs
Orestis [Mon, 5 Nov 2018 10:32:21 +0000 (12:32 +0200)]
Merge pull request #309 from TwentyFourD/NonConsecutiveCPUs

Support non-consecutive CPUs

6 years agoprint_cpu_usage.c: Support non-consecutive CPUs 309/head
TwentyFourD [Sat, 22 Sep 2018 16:55:53 +0000 (17:55 +0100)]
print_cpu_usage.c: Support non-consecutive CPUs

Fixes #308

6 years agoMerge pull request #318 from gportay/fix-invalid-cpu-placeholder
Ingo Bürk [Fri, 26 Oct 2018 07:24:45 +0000 (09:24 +0200)]
Merge pull request #318 from gportay/fix-invalid-cpu-placeholder

print_cpu_usage: fix invalid %cpu placeholder output

6 years agoAdd testcase for invalid %cpu placeholder 318/head
Gaël PORTAY [Tue, 23 Oct 2018 14:58:29 +0000 (10:58 -0400)]
Add testcase for invalid %cpu placeholder

6 years agoprint_cpu_usage: fix invalid %cpu placeholder output
Gaël PORTAY [Sun, 21 Oct 2018 22:37:45 +0000 (18:37 -0400)]
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=
...

6 years agoMerge pull request #315 from gportay/fix-typo-in-man
Orestis [Thu, 18 Oct 2018 23:08:53 +0000 (02:08 +0300)]
Merge pull request #315 from gportay/fix-typo-in-man

man: fix typo for max_threshold in load

6 years agoman: fix typo for max_threshold in load 315/head
Gaël PORTAY [Thu, 18 Oct 2018 21:25:37 +0000 (17:25 -0400)]
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'

6 years agoProvide a more natural volume percentage with ALSA.
arcnmx [Wed, 21 Feb 2018 18:25:08 +0000 (13:25 -0500)]
Provide a more natural volume percentage with ALSA.

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

6 years agostrncpy + strlen is pointless (#312)
Orestis [Sun, 7 Oct 2018 18:26:24 +0000 (21:26 +0300)]
strncpy + strlen is pointless (#312)

strlen already assumes that the string is NULL-terminated.

Fixes -Wstringop-overflow warning

6 years agoMerge pull request #305 from David96/master
Ingo Bürk [Tue, 4 Sep 2018 09:58:58 +0000 (11:58 +0200)]
Merge pull request #305 from David96/master

 Add support for "POWER_SUPPLY_STATUS=Not charging" (fixes #304)

6 years agoAdd testcase for #304 305/head
David96 [Mon, 3 Sep 2018 18:51:48 +0000 (20:51 +0200)]
Add testcase for #304

6 years agoAdd support for "POWER_SUPPLY_STATUS=Not charging" (fixes #304)
David96 [Mon, 3 Sep 2018 18:50:36 +0000 (20:50 +0200)]
Add support for "POWER_SUPPLY_STATUS=Not charging" (fixes #304)

6 years agoMerge pull request #302 from coderonline/master
Ingo Bürk [Mon, 27 Aug 2018 09:11:41 +0000 (11:11 +0200)]
Merge pull request #302 from coderonline/master

Added %interface to the ethernet options

6 years agoAdded %interface to the ethernet options 302/head
Max Christian Pohle [Fri, 24 Aug 2018 21:43:35 +0000 (23:43 +0200)]
Added %interface to the ethernet options

6 years agoMerge pull request #301 from wmarvel/issue300
Ingo Bürk [Wed, 1 Aug 2018 11:49:27 +0000 (13:49 +0200)]
Merge pull request #301 from wmarvel/issue300

Fix for issue 300: Correctly print usage for cpu 10

6 years agoFix for issue 300: Correctly print usage for cpu 10 301/head
= [Tue, 31 Jul 2018 05:27:13 +0000 (00:27 -0500)]
Fix for issue 300: Correctly print usage for cpu 10

6 years agoMerge pull request #296 from Stunkymonkey/include-order
Ingo Bürk [Mon, 16 Jul 2018 14:18:06 +0000 (16:18 +0200)]
Merge pull request #296 from Stunkymonkey/include-order

switch to clang 3.8 & ignore include sort order

6 years agoMerge pull request #299 from tuxillo/patch-2
Ingo Bürk [Mon, 16 Jul 2018 14:13:47 +0000 (16:13 +0200)]
Merge pull request #299 from tuxillo/patch-2

Detect interface type on DragonFly BSD

6 years agoDetect interface type on DragonFly BSD 299/head
Antonio Huete Jimenez [Sun, 15 Jul 2018 20:55:01 +0000 (20:55 +0000)]
Detect interface type on DragonFly BSD

6 years agoMerge pull request #298 from tuxillo/patch-1
Ingo Bürk [Sun, 15 Jul 2018 19:47:26 +0000 (21:47 +0200)]
Merge pull request #298 from tuxillo/patch-1

Do not use pulseaudio for DragonFly BSD

6 years agoDo not use pulseaudio for DragonFly BSD 298/head
Antonio Huete Jimenez [Sat, 14 Jul 2018 20:22:55 +0000 (20:22 +0000)]
Do not use pulseaudio for DragonFly BSD

6 years agoclang-format-3.8 fix travis error 296/head
Felix Buehler [Fri, 13 Jul 2018 14:28:22 +0000 (16:28 +0200)]
clang-format-3.8 fix travis error

6 years agoMerge pull request #297 from Stunkymonkey/percent-first
Ingo Bürk [Fri, 13 Jul 2018 13:17:51 +0000 (15:17 +0200)]
Merge pull request #297 from Stunkymonkey/percent-first

able to print percentage

6 years agofix clang errors
Felix Buehler [Sun, 8 Jul 2018 11:59:21 +0000 (13:59 +0200)]
fix clang errors

6 years agoable to print percentage 297/head
Felix Buehler [Sat, 2 Jun 2018 00:32:25 +0000 (02:32 +0200)]
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.

6 years agoMerge pull request #256 from oyvinht/master
Ingo Bürk [Fri, 13 Jul 2018 10:31:04 +0000 (12:31 +0200)]
Merge pull request #256 from oyvinht/master

Read multiple batteries on DragonFly BSD.

6 years agoMerge pull request #295 from Stunkymonkey/fix-min_width-docs
Ingo Bürk [Fri, 13 Jul 2018 10:27:28 +0000 (12:27 +0200)]
Merge pull request #295 from Stunkymonkey/fix-min_width-docs

fix min_width doc

6 years agoswitch to clang 3.8 & ignore sort oder of includes
Felix Buehler [Sun, 8 Jul 2018 11:44:02 +0000 (13:44 +0200)]
switch to clang 3.8 & ignore sort oder of includes

6 years agofix min_width doc 295/head
Felix Buehler [Sat, 7 Jul 2018 20:57:39 +0000 (22:57 +0200)]
fix min_width doc

6 years agoMerge pull request #294 from Stunkymonkey/remove_memory_discussion
Ingo Bürk [Sat, 30 Jun 2018 04:52:58 +0000 (06:52 +0200)]
Merge pull request #294 from Stunkymonkey/remove_memory_discussion

forgot to remove memory discussion from man page (it is implemented)

6 years agoforgot to remove memory discussion from man page (it is implemented) 294/head
Felix Buehler [Fri, 29 Jun 2018 22:52:59 +0000 (00:52 +0200)]
forgot to remove memory discussion from man page (it is implemented)

6 years agoMerge pull request #292 from Stunkymonkey/format_quality
Ingo Bürk [Fri, 29 Jun 2018 21:10:53 +0000 (23:10 +0200)]
Merge pull request #292 from Stunkymonkey/format_quality

add format_quality option in wireless

6 years agoadd format_quality option in wireless 292/head
Felix Buehler [Thu, 28 Jun 2018 20:16:37 +0000 (22:16 +0200)]
add format_quality option in wireless

6 years agoMerge pull request #293 from Stunkymonkey/hide_seconds_battery
Ingo Bürk [Fri, 29 Jun 2018 20:49:52 +0000 (22:49 +0200)]
Merge pull request #293 from Stunkymonkey/hide_seconds_battery

hide seconds in battery by default

6 years agoMerge pull request #291 from duskCoder/cap_net_admin
Ingo Bürk [Fri, 29 Jun 2018 20:43:39 +0000 (22:43 +0200)]
Merge pull request #291 from duskCoder/cap_net_admin

Stop requiring CAP_NET_ADMIN

6 years agohide seconds in battery by default 293/head
Felix Buehler [Fri, 29 Jun 2018 11:35:20 +0000 (13:35 +0200)]
hide seconds in battery by default

6 years agoStop requiring CAP_NET_ADMIN 291/head
Olivier Gayot [Wed, 20 Jun 2018 16:09:41 +0000 (18:09 +0200)]
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>
6 years agoMerge pull request #290 from duskCoder/changes
Ingo Bürk [Fri, 22 Jun 2018 11:55:09 +0000 (13:55 +0200)]
Merge pull request #290 from duskCoder/changes

Fix potential issues & avoid unnecessary instructions

6 years agoPrevent potential crash if glob() fails 290/head
Olivier Gayot [Wed, 20 Jun 2018 11:41:59 +0000 (13:41 +0200)]
Prevent potential crash if glob() fails

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>
6 years agoFix potential memory leak on Linux
Olivier Gayot [Wed, 20 Jun 2018 09:58:10 +0000 (11:58 +0200)]
Fix potential memory leak on Linux

The function slurp_all_batteries(), on Linux, allocates memory
dynamically

Signed-off-by: Olivier Gayot <olivier.gayot@sigexec.com>
6 years agoFix invalid handling of glob() errors on Linux
Olivier Gayot [Wed, 20 Jun 2018 09:42:59 +0000 (11:42 +0200)]
Fix invalid handling of glob() errors on Linux

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>
6 years agoFix use of undefined macro __OpenBSD__
Olivier Gayot [Tue, 19 Jun 2018 17:25:15 +0000 (19:25 +0200)]
Fix use of undefined macro __OpenBSD__

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>
6 years agoAvoid assigning a new value to a var before using the old value
Olivier Gayot [Wed, 13 Jun 2018 07:53:50 +0000 (09:53 +0200)]
Avoid assigning a new value to a var before using the old value

Signed-off-by: Olivier Gayot <olivier.gayot@sigexec.com>
6 years agoMake sure the arguments passed to printf/die(...) match the format
Olivier Gayot [Tue, 12 Jun 2018 07:41:44 +0000 (09:41 +0200)]
Make sure the arguments passed to printf/die(...) match the format

Signed-off-by: Olivier Gayot <olivier.gayot@sigexec.com>
6 years agoNo longer use a temporary buffer in the die() function
Olivier Gayot [Mon, 11 Jun 2018 22:52:29 +0000 (00:52 +0200)]
No longer use a temporary buffer in the die() function

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>
6 years agoMerge pull request #289 from bebehei/testsuite
Ingo Bürk [Wed, 20 Jun 2018 06:39:59 +0000 (08:39 +0200)]
Merge pull request #289 from bebehei/testsuite

Testsuite

6 years agoShow differing results, if testcase fails 289/head
Benedikt Heine [Tue, 19 Jun 2018 15:15:28 +0000 (17:15 +0200)]
Show differing results, if testcase fails

6 years agoRun all travis tests and expose the final result as exit code
Benedikt Heine [Tue, 19 Jun 2018 14:58:15 +0000 (16:58 +0200)]
Run all travis tests and expose the final result as exit code

6 years agoExpose the testsuite in the Makefile
Benedikt Heine [Tue, 19 Jun 2018 14:56:48 +0000 (16:56 +0200)]
Expose the testsuite in the Makefile

6 years agoFail the tests, if i3status actually crashes
Benedikt Heine [Tue, 19 Jun 2018 14:44:37 +0000 (16:44 +0200)]
Fail the tests, if i3status actually crashes

6 years agoMerge pull request #287 from eplanet/emeric/man_typo
Ingo Bürk [Sat, 16 Jun 2018 12:49:09 +0000 (14:49 +0200)]
Merge pull request #287 from eplanet/emeric/man_typo

Fix man typo

6 years agoFix man typo 287/head
eplanet [Thu, 14 Jun 2018 20:09:03 +0000 (22:09 +0200)]
Fix man typo

6 years agoMerge pull request #286 from duskCoder/#283
Ingo Bürk [Mon, 11 Jun 2018 20:18:53 +0000 (22:18 +0200)]
Merge pull request #286 from duskCoder/#283

Fix issue #283 (shown IP belonging to wrong network interface)

6 years agoFix shown IP address belonging to wrong interface 286/head
Olivier Gayot [Mon, 4 Jun 2018 17:59:15 +0000 (19:59 +0200)]
Fix shown IP address belonging to wrong interface

The following commit:

  6a75ea9 Show IP address when address has a label

introduced a way to show the IP address of an interface when a label is
associated to the IP.

When a label is associated to an IP, the structure returned by
getifaddrs() has the label concatenated to the interface name in the
.ifa_name field as in the following example:

    struct ifaddrs ifaddr = {
       .ifa_name = "eth0:mylabel",
    };

As a consequence, using a strict comparison between the interface name
and the .ifa_name field yields a falsy result. However, checking if the
.ifa_name starts with the interface name (e.g. eth0) does not work
either because other network interfaces can have a name which starts
with eth0.

This commit solves the issue by stripping out the optional label from
the .ifa_name field before making a strict comparison with the interface
name.

Fix #283

Signed-off-by: Olivier Gayot <olivier.gayot@sigexec.com>
6 years agoSimplify the algorithm used to determine the IP address
Olivier Gayot [Mon, 4 Jun 2018 17:59:09 +0000 (19:59 +0200)]
Simplify the algorithm used to determine the IP address

Signed-off-by: Olivier Gayot <olivier.gayot@sigexec.com>
6 years agoMerge pull request #282 from Stunkymonkey/mem-support
Ingo Bürk [Tue, 22 May 2018 04:57:45 +0000 (06:57 +0200)]
Merge pull request #282 from Stunkymonkey/mem-support

fix wrong memory-documentation

6 years agofix wrong memory-documentation 282/head
Felix Buehler [Tue, 22 May 2018 00:07:28 +0000 (02:07 +0200)]
fix wrong memory-documentation

6 years agoMerge pull request #270 from Stunkymonkey/mem-support
Ingo Bürk [Sat, 19 May 2018 20:08:42 +0000 (22:08 +0200)]
Merge pull request #270 from Stunkymonkey/mem-support

initial support of memory-usage for linux

6 years agoMerge pull request #281 from eplanet/fix_warnings
Orestis [Tue, 15 May 2018 11:46:06 +0000 (14:46 +0300)]
Merge pull request #281 from eplanet/fix_warnings

Fix MacOS build

6 years agoFix MacOS build 281/head
eplanet [Tue, 15 May 2018 11:34:36 +0000 (13:34 +0200)]
Fix MacOS build

6 years agorelease v2.12 2.12
Michael Stapelberg [Fri, 11 May 2018 09:06:00 +0000 (11:06 +0200)]
release v2.12

6 years agoSimplify the memory thresholds 270/head
Benedikt Heine [Mon, 16 Apr 2018 16:18:50 +0000 (18:18 +0200)]
Simplify the memory thresholds

6 years agoRename ram variables consistently
Benedikt Heine [Mon, 16 Apr 2018 13:41:13 +0000 (15:41 +0200)]
Rename ram variables consistently

6 years agoImplement support for memory-usage on Linux
Felix Buehler [Tue, 20 Mar 2018 14:35:28 +0000 (15:35 +0100)]
Implement support for memory-usage on Linux

6 years agoMerge pull request #275 from winks/patch-2
Ingo Bürk [Sun, 8 Apr 2018 13:53:19 +0000 (15:53 +0200)]
Merge pull request #275 from winks/patch-2

Fix NULL value on OpenBSD when there is no acpitz0

6 years agoFix NULL value on OpenBSD when there is no acpitz0 275/head
Florian Anderiasch [Fri, 6 Apr 2018 17:54:12 +0000 (19:54 +0200)]
Fix NULL value on OpenBSD when there is no acpitz0

Using %degrees on OpenBSD resulted in garbage values if sysctl doesn't
know about any cpu temperature sensors.

6 years agoMerge pull request #213 from dlrobertson/addr_description
Ingo Bürk [Thu, 29 Mar 2018 10:50:56 +0000 (12:50 +0200)]
Merge pull request #213 from dlrobertson/addr_description

Show IP address when address has a label

6 years agoShow IP address when address has a label 213/head
Dan Robertson [Wed, 22 Mar 2017 00:39:49 +0000 (00:39 +0000)]
Show IP address when address has a label

If an address has been added with a label, ensure the correct address is
shown.

6 years agoRead multiple batteries on DragonFly BSD. 256/head
Øyvin Halfdan Thuv [Wed, 13 Dec 2017 12:46:50 +0000 (13:46 +0100)]
Read multiple batteries on DragonFly BSD.

Using ACPI to read individual battery information instead of just
accumulations from sysctl.

6 years agoMerge pull request #264 from foutaise/master
Ingo Bürk [Tue, 27 Mar 2018 07:27:43 +0000 (09:27 +0200)]
Merge pull request #264 from foutaise/master

Make iface_type() work on FreeBSD

6 years agoMerge branch 'master' into master 264/head
Ingo Bürk [Tue, 27 Mar 2018 07:26:55 +0000 (09:26 +0200)]
Merge branch 'master' into master

6 years agoMerge pull request #251 from tomaskrizek/man-eth-wireless-format
Ingo Bürk [Tue, 27 Mar 2018 07:10:51 +0000 (09:10 +0200)]
Merge pull request #251 from tomaskrizek/man-eth-wireless-format

man: explicitly use format_up/format_down in ethernet, wireless conf

6 years agoMerge pull request #243 from jasperla/fei_error
Ingo Bürk [Tue, 27 Mar 2018 07:07:53 +0000 (09:07 +0200)]
Merge pull request #243 from jasperla/fei_error

Remove overly aggressive #error

6 years agoMerge pull request #266 from moreais/master
Ingo Bürk [Mon, 12 Feb 2018 15:32:01 +0000 (16:32 +0100)]
Merge pull request #266 from moreais/master

OpenBSD: fix volume display on some hardware

6 years agoOpenBSD: fix volume display on some hardware 266/head
Carlin Bingham [Mon, 12 Feb 2018 13:12:04 +0000 (02:12 +1300)]
OpenBSD: fix volume display on some hardware

On some hardware the AUDIO_MIXER_READ ioctl requires the current number
of channels to be set, and the mute device found needs to be checked if
it belongs to the master output device.

6 years agoMake iface_type() work on FreeBSD
Gerome Fournier [Wed, 7 Feb 2018 10:26:34 +0000 (11:26 +0100)]
Make iface_type() work on FreeBSD

6 years agoMerge pull request #262 from foutaise/master
Ingo Bürk [Tue, 6 Feb 2018 11:56:53 +0000 (12:56 +0100)]
Merge pull request #262 from foutaise/master

Add check for interval value

6 years agoAdd check for interval value 262/head
foutaise [Tue, 6 Feb 2018 11:30:04 +0000 (12:30 +0100)]
Add check for interval value

6 years agoMerge pull request #261 from tylerbrazier/no-sloc
Ingo Bürk [Sat, 3 Feb 2018 08:36:36 +0000 (09:36 +0100)]
Merge pull request #261 from tylerbrazier/no-sloc

Remove SLOC comment from man page

6 years agoRemove SLOC comment from man page 261/head
Tyler Brazier [Fri, 2 Feb 2018 19:05:46 +0000 (13:05 -0600)]
Remove SLOC comment from man page

This changed happened for the readme in
73620dc876d7f76b9a6771048c5ad0ade94e5bd7

6 years agoTreat zero battery capacity as "not available" (#259)
johcgt [Sun, 28 Jan 2018 14:37:51 +0000 (14:37 +0000)]
Treat zero battery capacity as "not available" (#259)

`print_battery_info` computes `batt_info.percentage_remaining` by
dividing batt_info.remaining by `full`. If `full` is `0` then the
battery remaining will be reported as "inf".

Before this, it tries to set `full` to either the design capacity or to
the last known good charge. It determines if these values are available
by checking whether their fields in `batt_info` are non-negative. As it
initialized `batt_info` with values of `-1`, a non-negative value
implies that something has provided a value.

`slurp_all_batteries` and `add_battery_info` however initialize these
fields to zero, so if these functions are called then
`batt_info.full_design` will always be used.

This means that on systems that don't provide a value for design
capacity the percentage remaining will be reported as "inf", unless the
user has set `last_full_capacity` to `true` in their `i3status.conf`.

This patch changes `print_battery_info` to expect values for the battery
capacity to be strictly greater than zero. This seems reasonable as a
battery with a capacity of zero isn't useful.

An alternative solution would be to change `slurp_all_batteries` and
`add_battery_info` to initialize `batt_info` with `-1`, as
`print_battery_info` does. This is less appealing as `add_battery_info`
is accumulating the values, so using `-1` would introduce off-by-one
errors without additional code to avoid them.

6 years agoMerge pull request #255 from eplanet/update_readme
Ingo Bürk [Tue, 12 Dec 2017 17:07:19 +0000 (18:07 +0100)]
Merge pull request #255 from eplanet/update_readme

Get rid of the SLOC comment

6 years agoGet rid of the SLOC comment 255/head
eplanet [Mon, 11 Dec 2017 21:50:16 +0000 (22:50 +0100)]
Get rid of the SLOC comment

6 years agoUpdate comment as in #247 (#254)
Emeric Planet [Mon, 11 Dec 2017 11:16:00 +0000 (12:16 +0100)]
Update comment as in #247 (#254)

6 years agoAdd IPv6 address when IPv4 isn't available (#247)
Emeric Planet [Mon, 11 Dec 2017 10:38:31 +0000 (11:38 +0100)]
Add IPv6 address when IPv4 isn't available (#247)

6 years agoMerge pull request #253 from eplanet/always_reload_tz
Ingo Bürk [Sat, 9 Dec 2017 15:17:42 +0000 (16:17 +0100)]
Merge pull request #253 from eplanet/always_reload_tz

Call tzset at each time print

6 years agoCall tzset at each time print 253/head
eplanet [Sat, 9 Dec 2017 14:48:18 +0000 (15:48 +0100)]
Call tzset at each time print

6 years agoMerge pull request #252 from GuyOfThePery/patch-1
Ingo Bürk [Sat, 9 Dec 2017 12:36:27 +0000 (13:36 +0100)]
Merge pull request #252 from GuyOfThePery/patch-1

Fixed minor typos

6 years agoFixed minor typos 252/head
GuyOfThePery [Sat, 9 Dec 2017 11:24:11 +0000 (13:24 +0200)]
Fixed minor typos

"you can chose" -> "you can choose"

"You can either disable the default separator altogether setting it to the empty string." -> " You can also disable the default separator altogether by setting it to the empty string."

6 years agoman: explicitly use format_up/format_down in ethernet, wireless conf 251/head
Tomas Krizek [Sun, 3 Dec 2017 13:46:54 +0000 (14:46 +0100)]
man: explicitly use format_up/format_down in ethernet, wireless conf

Clearly indicate format_up and format_down are used for configuring ethernet
and wireless sections instead of format.

Signed-off-by: Tomas Krizek <tomas.krizek@mailbox.org>