Age | Commit message (Collapse) | Author | |
---|---|---|---|
2018-05-27 | Use E-notation for large powers of 10 | Laslo Hunhold | |
2018-05-27 | Revert "Add basic backlight percentage support" | Aaron Marcher | |
On OpenBSD the backlight percentage cannot be retrieved in a simple way. The only two solutions we are aware of for now are: - reading from /dev/ttyC0: which isn't possible without changing permissions or running slstatus as root - linking against xcb-xrandr: which is bloat and does not work in every case appearently This reverts commit 37724ac2c3f496f4736223d0d8e5d8fecb933590 for now. | |||
2018-05-24 | ram: fixed int overflow on pagetok macro | Tobias Tschinkowitz | |
2018-05-23 | Refactor keymap.c | Laslo Hunhold | |
- Get rid of camel-casing - Don't use all-caps for variable names - use LEN()-macro - use strncmp() rather than strstr() for prefix-checking - clean up the tokenizer-loop and don't use copies - make the loop more readable by separating different breaking conditions - stricter error-checking and cleanup - store the layout directly with bprintf rather than having a separate buffer | |||
2018-05-23 | keymap: Add braces for for loop | Aaron Marcher | |
2018-05-23 | Add keymap component | Michael Buch | |
Adding a new keymap component that will indicate the current keyboard layout (language) and variant if any was set. I use the standard X11 XKB APIs to retrieve and parse the xkb_symbols set with setxkbmap. | |||
2018-05-22 | netspeeds: Fix indentation | Aaron Marcher | |
2018-05-22 | Add basic backlight percentage support | David Demelier | |
At the moment linux only, but will add support for OpenBSD as well. | |||
2018-05-22 | Change to fmt_human in netspeeds on OpenBSD | Aaron Marcher | |
Thanks to Hiltjo | |||
2018-05-21 | swap.c: Refactor getstats() and its usage | Laslo Hunhold | |
Add a return value so we are able to check any errors and actually fail when there has been a critical error instead of carrying on uselessly. | |||
2018-05-21 | Merge fmt_human_2 and fmt_human_10 to one function | Aaron Marcher | |
Now only one function, fmt_human, takes an additional argument "base". | |||
2018-05-21 | Remove fmt from load_avgs for consistency | Aaron Marcher | |
In a later commit something like that will be enabled for every component | |||
2018-05-21 | battery_remaining: check for division by zero | Aaron Marcher | |
2018-05-21 | battery_remaining: Change float to double | Aaron Marcher | |
2018-05-21 | battery: Minor coding style fixes | Aaron Marcher | |
- Line length - Spacing and indentation - No explicit checks for NULL | |||
2018-05-21 | Increase readability for load_uvmexp return | Aaron Marcher | |
2018-05-21 | Remove units from numbers | Aaron Marcher | |
This is a first step to decouple formatting from information because of two reasons: 1. The components should only gather and return the values by design 2. Fine grained user control should be a focus Scaling will be implemented in a different way in a later commit. | |||
2018-05-21 | swap_perc: check for division by zero on obsd too | Aaron Marcher | |
2018-05-20 | swap_perc: check for division by zero | Aaron Marcher | |
2018-05-20 | Support energy_now/power_now in battery_remaining | David Demelier | |
On some laptops (mostly thinkpads), the remaining time may be expressed in µWh using energy_now and power_now files rather than µAh for charge_now and current_now. Add pick function to conditionally select appropriate one. | |||
2018-05-20 | ip: fixed memory leak | Tobias Tschinkowitz | |
free the interface list before returning from the function | |||
2018-05-20 | Check return value of pclose() | Laslo Hunhold | |
2018-05-20 | Refactor ram.c | Aaron Marcher | |
2018-05-20 | Make temp more readable on Linux | Aaron Marcher | |
2018-05-20 | Refactor entropy.c | Laslo Hunhold | |
2018-05-20 | Remove initialization to 0 for static vars | Aaron Marcher | |
2018-05-20 | Remove unnecessary "valid" variable in cpu_perc | Aaron Marcher | |
2018-05-20 | Add unit to temperature | Aaron Marcher | |
2018-05-19 | Implement scaling for cpu_freq | Aaron Marcher | |
2018-05-19 | Implement fmt_human_2() and fmt_human_10() | Laslo Hunhold | |
These functions take the raw number and a unit and automatically print it out "scaled down" to a proper SI-prefix, for powers of 2 and 10 respectively. Apply them to the 2-power cases and keep the 10-power for a later commit. | |||
2018-05-19 | Add the percent sign to *_perc functions | Aaron Marcher | |
Units should be added to the corresponding numbers | |||
2018-05-19 | Increase precision in netspeeds.c | Laslo Hunhold | |
First dividing by interval before multiplying with 1000 decreases the precision by +-(interval - 1) * 1000, as interval arithmetic always applies the Gauß-function to the result. This is not necessary and simply reordering the operations mitigates this. | |||
2018-05-19 | Implement esnprintf() and make formatted calls more efficient | Laslo Hunhold | |
Within the components, snprintf() was unchecked and had inefficient calls in some places. We implement esnprintf() that does all the dirty laundry for us and use it exclusively now. | |||
2018-05-19 | Simplify ipv* functions | Aaron Marcher | |
2018-05-19 | Use `int` for flags | Aaron Marcher | |
2018-05-19 | Revert aac29e2 as it is nonsense | Aaron Marcher | |
2018-05-19 | Set {r,t}xbytes 0 before incrementing them on OBSD | Aaron Marcher | |
2018-05-19 | Missing assignment for last commit | Aaron Marcher | |
2018-05-19 | Unify and simplify netspeed logic and types | Aaron Marcher | |
2018-05-19 | netspeeds: added error condition for openbsd | Tobias Tschinkowitz | |
implemented additional error condition for openbsd netstat in case the interface could not be found in the interface list or if_data is not readable. | |||
2018-05-19 | uptime: Format function is static | Aaron Marcher | |
2018-05-19 | battery: Move out struct as common code | Aaron Marcher | |
2018-05-19 | implemented openbsd netspeed functions | Tobias Tschinkowitz | |
implemented the netspeed functionality for openbsd. furthermore the static keyword was removed of the interval variable in config.def.h for usage as extern variable. | |||
2018-05-19 | Add network speed functions | Aaron Marcher | |
2018-05-18 | Implement fmt_scaled for ram_* functions | Aaron Marcher | |
2018-05-18 | Fix ram_free for Linux | Aaron Marcher | |
2018-05-18 | Implement fmt_scaled for swap_* functions | Aaron Marcher | |
2018-05-18 | Implement fmt_scaled for disk_* functions | Aaron Marcher | |
2018-05-18 | Use %d instead of accidentally %i | Aaron Marcher | |
2018-05-18 | Port battery_remaining to Linux | Aaron Marcher | |
Additionally unify the format of battery_state and uptime |