You are not logged in.

#1 2011-06-30 10:59:33

0mark
Member
From: earth
Registered: 2010-06-09
Posts: 139
Website

statinator4k, status tool in C (not only for dwm)

Gathers cpu, cpu temp (with acpi), ram, net, wifi, battery, cpu clock and date/time info as well as notifications. Outputs either on stdout or as root window title (for dwm). Output formats for dwm, dwm with colostatusbar patch, dwm-sprinkles and HTML are provided (html is WIP) and relatively easy to create. MPD, acpi thermal and lm_sensors thermal support is planned.
Im open for more ideas what (and how) to monitor or to output to or how to format, even more so for patches.

The Project is based on this one: http://www.mail-archive.com/dwm@suckles … 06122.html

Here is the svn:
https://svn.0mark.unserver.de/statinator4k/
and a Bug tracker:
http://0mark.unserver.de/flyspray/index.php?project=6

*edit:* renamed from dstat to statinator4k, because its more cool(TM) and dstat was used by some other stuff

Last edited by 0mark (2011-07-01 18:50:26)


Ceterum autem censeo Systemdinem esse delendam

Offline

#2 2011-06-30 11:15:07

lucke
Member
From: Poland
Registered: 2004-11-30
Posts: 4,018

Re: statinator4k, status tool in C (not only for dwm)

The choice of the name isn't most opportune, as a project called dstat already exists. http://dag.wieers.com/home-made/dstat/

Offline

#3 2011-06-30 11:25:20

lchr
Member
From: Denmark
Registered: 2011-05-10
Posts: 38
Website

Re: statinator4k, status tool in C (not only for dwm)

Might I suggest renaming it to the STATINATOR 4000?

Offline

#4 2011-06-30 11:35:28

0mark
Member
From: earth
Registered: 2010-06-09
Posts: 139
Website

Re: statinator4k, status tool in C (not only for dwm)

lchr wrote:

Might I suggest renaming it to the STATINATOR 4000?

You might, i do big_smile


Ceterum autem censeo Systemdinem esse delendam

Offline

#5 2011-06-30 11:44:17

lchr
Member
From: Denmark
Registered: 2011-05-10
Posts: 38
Website

Re: statinator4k, status tool in C (not only for dwm)

0mark wrote:
lchr wrote:

Might I suggest renaming it to the STATINATOR 4000?

You might, i do big_smile

hahaha, brilliant big_smile

Offline

#6 2011-06-30 12:03:25

litemotiv
Forum Fellow
Registered: 2008-08-01
Posts: 5,026

Re: statinator4k, status tool in C (not only for dwm)

lol tongue


ᶘ ᵒᴥᵒᶅ

Offline

#7 2011-07-01 13:06:28

0mark
Member
From: earth
Registered: 2010-06-09
Posts: 139
Website

Re: statinator4k, status tool in C (not only for dwm)

Added network monitor and fixed format for colorbar patch and dwm-sprinkles.


Ceterum autem censeo Systemdinem esse delendam

Offline

#8 2011-07-20 10:42:18

0mark
Member
From: earth
Registered: 2010-06-09
Posts: 139
Website

Re: statinator4k, status tool in C (not only for dwm)

Added volume and support for cmus and mpd.

Example with dwm-sprinkles (my daily used config, so its pretty tuned up):
s4k-dwmsprinkles.k.png
And a notification:
s4k-notify.k.png

With dwm with colorbar patch (other pc, some info is not available):
s4k-dwmcolorbar.k.png

Text output with mainline dwm formater (same setup as above):

 C 7% | M 79% | eth0 UP | V 54% | 20 Jul 2011 - 12:41

Atm, only the dwm-sprinkles formater has a good default output. I dont use the other, so they are pretty dull now. On the other Hand, i doubt that any two users will use the same output smile

Last edited by 0mark (2011-07-20 10:47:08)


Ceterum autem censeo Systemdinem esse delendam

Offline

#9 2011-07-20 17:13:35

apefish
Member
From: Vancouver
Registered: 2010-07-13
Posts: 47

Re: statinator4k, status tool in C (not only for dwm)

That's pretty neat. How does the dwm-sprinkles example do the icons and stuff?
I didn't think dwm-sprinkles was that advanced. Or is that with a dzen overlay or something?

Keep up the good work, I'll try it out!

EDIT: Could you post a PKGBUILD?

Last edited by apefish (2011-07-20 19:36:43)

Offline

#10 2011-07-20 20:58:02

0mark
Member
From: earth
Registered: 2010-06-09
Posts: 139
Website

Re: statinator4k, status tool in C (not only for dwm)

I started sprinkles mostly for the Bar. It can now display bitmaps (out of a set of char arrays, defined at compile time*), simple bar graphs (cmus track postion and cpu load), or use bitmaps as bar graphs (volume, wifi and cpu clock). Full color support is also available. And a systray**. I think about using the parser that does the status bar in all strings in the bar, so one can have bitmaps for tiling mode, tags etc. Maybe even window titles, seems a pretty lightweight way to display status stuff smile

I do not know if s4k can be used with dzen, but if someone provides a formater i will gladly include it.

* I know... im working on a pbm reader. Actually, i have the source for one, but another project is holding me back smile

** A bit buggy, sometimes it leaves gaps. I have fixed that thrice, but it happens anyway wink

*edit*: And thanks big_smile

Last edited by 0mark (2011-07-20 21:00:26)


