]> Skullheadx's Git Forge - slstatus.git/log
slstatus.git
6 weeks agoremove username + hostname master
Skullheadx [Fri, 1 May 2026 16:45:48 +0000 (12:45 -0400)]
remove username + hostname

6 weeks agoscrolling music
Skullheadx [Wed, 29 Apr 2026 21:32:37 +0000 (17:32 -0400)]
scrolling music

6 weeks agoonly show title
Skullheadx [Wed, 29 Apr 2026 09:12:31 +0000 (05:12 -0400)]
only show title

6 weeks agoadd currently playing song
Skullheadx [Wed, 29 Apr 2026 09:08:35 +0000 (05:08 -0400)]
add currently playing song

6 weeks agoremove swap
Skullheadx [Wed, 29 Apr 2026 00:17:05 +0000 (20:17 -0400)]
remove swap

6 weeks agoupdate config
Skullheadx [Wed, 29 Apr 2026 00:13:24 +0000 (20:13 -0400)]
update config

6 weeks agoadd flake
Skullheadx [Tue, 28 Apr 2026 23:11:54 +0000 (19:11 -0400)]
add flake

3 months agolicense: bump copyright year
drkhsh [Thu, 12 Feb 2026 21:54:11 +0000 (22:54 +0100)]
license: bump copyright year

3 months agofix buffer overflow in battery state parsing
drkhsh [Thu, 12 Feb 2026 21:52:21 +0000 (22:52 +0100)]
fix buffer overflow in battery state parsing

"Not charging" is 12 characters; %12[a-zA-Z ] reads up to 12 chars
plus a NUL terminator (13 bytes) into a 12-byte buffer. Increase
state buffer to 13 in both battery_state and battery_remaining.

3 months agowifi: always retry ioctl for ifindex
drkhsh [Thu, 12 Feb 2026 21:46:02 +0000 (22:46 +0100)]
wifi: always retry ioctl for ifindex

ifindex() caches the result of ioctl(SIOCGIFINDEX) and never
retries it, since the interface name strcmp succeeds after the
first call. if the interface does not exist when slstatus starts
(e.g. iwd with default config destroys/recreates interfaces
depending on service state), the ioctl fails and the stale
result is returned on all subsequent calls.

based on a patch by ryhpez, with input from Taha Medhous

3 months agovolume: avoid NULL dereference in onval() on sndio device switch
Chris Billington [Fri, 21 Nov 2025 04:31:40 +0000 (12:31 +0800)]
volume: avoid NULL dereference in onval() on sndio device switch

10 months agomore concise memory calculation on Linux
drkhsh [Thu, 24 Jul 2025 20:41:25 +0000 (22:41 +0200)]
more concise memory calculation on Linux

more flexible parsing for /proc/meminfo to take shared and reclaimable
memory into account. this matches the output with free(1).

additionally this could fix some corner cases, as the order of fields in
/proc/meminfo is not strictly defined.

slstatus:
percent 81% free 2.5 Gi total 23.4 Gi used 19.0 Gi

free(1):
               total        used        free      shared  buff/cache   available
Mem:            23Gi        19Gi       2.5Gi       1.3Gi       3.2Gi       3.6Gi

10 months agofix name confusion in LICENSE
drkhsh [Wed, 16 Jul 2025 16:21:41 +0000 (18:21 +0200)]
fix name confusion in LICENSE

thanks for reporting, dsp

13 months agobump version to 1.1
drkhsh [Wed, 30 Apr 2025 02:00:57 +0000 (04:00 +0200)]
bump version to 1.1

13 months agorefactor wifi on linux
drkhsh [Wed, 30 Apr 2025 01:59:49 +0000 (03:59 +0200)]
refactor wifi on linux

13 months agoupdate LICENSE and README
drkhsh [Wed, 30 Apr 2025 01:12:28 +0000 (03:12 +0200)]
update LICENSE and README

13 months agofix compiler warning with newer gcc
drkhsh [Wed, 30 Apr 2025 01:11:53 +0000 (03:11 +0200)]
fix compiler warning with newer gcc

13 months agoadd 'up' for whether a interface is up or down
sewn [Fri, 15 Mar 2024 21:20:54 +0000 (00:20 +0300)]
add 'up' for whether a interface is up or down

13 months agoAdd underscore to separators in strtok() call in keymap.c
Al [Sun, 7 Jul 2024 06:54:21 +0000 (09:54 +0300)]
Add underscore to separators in strtok() call in keymap.c

13 months agowifi: switch to nl80211 interface
Joakim Sindholt [Tue, 30 Jul 2024 20:15:44 +0000 (22:15 +0200)]
wifi: switch to nl80211 interface

