summaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)Author
2022-12-19Update LICENSEdrkhsh
Real names should be used if possible, as the license is legally binding
2022-12-19Update LICENSEdrkhsh
2022-12-19entropy: Use Unicode escape sequence in stringplanet36
Signed-off-by: drkhsh <me@drkhsh.at>
2022-12-19config.mk: Fix PREFIX assignmentplanet36
Signed-off-by: drkhsh <me@drkhsh.at>
2022-12-19num_files: opendir() returns a directory streamplanet36
opendir() returns a directory stream, not a file descriptor Co-authored-by: drkhsh <me@drkhsh.at> Signed-off-by: drkhsh <me@drkhsh.at>
2022-12-19Make LEN macro consistent with other suckless reposplanet36
Signed-off-by: drkhsh <me@drkhsh.at>
2022-12-19battery: Consistent naming for capacity percentageplanet36
https://www.kernel.org/doc/html/latest/power/power_supply_class.html Co-authored-by: drkhsh <me@drkhsh.at> Signed-off-by: drkhsh <me@drkhsh.at>
2022-12-19Sort functions by nameplanet36
Co-authored-by: drkhsh <me@drkhsh.at> Signed-off-by: drkhsh <me@drkhsh.at>
2022-12-19uptime: Use sizeof instead of repeating the sizeplanet36
Signed-off-by: drkhsh <me@drkhsh.at>
2022-12-19keymap: Variable "layout" should be constplanet36
Signed-off-by: drkhsh <me@drkhsh.at>
2022-12-19disk: Cast fsblkcnt_t to double instead of floatplanet36
Signed-off-by: drkhsh <me@drkhsh.at>
2022-12-19verr: Remove special "usage" caseplanet36
In function verr, remove special case for "usage" string Co-authored-by: drkhsh <me@drkhsh.at> Signed-off-by: drkhsh <me@drkhsh.at>
2022-12-19config.def.h: Remove stray double quote in commentplanet36
Signed-off-by: drkhsh <me@drkhsh.at>
2022-12-19Update READMEdrkhsh
2022-12-01battery: Fix remaining on LinuxPatrick Iacob
The current version displays the remaining time as 'n/a'. Fixes this regression introduced in 69b2487650782f135db76078c4a7fb841cb936ac where current_now and power_now were incorrectly replaced with current and power when they were moved to a macro.
2022-11-24New component: catdrkhsh
Generically reads an arbitrary file natively. Saves a few layers of execution in comparison to using `run_command` with an argument like `cat ./file`.
2022-10-28README: Add note about FreeBSD sndio depdrkhsh
2022-10-28radical re-formatting 3/3: Error checksdrkhsh
Check for `< 0` instead of `== -1`. Fixes coding style. Formatting commits suck, incoherent coding style sucks more. https://suckless.org/coding_style/
2022-10-28radical re-formatting 2/3: Fix blocksdrkhsh
Fixes coding style. Formatting commits suck, incoherent coding style sucks more. https://suckless.org/coding_style/
2022-10-28radical re-formatting 1/3: Fix spacingdrkhsh
Fixes coding style. Formatting commits suck, incoherent coding style sucks more. https://suckless.org/coding_style/
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-28ram: Refactor on OpenBSDdrkhsh
Fixes up overly complicated lines, by splitting up logic
2022-10-28ram: Refactor Linux perc/useddrkhsh
Fixes up overly complicated line, by splitting up logic
2022-10-28battery: Refactor remaining on OpenBSDdrkhsh
Fixes up overly complicated line, by splitting up logic
2022-10-28temp: Put sysctl into define to avoid line wrapsdrkhsh
Long, wrapped, multi-line if statements suck to read. This fixes readability.
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-28separator: kill that useless thingdrkhsh
Just use the format strings dude. :)
2022-10-26do 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-26components/*.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-26Add '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-26Add comment about mixer oss module to READMEdrkhsh
2022-10-26Update LICENSEdrkhsh
2022-10-26Reset 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-26Make volume component work on FreeBSDmichaelbuch12@gmail.com
- Edit compile instructions - Reuse OpenBSD sndio implementation
2022-10-26Fix 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-26Fix keyboard_indicators() prototypeNRK
according to both the function definition and the comment in config.def.h, keyboard_indicators() should take a format string.
2020-11-30Update READMEAaron Marcher
2020-11-30Update LICENSEAaron Marcher
2020-11-30Add comment for FreeBSD to config.mkAaron Marcher
Apparently `-lkvm` is needed for swap on FreeBSD Thanks to Micheal Buch and Jason Smith (See thread https://lists.suckless.org/dev/1907/33594.html)
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-30Add a -1 option flagDaniel Moch
Allow slstatus to be used by programs that can grab status by calling an external program on a periodic basis (e.g. tmux)
2020-11-30Handle SIGUSR1 for forced refreshesMart Lubbers
At some point one might want to force a refresh for example after checking email or changing the volume. Sending a SIGUSR1 achieves this now
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-17Follow International System of Units spacing rulesIngo Feinerer
2019-02-16Add OS-support notice to READMEAaron Marcher
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