Age | Commit message (Collapse) | Author | |
---|---|---|---|
2018-05-18 | Add battery_remaining function on OpenBSD | Tobias Tschinkowitz | |
Implementation of a battery_remaining function which returns the remaining battery time in HH:MM format. Linux function still needs implementation. Move common code to load_apm_power_info | |||
2018-05-18 | Add warn() and die() | Laslo Hunhold | |
Given slstatus is a tool that runs in the background, most likely run from .xinitrc, it's important to prepend the name of the tool to error messages so it becomes clear where the error is coming from. To make this much more consistent, this commit adds warn() and die() utility functions consistent with other suckless projects and adapts all calls to fprintf(stderr, *) to the warn() and die() functions, greatly increasing the readability of the code. | |||
2018-05-17 | Remove UNUSED macro | Aaron Marcher | |
Use variables named unused instead which is simpler | |||
2018-05-17 | Mark unused parameters, fix compiler warnings | Aaron Marcher | |
2018-05-17 | wifi: Fix order and add missing header | Aaron Marcher | |
<sys/select.h> is needed before <net80211/ieee80211_ioctl.h> on OpenBSD to define NBBY and shut up compiler warnings. | |||
2018-05-17 | wifi: Change memmove to memcpy on OpenBSD | Aaron Marcher | |
2018-05-17 | Unify type of in for loops | Aaron Marcher | |
2018-05-17 | wifi_essid: Fix coding style | Aaron Marcher | |
Only initialize variables at the beginning of a block | |||
2018-05-17 | Unify type of `i` in for loops | Aaron Marcher | |
int for normal indexes size_t for usage with the LEN macro | |||
2018-05-17 | corrected calculations for disk space on openbsd | Tobias Tschinkowitz | |
2018-05-16 | wifi: Fix coding style | Aaron Marcher | |
Use block for single statement ifs When functions return -1 for error test against 0 not -1 Newlines | |||
2018-05-16 | load_ieee80211_nodereq: Fix typo | Aaron Marcher | |
2018-05-16 | wifi: Move out common headers | Aaron Marcher | |
2018-05-16 | added wifi functionality for openbsd | Tobias Tschinkowitz | |
display ESSID and signal strength percentage | |||
2018-05-16 | corrected calculation for swap on openbsd | Tobias Tschinkowitz | |
The swapctl(2) function fills the swapent struct with 512KB blocks. As we want to display in GB, i just modified the calculation for this to get the expected output. | |||
2018-05-16 | consistent calculation of ram_* on openbsd | Tobias Tschinkowitz | |
2018-05-16 | updated ram_total and ram_free (obsd) | Tobias Tschinkowitz | |
2018-05-14 | Cast CPU percentage to int and fix indenation | Aaron Marcher | |
2018-05-08 | include <sys/time.h> before <sys/sensors.h> for time struct timeval | Josuah Demangeon | |
sys/sensors.h has two structs struct timeval: sensor and ksensor: struct sensor { ... struct timeval tv; /* sensor value last change time */ ... }; | |||
2018-05-07 | Fix indents (spaces for alignment) | Aaron Marcher | |
2018-05-07 | wifi_perc: Simplify | Aaron Marcher | |
2018-05-07 | num_files: Variable declarations at top of block | Aaron Marcher | |
2018-05-07 | Fix disk_perc by casting it to int | Aaron Marcher | |
2018-05-07 | disk_perc: Simplify | Aaron Marcher | |
2018-05-07 | cpu: Simplify functions | Aaron Marcher | |
2018-05-07 | Unify header includes | Aaron Marcher | |
- Sort Alphabetically - Same indentation for preprocessor clauses | |||
2018-05-06 | entropy: Small fix | Aaron Marcher | |
2018-05-06 | entropy: Port to OpenBSD | Aaron Marcher | |
OpenBSD's entropy design is superior to Linux. | |||
2018-05-06 | datetime: Add <stdio.h> for fprintf | Aaron Marcher | |
2018-05-06 | datetime: Add error message | Aaron Marcher | |
2018-05-06 | Fix coding style | Aaron Marcher | |
- Use block for single statement ifs - Keep lines to reasonable length (current debate as to reasonable) - When functions return -1 for error test against 0 not -1 - Do not indent cases another level - Do not test against NULL and 0 explicitly - Use tabs for indentation, use spaces for alignment | |||
2018-05-06 | Remove cpu_iowait | Aaron Marcher | |
The third value from load_avg (idle) gives us almost the same information as cpu_iowait. Plus OpenBSD does not offer an iowait value as Linux and thus the corresponding function would not be portable. | |||
2018-05-06 | cpu_perc: Documentation and readbility improvements | Aaron Marcher | |
2018-05-06 | cpu_perc: Port to OpenBSD | Aaron Marcher | |
In OpenBSD the CPU usage in percent is now computed using KERN_CPTIME sysctl. | |||
2018-05-06 | swap_*: Port to OpenBSD | Aaron Marcher | |
2018-05-04 | battery: Remove full indicator | Aaron Marcher | |
It does not respect charging thresholds and it is not trivial to implement the indicator in OpenBSD. | |||
2018-05-02 | wifi_perc: Fix file descriptor leak | Aaron Marcher | |
2018-05-02 | uptime: Add missing brace | Aaron Marcher | |
2018-05-02 | volume: Cast SOUND_MIXER_READ_DEVMASK to int to avoid warning. | parazyd | |
2018-05-02 | wifi: Various cleanups | Aaron Marcher | |
2018-05-02 | user: Only declare variables in the beginning | Aaron Marcher | |
2018-05-02 | uptime: Simplifiy and clean up | Aaron Marcher | |
2018-05-02 | run_command: Clean up | Aaron Marcher | |
2018-05-02 | keyboard_indicators: Clean up opening display | Aaron Marcher | |
2018-05-02 | ip: Sort headers alphabetically | Aaron Marcher | |
2018-05-02 | battery_state: Unify unknown state with "?" symbol | Aaron Marcher | |
2018-05-01 | Remove battery_power for various reasons | Aaron Marcher | |
- Battery power cannot be easily gatherable via apm(4) - IMHO it does not represent essential information | |||
2018-05-01 | battery_perc: Port to OpenBSD | Aaron Marcher | |
2018-05-01 | components/swap.c | move duplicated code to separate function | Laslo Hunhold | |
2018-05-01 | Use indentation to increase readability | Laslo Hunhold | |
Granted, this style is definitely not common, but for the short utility-functions of this program it's just the right choice. This provides great flexibility, such that in the long run, it will be possible to also share code between the OS-implementations. This also keeps the state-keeping at a minimum and makes it clearer which functions are implemented on which OS without having to jiggle around with too many files in the process. |