Commit Graph

741 Commits

Author SHA1 Message Date
Sam Newbold 300b31b2df
print_file_contents: allocate enough to include \0
related to #331
Previously, if max_chars was read, the null byte would be written
past the end of buf.
2019-06-10 16:36:18 +02:00
Dennis Vesterlund 9b5f6ae5f4 Added function to print content from file (#331)
Added a function to print file contents to status bar without newlines.
Added tests for print file contents function
Added manpage entry for file contents
2019-02-21 15:34:32 +01:00
Michael Stapelberg 9d28a661a7 configure.ac: complain when asciidoc cannot be found
related to #338
2019-02-11 21:45:20 +01:00
Michael Stapelberg fd484c6c58 configure.ac: complain when xmlto cannot be found
related to #338
2019-02-11 21:43:35 +01:00
Michael Stapelberg 4c047e3aa4 Makefile.am: s/I3LOCK/I3STATUS/ 2019-02-11 19:52:19 +01:00
Michael Stapelberg ee946d0d8c README: update build instructions 2019-02-11 09:52:23 +01:00
Ingo Bürk 49461ac56f
Merge pull request #336 from gokcehan/patch-1
default config: move disk info out of network info
2019-02-03 14:42:32 +01:00
gokcehan 478064800b
default config: move disk info out of network info
By default, disk info is found in a strange place in between ipv6 and wireless information. This commit puts it in between other performance meters. Settings in the file are also now sorted according to their places in the order.
2019-02-03 16:38:17 +03:00
Ingo Bürk 1f3fe73b36
Merge pull request #334 from stapelberg/speed
fix ethernet speed display for 100 Gbit/s cards
2019-01-27 22:40:46 +01:00
Michael Stapelberg 0e4fd9ad4a fix ethernet speed display for 100 Gbit/s cards
Before this fix, i3status would display 34464 Mbit/s instead of 100000 Mbit/s,
because it was only looking at ecmd.speed, ignoring ecmd.speed_hi.
2019-01-27 22:32:47 +01:00
Ingo Bürk e36966d49c
Merge pull request #333 from stapelberg/sysconfdir
fix: use SYSCONFDIR in error message
2019-01-27 22:22:34 +01:00
Michael Stapelberg 0f4fbf70af fix: use SYSCONFDIR in error message 2019-01-27 22:19:12 +01:00
Orestis 3d5c908af5
Merge pull request #332 from eplanet/fix-macos-build
Fix non Linux build for #309
2019-01-23 11:59:09 +02:00
eplanet 96923a5bc0 Fix non Linux build for #309 2019-01-23 10:44:48 +01:00
Michael Stapelberg a57cdc84e2
Switch to autotools (#316) 2019-01-23 08:56:40 +01:00
Denton Liu 7efbeeaf6c 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.
2019-01-23 08:45:51 +01:00
Ingo Bürk be0be599d9
Merge pull request #328 from jdevelop/fix/capture-volume-status
Fixed ALSA capture device monitoring.
2019-01-13 18:54:14 +01:00
Eugene Dzhurinsky 696ddf461f
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.
2019-01-03 21:59:33 -05:00
Ingo Bürk a84ad18fbf
Merge pull request #321 from eplanet/autodisplay-tz
Add timezone switch
2018-11-17 16:28:38 +01:00
eplanet 1b7501b7ea Corrections according to PR review 2018-11-15 22:27:23 +01:00
eplanet ac6c2a7d46 Add timezone switch 2018-11-10 10:47:05 +01:00
Orestis 2d38178063
Merge pull request #319 from eplanet/fix-etc-mtab
Read /proc/mounts if /etc/mtab can't be read
2018-11-08 11:52:47 +02:00
Ingo Bürk 226cb229f7
Merge pull request #320 from eplanet/fix-error-msg
Fix error messages
2018-11-08 07:01:23 +00:00
eplanet e545525148 Read /proc/mounts if /etc/mtab can't be read 2018-11-08 07:59:15 +01:00
eplanet bc5cc6f238 Fix error messages 2018-11-07 23:01:36 +01:00
Orestis 1492868b80
Merge pull request #309 from TwentyFourD/NonConsecutiveCPUs
Support non-consecutive CPUs
2018-11-05 12:32:21 +02:00
TwentyFourD 6914f8e5b5
print_cpu_usage.c: Support non-consecutive CPUs
Fixes #308
2018-11-05 12:30:52 +02:00
Ingo Bürk be5f38e0a6
Merge pull request #318 from gportay/fix-invalid-cpu-placeholder
print_cpu_usage: fix invalid %cpu placeholder output
2018-10-26 09:24:45 +02:00
Gaël PORTAY aa572d24b5 Add testcase for invalid %cpu placeholder 2018-10-23 11:16:16 -04:00
Gaël PORTAY 0b8aa86ecb 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=
	...
2018-10-21 20:51:53 -04:00
Orestis 13f720ab75
Merge pull request #315 from gportay/fix-typo-in-man
man: fix typo for max_threshold in load
2018-10-19 02:08:53 +03:00
Gaël PORTAY 446ef95621 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'
2018-10-18 17:29:21 -04:00
arcnmx ddadc8e4d7 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
2018-10-11 00:21:03 +03:00
Orestis 494efd49a2 strncpy + strlen is pointless (#312)
strlen already assumes that the string is NULL-terminated.

Fixes -Wstringop-overflow warning
2018-10-07 20:26:24 +02:00
Ingo Bürk 5c9d12befa
Merge pull request #305 from David96/master
Add support for "POWER_SUPPLY_STATUS=Not charging" (fixes #304)
2018-09-04 11:58:58 +02:00
David96 02be7c6fdf Add testcase for #304 2018-09-03 20:51:48 +02:00
David96 6a5e5b8ac4 Add support for "POWER_SUPPLY_STATUS=Not charging" (fixes #304) 2018-09-03 20:50:36 +02:00
Ingo Bürk 38ead0249b
Merge pull request #302 from coderonline/master
Added %interface to the ethernet options
2018-08-27 11:11:41 +02:00
Max Christian Pohle 04d09aac49 Added %interface to the ethernet options 2018-08-24 23:43:35 +02:00
Ingo Bürk fadd4d89b1
Merge pull request #301 from wmarvel/issue300
Fix for issue 300: Correctly print usage for cpu 10
2018-08-01 13:49:27 +02:00
= d003edcba6 Fix for issue 300: Correctly print usage for cpu 10 2018-07-31 00:27:13 -05:00
Ingo Bürk 639a67f752
Merge pull request #296 from Stunkymonkey/include-order
switch to clang 3.8 & ignore include sort order
2018-07-16 16:18:06 +02:00
Ingo Bürk 0b25052cd0
Merge pull request #299 from tuxillo/patch-2
Detect interface type on DragonFly BSD
2018-07-16 16:13:47 +02:00
Antonio Huete Jimenez afd7e44d97 Detect interface type on DragonFly BSD 2018-07-15 21:59:18 +00:00
Ingo Bürk 1174bfa7da
Merge pull request #298 from tuxillo/patch-1
Do not use pulseaudio for DragonFly BSD
2018-07-15 21:47:26 +02:00
Antonio Huete Jimenez deca11c0a0 Do not use pulseaudio for DragonFly BSD 2018-07-14 20:23:22 +00:00
Felix Buehler 3fd61f86db clang-format-3.8 fix travis error 2018-07-13 16:28:22 +02:00
Ingo Bürk fc9da67e65
Merge pull request #297 from Stunkymonkey/percent-first
able to print percentage
2018-07-13 15:17:51 +02:00
Felix Buehler d099a907f6 fix clang errors 2018-07-13 15:11:43 +02:00
Felix Buehler 52e9f6f63b 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.
2018-07-13 15:03:31 +02:00