2 years agoRelease stable 1.0 version
drkhsh [Tue, 4 Jul 2023 18:47:18 +0000 (20:47 +0200)]
Release stable 1.0 version

3 years agoAdd back version flag to prepare for release
drkhsh [Mon, 15 May 2023 17:14:52 +0000 (19:14 +0200)]
Add back version flag to prepare for release

3 years agoFix release tarball to prepare for release
drkhsh [Mon, 15 May 2023 17:11:39 +0000 (19:11 +0200)]
Fix release tarball to prepare for release

Correctly copies components to sub-directory, adds all required files

3 years agoREADME: Sync description from manpage
drkhsh [Sun, 23 Apr 2023 21:48:47 +0000 (23:48 +0200)]
README: Sync description from manpage

3 years agomanpage: Quality improvements
drkhsh [Sun, 23 Apr 2023 21:43:14 +0000 (23:43 +0200)]
manpage: Quality improvements

Adds signals section to the manpage and generally improves contents and
wording

3 years agoMore LICENSE updates
drkhsh [Mon, 19 Dec 2022 21:03:59 +0000 (22:03 +0100)]
More LICENSE updates

Regarding 305aa5138add5971456c880219fe859cd4189624

3 years agoRevert "config.mk: Fix PREFIX assignment"
drkhsh [Mon, 19 Dec 2022 18:26:57 +0000 (19:26 +0100)]
Revert "config.mk: Fix PREFIX assignment"

"?=" is not POSIX, packagers should use "make PREFIX=".
This reverts commit c225c4315161a992b9e44dd990d083ee57f7f713.

3 years agoUpdate LICENSE
drkhsh [Mon, 19 Dec 2022 18:26:15 +0000 (19:26 +0100)]
Update LICENSE

Real names should be used if possible, as the license is legally binding

3 years agoUpdate LICENSE
drkhsh [Mon, 19 Dec 2022 01:40:00 +0000 (02:40 +0100)]
Update LICENSE

3 years agoentropy: Use Unicode escape sequence in string
planet36 [Fri, 28 Oct 2022 15:49:05 +0000 (10:49 -0500)]
entropy: Use Unicode escape sequence in string

Signed-off-by: drkhsh <me@drkhsh.at>
3 years agoconfig.mk: Fix PREFIX assignment
planet36 [Wed, 26 May 2021 18:29:32 +0000 (14:29 -0400)]
config.mk: Fix PREFIX assignment

Signed-off-by: drkhsh <me@drkhsh.at>
3 years agonum_files: opendir() returns a directory stream
planet36 [Wed, 12 May 2021 02:45:34 +0000 (22:45 -0400)]
num_files: opendir() returns a directory stream

opendir() returns a directory stream, not a file descriptor

Co-authored-by: drkhsh <me@drkhsh.at>
Signed-off-by: drkhsh <me@drkhsh.at>
3 years agoMake LEN macro consistent with other suckless repos
planet36 [Tue, 13 Apr 2021 16:43:18 +0000 (12:43 -0400)]
Make LEN macro consistent with other suckless repos

Signed-off-by: drkhsh <me@drkhsh.at>
3 years agobattery: Consistent naming for capacity percentage
planet36 [Tue, 6 Apr 2021 16:48:18 +0000 (12:48 -0400)]
battery: Consistent naming for capacity percentage

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>
3 years agoSort functions by name
planet36 [Fri, 2 Apr 2021 18:11:00 +0000 (14:11 -0400)]
Sort functions by name

Co-authored-by: drkhsh <me@drkhsh.at>
Signed-off-by: drkhsh <me@drkhsh.at>
3 years agouptime: Use sizeof instead of repeating the size
planet36 [Thu, 25 Mar 2021 17:05:48 +0000 (13:05 -0400)]
uptime: Use sizeof instead of repeating the size

Signed-off-by: drkhsh <me@drkhsh.at>
3 years agokeymap: Variable "layout" should be const
planet36 [Fri, 5 Mar 2021 19:35:24 +0000 (14:35 -0500)]
keymap: Variable "layout" should be const

Signed-off-by: drkhsh <me@drkhsh.at>
3 years agodisk: Cast fsblkcnt_t to double instead of float
planet36 [Fri, 5 Mar 2021 19:28:15 +0000 (14:28 -0500)]
disk: Cast fsblkcnt_t to double instead of float

Signed-off-by: drkhsh <me@drkhsh.at>
3 years agoverr: Remove special "usage" case
planet36 [Fri, 5 Mar 2021 19:20:29 +0000 (14:20 -0500)]
verr: Remove special "usage" case

