summaryrefslogtreecommitdiff
path: root/components
AgeCommit message (Collapse)Author
2022-10-28battery: Refactor remaining on OpenBSDdrkhsh
Fixes up overly complicated line, by splitting up logic
2022-10-28various: Put paths into defines to avoid line wrapsdrkhsh
Long, wrapped, multi-line if statements suck to read. This fixes readability in the worst places by packing format strings for paths into defines.
2022-10-28radical re-formatting 0/3: Alphabetic headersdrkhsh
Except stated otherwise in comment. Fixes coding style. Formatting commits suck, incoherent coding style sucks more. https://suckless.org/coding_style/
2022-10-28separator: kill that useless thingdrkhsh
Just use the format strings dude. :)
2022-10-27do not rely on obsolete featureNRK
function prototype with unspecified argument is obsolete since c99. additionally some of these function which don't take any argument were being called with a `const char *` arg, which is UB. fix both these issues by declararing ALL the components to accept a `const char *`, and name the arg "unused" if it's meant to be ignored.
2022-10-27components/*.c: include slstatus.hNRK
this gives the compiler a chance to check weather the prototype and definiton matches or not, which would catch issues like 3c47701.
2022-10-27Add 'Not charging' status supportSpenser Truex
Exists on various ThinkPads. Seems to be both a synonym for "full". Tested on: - ThinkPad T500 (Spenser Truex <truex@equwal.com) - ThinkPad T420 (drkhsh <me@drkhsh.at)
2022-10-27Reset sndiod initialization flag on disconnectsIngo Feinerer
If the connection is lost to the sndiod(8) daemon reset the initialization to allow for a graceful restart.
2022-10-27Fix RAM component on FreeBSDmichaelbuch12@gmail.com
The current implementation uses the wrong type for given sysctl calls leading to overflow and incorrectly reported RAM usage. The fix is to use 'unsigned int' which is what FreeBSD expects.
2022-10-27Make volume component work on FreeBSDmichaelbuch12@gmail.com
- Edit compile instructions - Reuse OpenBSD sndio implementation
2020-11-30Use the sioctl_open(3) OpenBSD API to access volIngo Feinerer
Starting with OpenBSD 6.7 regular users cannot access raw audio devices anymore, for improved security. Instead use the sioctl_open(3) API to access and manipulate audio controls exposed by sndiod(8). On the first call a permanent connection is established with the running sndiod daemon, and call-back functions are registered which are triggered when audio controls are changed (e.g., a USB headset is attached) or when the volume is modified. On subsequent calls we poll for changes; if there are no volume changes this costs virtually nothing. Joint work with Alexandre Ratchov
2020-11-30Fix temperature reporting on OpenBSDdsp
On OpenBSD although the formula is correct due to integer division a temperature of for example 54 celsius appears as 5. this patch first treats it as a floating point op before retaining the non decimal digits
2020-11-30Full battery indicatorCem Keylan
When you reach full charge the symbol would change to a question mark "?" as "Full" was not defined, now it changes to an "o" instead.
2020-11-30Add separator moduleRyan Kes
2019-02-16Add ram and swap components on FreeBSDMichael Buch
2019-02-16cpu_perc: Check for division by zeroIngo Feinerer
2019-02-13Fix CPU frequency on OpenBSDIngo Feinerer
2019-02-13close file descriptors and fix return valuesMichael Buch
2019-02-13Add native OpenBSD support for mute/volumeIngo Feinerer
Based on functionality in dstat by Joerg Jung.
2019-02-13wifi component on FreeBSDMichael Buch
2019-02-07Add FreeBSD support for netspeeds, entropy and ip componentsMichael Buch
2019-02-05Add support for cpu and uptime components on FreeBSDMichael Buch
2019-02-05Add FreeBSD support for temperature and battery componentsMichael Buch
2018-07-08ram: Consistency with line breaksAaron Marcher
2018-07-08Fix whitespaceAaron Marcher
2018-07-08Consistency with 80 char limit and breaksAaron Marcher
2018-07-07wifi_perc: Simplify on LinuxAaron Marcher
Remove unnecessary variable
2018-07-07Simplify format specifiers for uintmax_tAaron Marcher
2018-07-07cpu_freq: Simplify with E-notationAaron Marcher
Thanks to the FRIGN
2018-07-07cpu_freq: Change to 64 bit integersAaron Marcher
Remove unnecessary cast to size_t
2018-07-07Change uint64_t to uintmax_tAaron Marcher
2018-07-07battery: 64 bit ints on LinuxAaron Marcher
2018-07-07cpu: Use uint64_t on OpenBSDAaron Marcher
2018-07-06battery: Remove unnecessary defines for pathsAaron Marcher
2018-07-06uptime: Improve typing and sort headersAaron Marcher
2018-07-06temperature: Improve typesAaron Marcher
2018-07-06ram: Check for theoretical division by zeroAaron Marcher
2018-07-06ram: Use POSIX typesAaron Marcher
2018-07-06entropy: Use POSIX types for format specifiersAaron Marcher
2018-07-06entropy: Improve typesAaron Marcher
2018-07-06Consistent paramter naming for componentsAaron Marcher
2018-06-04Add flexible formatting to keyboard_indicators.Ian Remmler
Updated for style.
2018-06-01uptime: unification of the uptime function for linux/openbsdTobias Tschinkowitz
2018-05-31wifi: fixed disconnected wifi status on openbsdTobias Tschinkowitz
2018-05-30Clean up header includesAaron Marcher
- Remove <errno.h> because related functions are in util.c now - Remove corresponding <string.h> if not used otherwise
2018-05-29swap: removed unused includeTobias Tschinkowitz
2018-05-28Refactor swap.c to use getline() instead of buf-fillingLaslo Hunhold
This drops a lot of code and even though we are using a common function, the specification of only the needed things keeps it very efficient and even more efficient in memory and time than the previous solution.
2018-05-27Use E-notation for large powers of 10Laslo Hunhold
2018-05-27Revert "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-24ram: fixed int overflow on pagetok macroTobias Tschinkowitz