[hackers] [slstatus] battery: Minor coding style fixes || Aaron Marcher

2018-05-20 Thread git
commit 103945e7bb8d3a4198cf175b8f6be09fe53ab9e1 Author: Aaron Marcher AuthorDate: Mon May 21 00:36:59 2018 +0200 Commit: Aaron Marcher CommitDate: Mon May 21 00:38:13 2018 +0200 battery: Minor coding style fixes - Line length - Spacing

[hackers] [slstatus] battery_remaining: check for division by zero || Aaron Marcher

2018-05-20 Thread git
commit aa8654795da19a8d517faf1b84cd4dc4ac75f6e7 Author: Aaron Marcher AuthorDate: Mon May 21 00:42:06 2018 +0200 Commit: Aaron Marcher CommitDate: Mon May 21 00:42:06 2018 +0200 battery_remaining: check for division by zero diff --git

[hackers] [slstatus] battery_remaining: Change float to double || Aaron Marcher

2018-05-20 Thread git
commit a546d4b585234f66b82e048c2d7cb228b9e7fea4 Author: Aaron Marcher AuthorDate: Mon May 21 00:41:03 2018 +0200 Commit: Aaron Marcher CommitDate: Mon May 21 00:41:03 2018 +0200 battery_remaining: Change float to double diff --git

[hackers] [slstatus] Increase readability for load_uvmexp return || Aaron Marcher

2018-05-20 Thread git
commit bae576cd221ef8f30195d6927cf935a797ac5a02 Author: Aaron Marcher AuthorDate: Mon May 21 00:29:54 2018 +0200 Commit: Aaron Marcher CommitDate: Mon May 21 00:29:54 2018 +0200 Increase readability for load_uvmexp return diff --git

[hackers] [slstatus] Remove units from numbers || Aaron Marcher

2018-05-20 Thread git
commit ec5c35ec9f23254f09e734d0c1880559774dfa52 Author: Aaron Marcher AuthorDate: Mon May 21 00:16:54 2018 +0200 Commit: Aaron Marcher CommitDate: Mon May 21 00:16:54 2018 +0200 Remove units from numbers This is a first step to decouple

[hackers] [slstatus] swap_perc: check for division by zero on obsd too || Aaron Marcher

2018-05-20 Thread git
commit 4bd234c7ef7224117a6e50eda4ce3184338daab1 Author: Aaron Marcher AuthorDate: Mon May 21 00:02:33 2018 +0200 Commit: Aaron Marcher CommitDate: Mon May 21 00:02:33 2018 +0200 swap_perc: check for division by zero on obsd too diff --git

[hackers] [slstatus] swap_perc: check for division by zero || Aaron Marcher

2018-05-20 Thread git
commit 806815778fe75f13b569a1b5fe6d6d74a50c89ff Author: Aaron Marcher AuthorDate: Sun May 20 23:53:26 2018 +0200 Commit: Aaron Marcher CommitDate: Sun May 20 23:53:26 2018 +0200 swap_perc: check for division by zero diff --git a/components/swap.c

Re: [hackers] slstatus keymap patch idea

2018-05-20 Thread Michael Buch
Cool, I’ll see if i can put something together for linux. Regards, Michael On Sun, 20 May 2018 at 22:42, Aaron Marcher wrote: > Michael, > > > I’ve been using slstatus for a while and am really enjoying it. > > Thanks! > > > Was thinking of adding a patch to the current

Re: [hackers] slstatus keymap patch idea

2018-05-20 Thread Aaron Marcher
Michael, I’ve been using slstatus for a while and am really enjoying it. Thanks! Was thinking of adding a patch to the current slstatus for a keymap indicator component. Is it worth adding this feature now or later after the release as a custom patch? I thought about the same thing a few

[hackers] slstatus keymap patch idea

2018-05-20 Thread Michael Buch
Hey, I’ve been using slstatus for a while and am really enjoying it. One thing I sometimes struggle with is keeping track of keyboard layouts. Was thinking of adding a patch to the current slstatus for a keymap indicator component. Is it worth adding this feature now or later after the release

Re: [hackers] [PATCH slstatus] Add basic backlight percentage support

2018-05-20 Thread Aaron Marcher
David, Done and done. do you send an updated patch with the check for != 1 for pscanf and the division by zero here or should I add it after applying? Good catch, what do you recommend if max is 0? Resetting to 100? Or to return NULL to indicate an error? I am not quite sure but if the

