[hackers] [slstatus][PATCH] wifi: fixed disconnected wifi status on openbsd

2018-05-31 Thread Tobias Tschinkowitz
>From be0734685e9b5e0da906d06f08b027024c549c2f Mon Sep 17 00:00:00 2001 From: Tobias Tschinkowitz Date: Thu, 31 May 2018 11:53:28 +0200 Subject: [PATCH] wifi: fixed disconnected wifi status on openbsd --- Hi! if wifi is disconnected we cannot retrieve its ssid and signal strength. So i ad

Re: [hackers] [slstatus][PATCH] backlight: implemented openbsd support

2018-05-24 Thread Tobias Tschinkowitz
On Thu, May 24, 2018 at 02:55:28PM +0200, Aaron Marcher wrote: > Hi, > > > i have implemented basic support for the backlight function on OpenBSD. > > The problem here is that /dev/ttyC0 permission is 600 (root:wheel) so a > > user cannot read from the device without changing the permission or >

[hackers] [slstatus][PATCH] ram: fixed int overflow on pagetok macro

2018-05-24 Thread Tobias Tschinkowitz
--- components/ram.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/ram.c b/components/ram.c index 0ac9753..0333b3b 100644 --- a/components/ram.c +++ b/components/ram.c @@ -75,7 +75,7 @@ #include #define LOG1024 10 - #define

Re: [hackers] [slstatus][PATCH] backlight: implemented openbsd support

2018-05-23 Thread Tobias Tschinkowitz
On Wed, May 23, 2018 at 04:30:41PM -0300, lucas wrote: Lucas, > Tobias, > > > See my notes below the commit message of the patch. > > I saw the note just after sending the email. My bad. Still, I think that > slstatus shouldn't be run as root. It would be nice to find a workaround > when

Re: [hackers] [slstatus][PATCH] backlight: implemented openbsd support

2018-05-23 Thread Tobias Tschinkowitz
On Wed, May 23, 2018 at 03:57:37PM -0300, lucas wrote: > Hi Tobias, > > Two notes below > > > diff --git a/components/backlight.c b/components/backlight.c > > index f9c4096..21e06a1 100644 > > --- a/components/backlight.c > > +++ b/components/backlight.c > > @@ -29,4 +29,30 @@ > > > >

[hackers] [slstatus][PATCH] backlight: implemented openbsd support

2018-05-23 Thread Tobias Tschinkowitz
implemented openbsd support for the backlight function. this only works when running slstatus as superuser. --- Hi Guys, i have implemented basic support for the backlight function on OpenBSD. The problem here is that /dev/ttyC0 permission is 600 (root:wheel) so a user cannot read from the

[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

[hackers] [slstatus][PATCH] netspeeds: added error condition for openbsd

2018-05-19 Thread Tobias Tschinkowitz
implemented additional error condition for openbsd netstat in case the interface could not be found in the interface list or if_data is not readable. --- components/netspeeds.c | 14 -- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/components/netspeeds.c

[hackers] [slstatus][PATCH] implemented openbsd netspeed functions

2018-05-18 Thread Tobias Tschinkowitz
implemented the netspeed functionality for openbsd. furthermore the static keyword was removed of the interval variable in config.def.h for usage as extern variable. --- components/netspeeds.c | 60 +- config.def.h | 2 +- 2 files

[hackers] [slstat_new][PATCH] battery: fixed remaining time on connected AC

2018-05-18 Thread Tobias Tschinkowitz
when an AC is connected apm_info shows a non-valid value for remaining minutes. it was decided that in that case the function should return an empty string. --- components/battery.c | 8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/components/battery.c

[hackers] [slstatus][PATCH] added battery_remaining function

2018-05-18 Thread Tobias Tschinkowitz
implementation of a battery_remaining function which returns the remaining battery time in HH:MM format. linux function still needs implementation. --- Hi! I added a function which shows the remaining battery time. As i dont have a linux machine at the moment i would like to leave the

[hackers] [slstatus][PATCH] suggestion: add user defined format callback

2018-05-17 Thread Tobias Tschinkowitz
Hi! This is just a suggestion, so not really something to commit right away. What do you think about a callback function where the user could define more precisely how formatting is done (like adding symbols for percentages etc.) I just prepared a little patch to show what i mean. Greetings,

[hackers] [slstatus][PATCH] added comment for temp function (openbsd)

2018-05-17 Thread Tobias Tschinkowitz
--- config.def.h | 1 + 1 file changed, 1 insertion(+) diff --git config.def.h config.def.h index ef64b16..00796c6 100644 --- config.def.h +++ config.def.h @@ -43,6 +43,7 @@ static const char unknown_str[] = "n/a"; * swap_usedused swap in GB NULL * temp

[hackers] [slstatus][patch] corrected calculations for disk space

2018-05-17 Thread Tobias Tschinkowitz
Hi Aaron, i checked the complete functionality now for openbsd and had just some different values for my disk space (compared it to df(1)). The rest is working fine! Greets, Tobias --- components/disk.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git components/disk.c

[hackers] [slstatus][patch] added wifi functionality for openbsd

2018-05-16 Thread Tobias Tschinkowitz
Heyho, just added wifi functionality for openbsd (display ESSID and signal strength percentage) Greets, Tobias --- components/wifi.c | 76 ++- 1 file changed, 75 insertions(+), 1 deletion(-) diff --git components/wifi.c components/wifi.c

[hackers] [slstatus][patch] corrected calculation for swap on openbsd

2018-05-16 Thread Tobias Tschinkowitz
Hi again! 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. Greetings, Tobias --- components/swap.c | 12 +--- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git

[hackers] [slstatus][patch] consistent calculation of ram_* on openbsd

2018-05-16 Thread Tobias Tschinkowitz
Just to add a little more consistency in the calculation... Greets, Tobias --- components/ram.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git components/ram.c components/ram.c index 1178837..57081d2 100644 --- components/ram.c +++ components/ram.c @@ -60,6 +60,7 @@