Commit Graph

51 Commits

Author SHA1 Message Date
JSmith-BitFlipper
2cd5c86915 Resolved potential bug
This pull request is in response to #61
2015-09-20 13:56:44 -04:00
Watcom Hecht
f779da1a59 PulseAudio muted volume support (fixes #27) 2015-04-19 13:28:26 -03:00
Michael Stapelberg
9abe0a9d59 Merge pull request #7 from Watcom/master
PulseAudio support for volume input
2015-04-03 14:45:40 -07:00
Watcom Hecht
1710c206cf PulseAudio support for volume input 2015-04-03 17:57:40 -03:00
Christian Kohlstedde
5c094a5493 Adding the option "format_down" to path_exists and run_watch.
This fixes #1.
2015-04-02 22:31:06 +02:00
Michael Stapelberg
018702e01e fix invalid forward declaration 2015-04-02 09:06:07 +02:00
Ingo Bürk
0a84bcb74a Pass the "instance" JSON property key for tztime blocks
fixes #10
2015-03-23 21:42:52 +01:00
Michael Stapelberg
d74e904bf4 clang-format-3.5 -i **/*.[ch], update modeline
From here on, we’ll use clang-format to automatically format the source.

This has worked well in i3, so we are introducing it for i3status.
2015-03-16 10:01:07 +01:00
Christian Kohlstedde
85bb373095 Adding optional configuration option to "print_disk_info". 2015-02-18 23:43:25 +01:00
Alexander Monakov
3818dabceb Allocate and expose per-instance pointers for plugins 2014-12-10 19:58:54 +01:00
Michael Stapelberg
b219f47f39 support the special interface name _first_ for ethernet/wireless
Since we have deterministic device names in Linux, these strings are a
much better default in the i3status config than "eth0" and "wlan0" (what
we used before).
2014-12-07 15:17:31 +01:00
Cyril Andreatta
8e22f3839d Created three individual Strings for each battery status (charging, dicharching, full)
Replaced hard coded status strings (CHR, BAT, FULL) in
print_battery_info.c with user defined strings. The new strings are
'status_chr', 'status_bat' and 'status_full' and can be set in i3status.conf.
e.g.
status_chr = " CHR"

If any of the new status strings is omitted the standard strings (CHR,
BAT, FULL) are used.
2014-10-07 18:52:01 +02:00
Alexander Vasarab
b26b118d76 Fix NetBSD CPU temp gauge bug
This patch fixes a bug in which multiple (conflicting) CPU temps may be
included in the output for the "cpu temperature" module.

The bug is due to the way that the code parsed the envsys(4)-returned data,
and would manifest itself on x86-based NetBSD machines, since those use
cputemp(4) as well as acpitz(4), thereby creating multiple envsys(4) entries
with identical descriptions but which refer to different physical sensors.

Instead of matching the description attribute of each device returned by
envsys(4) against the target format, this patch throws away non-matching keys
in the first instruction inside the dict walk. This has the benefit of sparing
unnecessary CPU cycles, and preventing other sensors from being included
erroneously.

Additionally, the THERMAL_ZONE format is now joined with OpenBSD in that it
uses acpitz(4) explicitly. This is prefered since it is much older (dating
back to NetBSD 2.0), and does not exclude x86-based users (as with cputemp(4)).
2014-04-30 09:28:09 +02:00
Mats
bc0bd8c9e0 disk: Colorize output when below given threshold
New disk module options:
* threshold_type: ^(percentage|[kmgt]?bytes)_(free|avail)$
* low_threshold: <double>

fixes #912
2014-03-09 22:57:19 +01:00
Marco Hunsicker
1de12e7b20 Support align and min_width module options
This patch enables users to define "align" and "min_width" options
right in the i3status module config sections.

Specifically this patch:
 * Adds macros for the two new options that are used in the option
   definitions. As the min_width option can take either a string or a
   number, a custom type has been added along with a corresponding callback
   function that parses the provided value (and provides input validation).
   The align option also uses a callback for input validation
 * Expands all module config option definitions to include the new
   options
 * Extends the SEC_CLOSE_MAP() macro to generate the JSON for the new
   options as necessary
 * Updates the manpage to explain the new options
2014-03-07 08:46:44 +01:00
Marco Hunsicker
0c2b518b8a Typo in function name
Fixes the typo in print_seperator()
2014-03-01 22:35:37 +01:00
Marco Hunsicker
7b021d3eb2 i3status: Allow customization of module separator
This patch adds the ability to customize the separator that is placed
between modules.

Specifically this patch:

* adds the "separator" general directive
* moves the definition of the default separator for the different
  output formats (excluding color formatting) to src/i3status.c
* updates the SEC_CLOSE_MAP macro to disable the separator for the
  i3bar output format if the separator directive dictates so
* changes print_seperator() in src/output.c to take a separator
  parameter in order to disable the output of the separator if
  the separator is empty and to use the provided separator
  otherwise
* updates the manpage to explain the new directive
2014-03-01 10:21:11 +01:00
Iakov Davydov
c01a8110a4 Add hide_seconds option
fixes: #1134
2014-02-08 20:36:59 +01:00
Mats
596f2264f4 disk: Distinguish between IEC, SI and custom prefixes
* IEC: Ki, Mi, Gi, Ti (powers of 1024)
* SI: k, M, G, T (powers of 1000)
* custom: K, M, G, T (powers of 1024)
2013-12-10 21:18:14 +01:00
Kinware AB
717484184f Add support for path_exists directive. 2013-11-22 15:52:27 +01:00
Gereon Kremer
4bd0ba88c8 Added different format string for volume in case it is muted.
If the volume is muted, the volume level would simply be displayed as zero and the color changed to color_degraded.
This patch lets the user define a custom format string for when the volume is muted.
The default value is "♪: 0%" ("♪: %volume" being the usual format).
2013-11-18 22:31:42 +01:00
Arnaud Degroote
c6e9fc84c6 Add support for cpu temperature on NetBSD (using envsys(4)) 2013-10-07 19:32:50 +02:00
M. Kory Woods
41be50a983 allow load to be a float 2013-07-09 23:22:26 +02:00
Axel Wagner
7a372b0f46 Implement term-output-format 2013-05-19 19:51:01 +02:00
Christoph Göttschkes
5e0b8812bf Added format_down option for battery if no battery is available. 2013-03-09 11:43:55 +01:00
Raphael Michel
6279964c6b Add colorized output for load avg 2013-02-22 14:09:58 +01:00
Julien Lequertier
67c2c1a7ea Added option to show battery capacity without decimals 2013-02-14 19:35:15 +01:00
Michael Stapelberg
78cd0e1e01 s/\<timezone\>/tz/ in order to not shadow the timezone var from time.h 2013-02-10 17:19:56 +01:00
Emil Mikulic
2ebe1f3726 Add tztime module to support multiple different timezones. 2013-02-10 17:18:32 +01:00
Scott Tincman
0eeded8bc0 DragonFlyBSD support added 2012-11-15 12:31:17 +01:00
Marcelo Cerri
dbf3adc81d add good, degraded and bad colors per module
This commit adds support for color_good, color_degraded and color_bad
directives per module section in the config file.
2012-10-24 18:59:46 +02:00
Jasper Lievisse Adriaanse
ae4873bac7 i3status - More temperature related fixes for OpenBSD, and a general feature
- Temperature sensors can now set a 'max_threshold' value to color the output red if exceeded.
- Allow for arbitrary temperature sensors nodes to be selected with 'path' on OpenBSD.
2012-10-16 10:51:15 +02:00
Jasper Lievisse Adriaanse
1c2517a399 i3status - Default to acpitz(4) instead of cpu(4) for OpenBSD temperature readings
The acpitz(4) values are eventually used by the kernel to determine if the machine
is getting too hot.
2012-10-16 10:48:44 +02:00
Simon Elsbrock
674d28e192 modify START_COLOR macro variable naming
Rename val to _val to prevent shadowing warnings due to its common
naming.
2012-09-05 23:28:17 +02:00
Simon Elsbrock
68f438ec9e add additional battery threshold type "percentage"
The battery threshold can now be configured as type "time" or
"percentage", but defaults to "time" to prevent unexpected behavior.
Also, low_threshold was set to a more reasonable default of 30.
2012-08-28 18:05:11 +02:00
Michael Stapelberg
cfaeba4df1 Bugfix: non-i3bar formats always used color_bad (Thanks hongy19)
fixes #772
2012-08-13 01:35:07 +02:00
Simon Elsbrock
7c02c10b72 colorize battery output if remaining time below threshold 2012-05-25 09:53:49 +02:00
Jasper Lievisse Adriaanse
1c3fb04fb9 Implement basic fetching of cpu temperature on OpenBSD. 2012-04-30 13:00:46 +02:00
Michael Stapelberg
1b3aa40485 add yajl compat code 2012-04-08 14:05:47 +02:00
Michael Stapelberg
0686906b89 use printf instead of write to not mix two ways of outputting data
Otherwise, the separator is not properly interleaved with output.
2012-03-25 22:07:43 +02:00
Michael Stapelberg
12b1bfa9b8 Properly output JSON with libyajl 2012-03-25 22:05:00 +02:00
Michael Stapelberg
d5b4c8e368 Implement the i3bar JSON protocol
This hardcodes all the JSON parts. Strings are not properly escaped currently.
The best/easiest way to fix this is by actually using libyajl.
2012-02-16 23:30:54 +00:00
Baptiste Daroussin
7148eb5279 FreeBSD: switch from acpi to coretemp to get the cpu temperature 2011-12-09 23:38:59 +00:00
Michael Stapelberg
3471ff39f8 battery: implement "path" option for batteries with non-standard paths 2011-11-26 18:26:38 +00:00
Michael Stapelberg
7ab9167536 magic: try to auto-detect output_format by default (dzen2/i3bar/xmobar) 2011-07-13 03:27:57 +02:00
Peter Bui
8b18e8e33c Add print_cpu_usage 2011-05-06 13:13:11 +02:00
Michael Stapelberg
0a13d30465 Also use the correct time for the ddate module 2011-04-22 01:10:40 +02:00
Michael Stapelberg
4fa8a4e0ab get time at the beginning of the loop 2011-04-21 20:50:14 +02:00
Michael Stapelberg
4ec02bea7b implement the 'path' option for cpu temperature 2011-01-06 18:22:46 +01:00
Michael Stapelberg
cf09102433 Use kill(pid, 0) to check if the process is alive 2010-11-28 16:45:34 +01:00