[hackers] [slstatus] Add David Demelier to LICENSE || Aaron Marcher

2018-05-20 Thread git
commit d8ce4e694217bc69e95372f705d023e71dd70115 Author: Aaron Marcher AuthorDate: Sun May 20 22:16:39 2018 +0200 Commit: Aaron Marcher CommitDate: Sun May 20 22:16:39 2018 +0200 Add David Demelier to LICENSE diff --git a/LICENSE b/LICENSE index

Re: [hackers] [PATCH slstatus] Support energy_now/power_now in battery_remaining

2018-05-20 Thread Aaron Marcher
David, thanks for the patch. I applied it. Cheers! Aaron -- Web: https://drkhsh.at/ or http://drkhsh5rv6pnahas.onion/ Gopher: gopher://drkhsh.at or gopher://drkhsh5rv6pnahas.onion GPG: 0x7A65E38D55BE96FE Fingerprint: 4688 907C 8720 3318 0D9F AFDE 7A65 E38D 55BE 96FE

[hackers] [slstatus] Support energy_now/power_now in battery_remaining || David Demelier

2018-05-20 Thread git
commit f386a03a20ca3de30f761dba52d9d7196e3544e4 Author: David Demelier AuthorDate: Sun May 20 09:42:16 2018 +0200 Commit: Aaron Marcher CommitDate: Sun May 20 22:12:44 2018 +0200 Support energy_now/power_now in battery_remaining On some

Re: [hackers] [slstatus][PATCH] ip: fixed memory leak

2018-05-20 Thread Aaron Marcher
Tobias, thank you very much! Cheers! Aaron -- Web: https://drkhsh.at/ or http://drkhsh5rv6pnahas.onion/ Gopher: gopher://drkhsh.at or gopher://drkhsh5rv6pnahas.onion GPG: 0x7A65E38D55BE96FE Fingerprint: 4688 907C 8720 3318 0D9F AFDE 7A65 E38D 55BE 96FE

[hackers] [slstatus] ip: fixed memory leak || Tobias Tschinkowitz

2018-05-20 Thread git
commit 1cd8a7b5109311e03fe9de2372c7adc483445db7 Author: Tobias Tschinkowitz AuthorDate: Sun May 20 15:53:48 2018 +0200 Commit: Aaron Marcher CommitDate: Sun May 20 22:06:54 2018 +0200 ip: fixed memory leak free the interface list before

Re: [hackers] [PATCH slstatus] Add basic backlight percentage support

2018-05-20 Thread David Demelier
On Sun, May 20, 2018 at 03:18:14PM +0200, Hiltjo Posthuma wrote: > On Sun, May 20, 2018 at 02:21:36PM +0200, David Demelier wrote: > > +const char * > > +backlight_perc(const char *card) > > +{ > > + char path[PATH_MAX]; > > + int max, cur; > > + > > + if (esnprintf(path, sizeof (path),

[hackers] [slstatus][PATCH] ip: fixed memory leak

2018-05-20 Thread Tobias Tschinkowitz
free the interface list before returning from the function --- components/ip.c | 1 + 1 file changed, 1 insertion(+) diff --git a/components/ip.c b/components/ip.c index 0b6293e..468dc84 100644 --- a/components/ip.c +++ b/components/ip.c @@ -31,6 +31,7 @@ ip(const char *iface, unsigned short

Re: [hackers] [PATCH slstatus] Add basic backlight percentage support

2018-05-20 Thread Hiltjo Posthuma
On Sun, May 20, 2018 at 02:21:36PM +0200, David Demelier wrote: > At the moment linux only, but will add support for FreeBSD and OpenBSD > as well. > --- > Makefile | 1 + > components/backlight.c | 33 + > slstatus.h | 3 +++ > 3 files

[hackers] [PATCH slstatus] Add basic backlight percentage support

2018-05-20 Thread David Demelier
At the moment linux only, but will add support for FreeBSD and OpenBSD as well. --- Makefile | 1 + components/backlight.c | 33 + slstatus.h | 3 +++ 3 files changed, 37 insertions(+) create mode 100644 components/backlight.c diff

[hackers] [PATCH slstatus] Support energy_now/power_now in battery_remaining

2018-05-20 Thread 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. --- components/battery.c | 41 +++--