53 Commits (0f7a34fa310737d94a0d46a0286082fdfaf68ca3)

Author SHA1 Message Date
Aaron Marcher 66a7fb16fc Remove cpu_iowait
The third value from load_avg (idle) gives us almost the same
information as cpu_iowait. Plus OpenBSD does not offer an iowait value
as Linux and thus the corresponding function would not be portable.
8 years ago
Aaron Marcher af3cdfbbc8 Add examples to config.def.h 8 years ago
Aaron Marcher 4f5ac5d9fe Remove battery_power for various reasons
- Battery power cannot be easily gatherable via apm(4)
- IMHO it does not represent essential information
8 years ago
Aaron Marcher 97ef7c2a1d Remove non-portable functions from config.def.h 8 years ago
Kurt Van Dijck 72a5e52a35
slstatus: add cpu_iowait
This commit introduces the cpu_iowait item, this is the percentage
of cpu time spent waiting on disks. High numbers typically indicate
that your system is not responsive due to disk IO.
This commit also avoid sleeping inside the cpu_perc and cpu_iowait
functions: waiting in either one implies lost info for the other.

Signed-off-by: Kurt Van Dijck <dev.kurt@vandijck-laurijssen.be>
9 years ago
Kamil Cholewiński b7d7ce9c5f
slstatus load_avg format string 9 years ago
Aaron Marcher 8f5219b6da
Added IPv6 address function
- Renamed "ip" function to "ipv4"
- Added "ipv6" function
- Adjusted README and config.def.h accordingly
9 years ago
Aaron Marcher fcc5c683a6
sexy config.def.h table 9 years ago
Laslo Hunhold 796b661284
Refactor main()
We remove the hack with the sleep and global "delay"-variable and use a
monotonic clock to derive the desired monotonic properties of the tool.
Inside each function that demands a personal delay we can then just do a
nanosleep() and be done with it.
It's a shame that timespec is so ugly to work with, but there's really
no way to make it more beautiful. However, at this cost though we
finally can set the interval times in milliseconds and not only just
seconds.

We remove setlocale(), because nothing good ever came out of this
function.

Besides that we have some more code refactoring, especially in the
argument loop which saves us a bit of complexity.
9 years ago
Aaron Marcher c4779c9b15
Removed #define for unknown_str
Debugging #define is very difficult. The performance overhead of static const
char is negligible.
9 years ago
Aaron Marcher be12b6b350
Removed #define for update interval
Debugging #define, especially in mathematical constructs is very
difficult. The performance overhead of static const int is negligible.
9 years ago
aaron marcher 4b4b2ac079
add num_files() function for maildirs ;) 9 years ago
Aaron Marcher 597cdc6b5c
use a static buffer instead of dynamic memory 9 years ago
Aaron Marcher abbaa7af44
remove format characters from stat functions 9 years ago
Aaron Marcher 832b21ca4b
add cpu_freq function 9 years ago
Aaron Marcher 259e967cbf
add battery_power function 9 years ago
Aaron Marcher 823f2d047f
Added keyboard_indicators (Fixes #31) 9 years ago
parazyd 62f4016430
add vol_perc notes, add braces to singleline statements 9 years ago
parazyd c2808b6d99
refactor vol_perc to not depend on alsa libraries 9 years ago
Mike Coddington c3eb0c4012 Add "uname -r" functionality 9 years ago
Jody Leonard 46fb6abdc0 Edit config.def.h function descriptions 9 years ago
Aaron Marcher 3a3a3e4101 better default config.h 9 years ago
Aaron Marcher f13104156f battery_state() function added 10 years ago
Aaron Marcher 87c1377b08 simplified vol_perc() (and with that config.def.h is super clean) 10 years ago
Aaron Marcher 2d1bbf0d35 simplified battery_perc() a lot and removed useless options from config.def.h 10 years ago
Aaron Marcher 217da011dd brought back update interval 10 years ago
Aaron Marcher 3bfa5fe60d coding style fixes 10 years ago
Ali H. Fardan de4f20ace3 removed UPDATE_INTERVAL, it is neat to have it but removing it is a tradeoff worth making, because the clock would act weird if this used to work with cpu_perc(). 10 years ago
Ali H. Fardan b800eb21a3 removed vol function from the default config file 10 years ago
Ali H. Fardan 24c4134df6 removed a misplaced ';' 10 years ago
Ali H. Fardan 47ddf9382e used constant string literals && remote initialization to in battery_perc() && trying to fix possible buffer overflow 10 years ago
Ali H. Fardan 8e039b9dd2 corrected the time format 10 years ago
Aaron Marcher 85a2b9b79d added uptime function 10 years ago
Aaron Marcher 83c98554ed load avg 10 years ago
Aaron Marcher 1d43e2f2b2 added configuration option for n/a text 10 years ago
Aaron Marcher ad8ab20c63 Formatting commit :(
I know formatting commits suck... And I try to avoid them.

But this commit was absolutely necessary... The coding style in this
program was not ok and not the same over the whole program.

The commit is hard to read, but this is what I changed:
- Tabs for indentation instead of spaces
- Same style over the whole program (suckless style)
10 years ago
Aaron Marcher 093f39df23 added wifi essid 10 years ago
Aaron Marcher f6f0c895ce Added shell command function 10 years ago
Aaron Marcher 16716dd130 added, username, gid, uid 10 years ago
Aaron Marcher fb524b6050 added disk functions for details 10 years ago
Aaron Marcher 2e72b212d3 hostname function 10 years ago
Aaron Marcher 67203c6660 added ip address function 10 years ago
Aaron Marcher 5a943fa59c added entropy 10 years ago
Aaron Marcher 27b9139dfc Changes to documentation and new screenshot.
- Better README.md
- Headlines in all files
- CONTRIBUTING.md
- New screenshot
10 years ago
Aaron Marcher 02af858a35 Easier info function names
All the info function names started with "get_", which I removed to make
it easier for the user to configure the program to its needs.
Additionally I renamed some functions (e.g. get_ram_usage) to better
names, making it easier to extend the program with ram usage / total
functions.
10 years ago
Aaron Marcher b176d0a2d0 completely new system: only values in config file get updated + cleaner code 10 years ago
Daniel Walter 21afb5a8f8 Add diskusage support
add support to show used disk for a given mountpoint
10 years ago
Aaron Marcher 1b65dec306 fixed some small things (update_interval) interferes with get_cpu_usage() and reordered) 10 years ago
Daniel Walter 5295629c4f add update_interval
add a short sleep to reduce load
10 years ago
Aaron Marcher 83e84bebb6 simplified config.def.h 10 years ago