In function verr, remove special case for "usage"
string

Co-authored-by: drkhsh <me@drkhsh.at>
Signed-off-by: drkhsh <me@drkhsh.at>
3 years agoconfig.def.h: Remove stray double quote in comment
planet36 [Fri, 5 Mar 2021 19:19:49 +0000 (14:19 -0500)]
config.def.h: Remove stray double quote in comment

Signed-off-by: drkhsh <me@drkhsh.at>
3 years agoUpdate README
drkhsh [Mon, 19 Dec 2022 01:41:19 +0000 (02:41 +0100)]
Update README

3 years agobattery: Fix remaining on Linux
Patrick Iacob [Sun, 27 Nov 2022 04:11:01 +0000 (20:11 -0800)]
battery: Fix remaining on Linux

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.

3 years agoNew component: cat
drkhsh [Wed, 23 Nov 2022 22:59:51 +0000 (23:59 +0100)]
New component: cat

Generically reads an arbitrary file natively.

Saves a few layers of execution in comparison to using `run_command`
with an argument like `cat ./file`.

3 years agoREADME: Add note about FreeBSD sndio dep
drkhsh [Thu, 27 Oct 2022 22:47:06 +0000 (00:47 +0200)]
README: Add note about FreeBSD sndio dep

3 years agoradical re-formatting 3/3: Error checks
drkhsh [Thu, 27 Oct 2022 22:21:02 +0000 (00:21 +0200)]
radical re-formatting 3/3: Error checks

Check for `< 0` instead of `== -1`.

Fixes coding style. Formatting commits suck, incoherent coding style
sucks more.
https://suckless.org/coding_style/

3 years agoradical re-formatting 2/3: Fix blocks
drkhsh [Thu, 27 Oct 2022 22:51:34 +0000 (00:51 +0200)]
radical re-formatting 2/3: Fix blocks

Fixes coding style. Formatting commits suck, incoherent coding style
sucks more.
https://suckless.org/coding_style/

3 years agoradical re-formatting 1/3: Fix spacing
drkhsh [Thu, 27 Oct 2022 22:49:31 +0000 (00:49 +0200)]
radical re-formatting 1/3: Fix spacing

Fixes coding style. Formatting commits suck, incoherent coding style
sucks more.
https://suckless.org/coding_style/

3 years agoradical re-formatting 0/3: Alphabetic headers
drkhsh [Thu, 27 Oct 2022 21:18:30 +0000 (23:18 +0200)]
radical re-formatting 0/3: Alphabetic headers

Except stated otherwise in comment.

Fixes coding style. Formatting commits suck, incoherent coding style
sucks more.
https://suckless.org/coding_style/

3 years agoram: Refactor on OpenBSD
drkhsh [Thu, 27 Oct 2022 22:13:12 +0000 (00:13 +0200)]
ram: Refactor on OpenBSD

Fixes up overly complicated lines, by splitting up logic

3 years agoram: Refactor Linux perc/used
drkhsh [Thu, 27 Oct 2022 22:11:15 +0000 (00:11 +0200)]
ram: Refactor Linux perc/used

Fixes up overly complicated line, by splitting up logic

3 years agobattery: Refactor remaining on OpenBSD
drkhsh [Thu, 27 Oct 2022 21:47:01 +0000 (23:47 +0200)]
battery: Refactor remaining on OpenBSD

Fixes up overly complicated line, by splitting up logic

3 years agotemp: Put sysctl into define to avoid line wraps
drkhsh [Thu, 27 Oct 2022 22:15:21 +0000 (00:15 +0200)]
temp: Put sysctl into define to avoid line wraps

Long, wrapped, multi-line if statements suck to read.
This fixes readability.

3 years agovarious: Put paths into defines to avoid line wraps
drkhsh [Thu, 27 Oct 2022 21:44:52 +0000 (23:44 +0200)]
various: Put paths into defines to avoid line wraps

Long, wrapped, multi-line if statements suck to read.
This fixes readability in the worst places by packing format strings for
paths into defines.

3 years agoseparator: kill that useless thing
drkhsh [Thu, 27 Oct 2022 20:14:20 +0000 (22:14 +0200)]
separator: kill that useless thing

Just use the format strings dude. :)

3 years agodo not rely on obsolete feature
NRK [Wed, 26 Oct 2022 20:16:05 +0000 (02:16 +0600)]
do not rely on obsolete feature

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.

