aboutsummaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)AuthorFilesLines
2015-04-02Merge pull request #17 from chrko/format_downMichael Stapelberg2-4/+16
Adding format_down option to path_exists and run_watch
2015-04-02Adding the option "format_down" to path_exists and run_watch.Christian Kohlstedde2-4/+16
This fixes #1.
2015-04-02sys/dkstat.h has been removed from OpenBSD and it's functionality actually ↵Jasper Lievisse Adriaanse1-0/+4
lived/lives in sys/sched.h
2015-03-29refactoring to avoid code duplicationWatcom Hecht1-30/+23
2015-03-25print_cpu_usage: Fix warnings on non linuxBaptiste Daroussin1-1/+1
Move linux variable under LINUX boundaries
2015-03-25print_eth_info: fix warnings on FreeBSDBaptiste Daroussin1-2/+4
2015-03-25print_volume: don’t return, complete the buffer firstBaptiste Daroussin1-6/+13
Follow the changed done for Linux on f0cd726b
2015-03-25Fix build on FreeBSDBaptiste Daroussin1-1/+2
2015-03-23Pass the "instance" JSON property key for tztime blocksIngo Bürk1-1/+4
fixes #10
2015-03-16clang-format-3.5 -i **/*.[ch], update modelineMichael Stapelberg18-2004/+1982
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-02-22removing Yoda-StyleChristian Kohlstedde1-1/+1
adding some words in the manpage
2015-02-18Adding optional configuration option to "print_disk_info".Christian Kohlstedde1-14/+14
2015-02-18Excluding the code on BSD systems.Christian Kohlstedde1-1/+1
2015-02-18Make the code more readable.Christian Kohlstedde1-3/+3
2015-02-18Modify print_disk_info. Now there is no output if the path is no mountpoint.Christian Kohlstedde1-0/+20
2014-12-22Avoid use of uninitialized variable in print_battery_infoAlexander Monakov1-1/+1
The boolean flag 'watt_as_unit' may be used without being initialized if the configured battery path does not contain expected statistics (for example if it is misconfigured and points to AC adapter info or simply an unrelated file). Even though it does not cause ill effects, it causes a warning (true positive) when running i3status under Valgrind. Initialize the variable to make code well-defined.
2014-12-07support the special interface name _first_ for ethernet/wirelessMichael Stapelberg1-0/+39
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-03i3status: Support %frequency for wireless interfacesTuomas Tynkkynen1-0/+15
In many public WiFis, the 2.4 GHz wireless band is slow due to congestion, while there is still plenty of bandwidth available on the 5 GHz area. So when debugging wireless issues it's convenient to have i3status display the frequency of the access point that the interface is connected to. This patch adds support for the %frequency tag for wireless interfaces, so for example: format_up = "WLAN: %essid - %quality / %frequency" would result in: "WLAN: eduroam - 074% / 2.4 GHz"
2014-10-07Created three individual Strings for each battery status (charging, ↵Cyril Andreatta1-4/+5
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-08-26Bugfix: fix wrong color tags with xmobarMichael Stapelberg1-2/+1
fixes #1353
2014-08-25Fix battery indicator on systems without POWER_SUPPLY_VOLTAGE_NOW.Klemen Košir1-2/+5
In my case, the voltage variable would stay initialized as -1, which caused the calculation of battery charge percentage to be incorrect (I would get the message that there is no battery present or even -0% charge). I have no idea how this would affect other systems, since I don't have a chance to test this.
2014-08-08Fix Dragonfly BSD CPU temperature gaugeRobin Hahling1-2/+29
This patch fixes CPU temperature gauge for DragonFly BSD. Commit 0eeded8 assumed that fetching CPU temperature for DragonFly BSD was similar to that of FreeBSD but this assumption is false.
2014-05-31Use the absolute values for (dis)charging ratesMichael Stapelberg1-3/+3
Apparently some notebooks report a negative current, whereas most don’t. fixes #1249
2014-05-15run_watch: check all matching pid files (until first valid one) (Thanks ↵Michael Stapelberg1-4/+20
brotbart) fixes #1245
2014-04-30Fix NetBSD CPU temp gauge bugAlexander Vasarab1-18/+21
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-30Implement battery functionality for NetBSD usersAlexander Vasarab1-0/+266
This patch takes a similar approach as the NetBSD CPU temperature code in that it uses proplib(3) to walk dictionaries supplied by envsys(4). In addition to providing the basic functionality, it: * Provides all existing format specifiers (%emptytime %consumption %status %percentage %remaining) * Respects all existing config options (hide_seconds, low_threshold, integer_battery_capacity, last_full_capacity) * Projects "time until full" when battery status is CS_CHARGING
2014-03-12Unify use of string comparisonsMats8-25/+25
* strncmp(s1, s2, strlen(s2)) → BEGINS_WITH(s1, s2) * strncmp(s1, s2, strlen(s1)) → strcmp(s1, s2) * Prefer case-insensitive comparison for options
2014-03-12For the %percentage display of batteries, drop the leading '0' for values < 10.Jasper Lievisse Adriaanse1-1/+2
2014-03-09disk: Colorize output when below given thresholdMats1-1/+59
New disk module options: * threshold_type: ^(percentage|[kmgt]?bytes)_(free|avail)$ * low_threshold: <double> fixes #912
2014-03-01Typo in function nameMarco Hunsicker1-1/+1
Fixes the typo in print_seperator()
2014-03-01i3status: Allow customization of module separatorMarco Hunsicker1-5/+8
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-02-26i3status: Bugfix: Reading multiple temperature sensors not possibleMarco Hunsicker1-16/+17
This patch inlines the creation of the thermal zone string in order to force computation on each invocation. This is necessary to be able to read the values of several temperature sensors.
2014-02-08Add hide_seconds optionIakov Davydov1-5/+13
fixes: #1134
2013-12-10disk: Distinguish between IEC, SI and custom prefixesMats1-20/+34
* 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-11-22Add support for path_exists directive.Kinware AB2-0/+36
2013-11-18Added different format string for volume in case it is muted.Gereon Kremer1-2/+10
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-09format detection: simplify code, handle "sh" processes in the hierarchyMichael Stapelberg1-63/+61
i3 starts processes using /bin/sh now, not $SHELL. This increases the likelihood with which we are started by dash, which tends to leave its processes in the hierarchy, e.g.: michael 1524 i3bar --bar_id=bar-0 --socket=/run/user/1000/i3/ipc-s michael 1525 \_ /bin/sh -c i3status michael 1526 \_ i3status This case is now handled correctly — when the parent is “sh”, the parent of sh will be used instead.
2013-11-09fix slurp(), it needs to read size-1 for the trailing NULMichael Stapelberg1-1/+2
2013-10-24print_cpu_temperature: fix memory leak (Thanks kuba)Michael Stapelberg1-4/+6
2013-10-07Add support for cpu temperature on NetBSD (using envsys(4))Arnaud Degroote1-0/+89
2013-10-07Allow to print cpu usage on NetBSDArnaud Degroote1-2/+9
2013-10-07Allow to print eth information on NetBSDArnaud Degroote1-2/+2
2013-07-09allow load to be a floatM. Kory Woods1-1/+1
2013-05-19Implement term-output-formatAxel Wagner2-1/+29
2013-05-19print_volume(linux): Open a new mixer every time.oblique1-103/+52
This fix the following bug: If you switch your sound card on-the-fly, print_volume continued to use the old sound card.
2013-05-04fix #1017: i3status uses generic battery instanceJonas Cleve1-3/+3
2013-03-20Support colored output for CPU temperature on FreeBSDBaptiste Daroussin1-0/+10
2013-03-19print_volume: don’t return, complete the buffer firstMichael Stapelberg1-9/+10
Otherwise, i3bar will display “SPEC VIOLATION” because full_text is missing in the block.
2013-03-19Enable colored output for battery on FreeBSDBaptiste Daroussin1-0/+9
2013-03-19Support mixer_idx with OSSBaptiste Daroussin1-1/+11
make mixer_idx load the default mixer