Ceterum autem censeo Systemdinem esse delendam

Offline

#11 2011-07-21 08:43:53

0mark
Member
From: earth
Registered: 2010-06-09
Posts: 139
Website

Re: statinator4k, status tool in C (not only for dwm)


Ceterum autem censeo Systemdinem esse delendam

Offline

#12 2011-11-30 01:20:08

Mr Pink57
Member
From: a van down by the river
Registered: 2009-05-30
Posts: 91
Website

Re: statinator4k, status tool in C (not only for dwm)

Sorry to revive this old thread but it was the only one I could find on this topic.

I guess I am a little confused on how to actually start it, my assumption was to add the config.h info it provides into my dwm-sprinkles but that just creates a lot of errors.  Maybe I am suppose to add this to my .xinitrc?

Thanks.


Even a broken clock is right twice a day.

Diplomacy without force is like music without instruments.

Offline

#13 2011-11-30 11:12:56

0mark
Member
From: earth
Registered: 2010-06-09
Posts: 139
Website

Re: statinator4k, status tool in C (not only for dwm)

Mr Pink57 wrote:

I guess I am a little confused on how to actually start it, my assumption was to add the config.h info it provides into my dwm-sprinkles but that just creates a lot of errors.  Maybe I am suppose to add this to my .xinitrc?

You need to configure and compile s4k, and then just run it, eg from .xinitrc. To configure, just select a output formater in config.mk (formats_dwm.h for vanilla dwm, formats_dwm_colorbar.h for dwm with statuscolor patch and formats_dwm_sprinkles.h for the pimped bar in dwm sprinkles). Then configure the used sensors and stuff by config.h. Finally, when you dislike the output you can configure that by altering yout formats_*.h file. Then compile, the resulting binary can be executed without installation. You can also do make install, and copy you config.mk, config.h and formats_*.h to $XDG_CONFIG_HOME/s4k, then run s4km instead of s4k, it will then recompile s4k whenever you change the config.h


Ceterum autem censeo Systemdinem esse delendam

Offline

#14 2013-02-03 19:55:59

azb
Member
Registered: 2013-02-03
Posts: 14

Re: statinator4k, status tool in C (not only for dwm)

Could you tell which packages are required for compiling in case of Debian?

Offline

#15 2013-02-04 10:01:42

Asmir
Member
From: BiH
Registered: 2011-10-06
Posts: 67

Re: statinator4k, status tool in C (not only for dwm)

I got this error when I try to compile it with dwm_colorbar:

statinator4k build options:
CFLAGS   = -std=c99 -pedantic -Wall -Os -I. -I/usr/include -I/usr/X11R6/include -I/usr/include/dbus-1.0 -I/usr/lib/dbus-1.0/include  -DVERSION="20.1" -DUSE_X11 -DUSE_SOCKETS -DUSE_NOTIFY -DUSE_ALSAVOL -DFORMAT_METHOD="formats_dwm_colorbar.h"
LDFLAGS  = -L/usr/lib -lc -L/usr/X11R6/lib -lX11 -ldbus-1  -lasound
CC       = cc
CC s4k.c
s4k.c: In function ‘get_brightness’:
s4k.c:614:2: warning: implicit declaration of function ‘brightness_format’ [-Wimplicit-function-declaration]
CC notify.c
CC -o s4k
s4k.o: In function `get_brightness':
s4k.c:(.text+0x1886): undefined reference to `brightness_format'
collect2: error: ld returned 1 exit status
make: *** [s4k] Error 1
zsh: exit 2     make

And with clang compiler:

statinator4k build options:
CFLAGS   = -std=c99 -pedantic -Wall -Os -I. -I/usr/include -I/usr/X11R6/include -I/usr/include/dbus-1.0 -I/usr/lib/dbus-1.0/include  -DVERSION="20.1" -DUSE_X11 -DUSE_SOCKETS -DUSE_NOTIFY -DUSE_ALSAVOL -DFORMAT_METHOD="formats_dwm_colorbar.h"
LDFLAGS  = -L/usr/lib -lc -L/usr/X11R6/lib -lX11 -ldbus-1  -lasound
CC       = clang
CC s4k.c
s4k.c:529:30: warning: comparison of unsigned expression < 0 is always false [-Wtautological-compare]
                                if(battery_stats[i].rate < 0) battery_stats[i].rate=1;
                                   ~~~~~~~~~~~~~~~~~~~~~ ^ ~
s4k.c:614:2: warning: implicit declaration of function 'brightness_format' is invalid in C99 [-Wimplicit-function-declaration]
        brightness_format(status);
        ^
2 warnings generated.
CC notify.c
CC -o s4k
s4k.o:s4k.c:function get_brightness: error: undefined reference to 'brightness_format'
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [s4k] Error 1
zsh: exit 2     make

And compiling it with dwm_sprinkless works fine. hmm

Offline

#16 2013-04-18 16:55:35

0mark
Member
From: earth
Registered: 2010-06-09
Posts: 139
Website

Re: statinator4k, status tool in C (not only for dwm)

Asmir wrote:

I got this error when I try to compile it with dwm_colorbar:

Sorry, i had quite a lot of work the last few months. I also have messed a bit with the svn, currently its not really working. Well, it works for me with the sprinkles format, but the others are more or less defunct. I will try to fix that soon.


Ceterum autem censeo Systemdinem esse delendam

Offline

Board footer

Powered by FluxBB