3 years agocomponents/*.c: include slstatus.h
NRK [Wed, 26 Oct 2022 20:14:53 +0000 (02:14 +0600)]
components/*.c: include slstatus.h

this gives the compiler a chance to check weather the prototype and
definiton matches or not, which would catch issues like 3c47701.

3 years agoAdd 'Not charging' status support
Spenser Truex [Wed, 26 Oct 2022 19:34:47 +0000 (21:34 +0200)]
Add 'Not charging' status support

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)

3 years agoAdd comment about mixer oss module to README
drkhsh [Wed, 26 Oct 2022 10:57:12 +0000 (12:57 +0200)]
Add comment about mixer oss module to README

3 years agoUpdate LICENSE
drkhsh [Wed, 19 Oct 2022 23:24:08 +0000 (01:24 +0200)]
Update LICENSE

3 years agoReset sndiod initialization flag on disconnects
Ingo Feinerer [Mon, 15 Feb 2021 11:56:42 +0000 (12:56 +0100)]
Reset sndiod initialization flag on disconnects

If the connection is lost to the sndiod(8) daemon reset the
initialization to allow for a graceful restart.

3 years agoMake volume component work on FreeBSD
michaelbuch12@gmail.com [Fri, 1 Jan 2021 15:52:57 +0000 (16:52 +0100)]
Make volume component work on FreeBSD

- Edit compile instructions
- Reuse OpenBSD sndio implementation

3 years agoFix RAM component on FreeBSD
michaelbuch12@gmail.com [Fri, 1 Jan 2021 16:04:36 +0000 (17:04 +0100)]
Fix RAM component on FreeBSD

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.

3 years agoFix keyboard_indicators() prototype
NRK [Sat, 27 Aug 2022 14:40:20 +0000 (20:40 +0600)]
Fix keyboard_indicators() prototype

according to both the function definition and the comment in
config.def.h, keyboard_indicators() should take a format string.

5 years agoUpdate README
Aaron Marcher [Mon, 30 Nov 2020 20:32:14 +0000 (21:32 +0100)]
Update README

5 years agoUpdate LICENSE
Aaron Marcher [Mon, 30 Nov 2020 20:26:40 +0000 (21:26 +0100)]
Update LICENSE

5 years agoAdd comment for FreeBSD to config.mk
Aaron Marcher [Mon, 30 Nov 2020 19:56:21 +0000 (20:56 +0100)]
Add comment for FreeBSD to config.mk

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)

5 years agoUse the sioctl_open(3) OpenBSD API to access vol
Ingo Feinerer [Sat, 9 May 2020 10:03:20 +0000 (12:03 +0200)]
Use the sioctl_open(3) OpenBSD API to access vol

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

5 years agoAdd a -1 option flag
Daniel Moch [Tue, 23 Jun 2020 20:35:43 +0000 (16:35 -0400)]
Add a -1 option flag

Allow slstatus to be used by programs that can grab status by calling
an external program on a periodic basis (e.g. tmux)

5 years agoHandle SIGUSR1 for forced refreshes
Mart Lubbers [Thu, 18 Jun 2020 06:46:12 +0000 (08:46 +0200)]
Handle SIGUSR1 for forced refreshes

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

5 years agoFix temperature reporting on OpenBSD
dsp [Fri, 1 Nov 2019 04:50:32 +0000 (22:50 -0600)]
Fix temperature reporting on OpenBSD

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

5 years agoFull battery indicator
Cem Keylan [Wed, 2 Oct 2019 08:31:54 +0000 (11:31 +0300)]
Full battery indicator

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.

5 years agoAdd separator module
Ryan Kes [Sat, 30 Mar 2019 12:45:05 +0000 (13:45 +0100)]
Add separator module

7 years agoFollow International System of Units spacing rules
Ingo Feinerer [Sat, 16 Feb 2019 16:59:44 +0000 (17:59 +0100)]
Follow International System of Units spacing rules

7 years agoAdd OS-support notice to README
Aaron Marcher [Sat, 16 Feb 2019 16:05:04 +0000 (17:05 +0100)]
Add OS-support notice to README

7 years agoAdd ram and swap components on FreeBSD
Michael Buch [Sat, 16 Feb 2019 01:26:44 +0000 (01:26 +0000)]
Add ram and swap components on FreeBSD

7 years agocpu_perc: Check for division by zero
Ingo Feinerer [Thu, 14 Feb 2019 18:25:51 +0000 (19:25 +0100)]
cpu_perc: Check for division by zero

7 years agoFix CPU frequency on OpenBSD
Ingo Feinerer [Wed, 13 Feb 2019 14:45:40 +0000 (15:45 +0100)]
Fix CPU frequency on OpenBSD

7 years agoclose file descriptors and fix return values
Michael Buch [Wed, 13 Feb 2019 14:16:17 +0000 (14:16 +0000)]
close file descriptors and fix return values

7 years agoAdd native OpenBSD support for mute/volume
Ingo Feinerer [Fri, 8 Feb 2019 14:37:17 +0000 (15:37 +0100)]
Add native OpenBSD support for mute/volume

Based on functionality in dstat by Joerg Jung.

7 years agowifi component on FreeBSD
Michael Buch [Wed, 13 Feb 2019 00:47:23 +0000 (00:47 +0000)]
wifi component on FreeBSD

7 years agoAdd FreeBSD support for netspeeds, entropy and ip components
Michael Buch [Wed, 30 Jan 2019 11:21:54 +0000 (11:21 +0000)]
Add FreeBSD support for netspeeds, entropy and ip components

7 years agoUpdate LICENSE
Aaron Marcher [Tue, 5 Feb 2019 08:32:47 +0000 (09:32 +0100)]
Update LICENSE

7 years agoAdd support for cpu and uptime components on FreeBSD
Michael Buch [Tue, 5 Feb 2019 02:44:37 +0000 (02:44 +0000)]
Add support for cpu and uptime components on FreeBSD

7 years agoAdd FreeBSD support for temperature and battery components
Michael Buch [Sun, 27 Jan 2019 15:44:39 +0000 (15:44 +0000)]
Add FreeBSD support for temperature and battery components

7 years agoram: Consistency with line breaks
Aaron Marcher [Sun, 8 Jul 2018 15:45:32 +0000 (17:45 +0200)]
ram: Consistency with line breaks

7 years agoFix whitespace
Aaron Marcher [Sun, 8 Jul 2018 15:44:53 +0000 (17:44 +0200)]
Fix whitespace

7 years agoConsistency with 80 char limit and breaks
Aaron Marcher [Sun, 8 Jul 2018 15:42:58 +0000 (17:42 +0200)]
Consistency with 80 char limit and breaks

7 years agowifi_perc: Simplify on Linux
Aaron Marcher [Sat, 7 Jul 2018 12:05:53 +0000 (14:05 +0200)]
wifi_perc: Simplify on Linux

Remove unnecessary variable

7 years agoSimplify format specifiers for uintmax_t
Aaron Marcher [Sat, 7 Jul 2018 09:08:26 +0000 (11:08 +0200)]
Simplify format specifiers for uintmax_t

7 years agocpu_freq: Simplify with E-notation
Aaron Marcher [Sat, 7 Jul 2018 08:56:10 +0000 (10:56 +0200)]
cpu_freq: Simplify with E-notation

Thanks to the FRIGN

7 years agocpu_freq: Change to 64 bit integers
Aaron Marcher [Sat, 7 Jul 2018 08:54:12 +0000 (10:54 +0200)]
cpu_freq: Change to 64 bit integers

Remove unnecessary cast to size_t

7 years agoChange uint64_t to uintmax_t
Aaron Marcher [Sat, 7 Jul 2018 08:50:25 +0000 (10:50 +0200)]
Change uint64_t to uintmax_t

7 years agobattery: 64 bit ints on Linux
Aaron Marcher [Sat, 7 Jul 2018 08:31:57 +0000 (10:31 +0200)]
battery: 64 bit ints on Linux

7 years agocpu: Use uint64_t on OpenBSD
Aaron Marcher [Fri, 6 Jul 2018 22:24:36 +0000 (00:24 +0200)]
cpu: Use uint64_t on OpenBSD

7 years agobattery: Remove unnecessary defines for paths
Aaron Marcher [Fri, 6 Jul 2018 21:55:18 +0000 (23:55 +0200)]
battery: Remove unnecessary defines for paths

7 years agouptime: Improve typing and sort headers
Aaron Marcher [Fri, 6 Jul 2018 21:47:52 +0000 (23:47 +0200)]
uptime: Improve typing and sort headers

7 years agotemperature: Improve types
Aaron Marcher [Fri, 6 Jul 2018 21:41:02 +0000 (23:41 +0200)]
temperature: Improve types

7 years agoram: Check for theoretical division by zero
Aaron Marcher [Fri, 6 Jul 2018 21:38:12 +0000 (23:38 +0200)]
ram: Check for theoretical division by zero

7 years agoram: Use POSIX types
Aaron Marcher [Fri, 6 Jul 2018 21:37:05 +0000 (23:37 +0200)]
ram: Use POSIX types

7 years agoentropy: Use POSIX types for format specifiers
Aaron Marcher [Fri, 6 Jul 2018 21:26:12 +0000 (23:26 +0200)]
entropy: Use POSIX types for format specifiers