Age | Commit message (Collapse) | Author |
|
|
|
|
|
|
|
|
|
|
|
For multiple reasons the program is now split:
- Make future porting to OpenBSD easier
- Assign header includes to individiual functions
- Make future program extensions easier
- Recompile only changed parts
|
|
setlocale() has to be separated from the signal handling.
|
|
I want my date & time printed according my locale settings.
This commit enables that
Signed-off-by: Kurt Van Dijck <dev.kurt@vandijck-laurijssen.be>
|
|
|
|
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>
|
|
|
|
|
|
- Renamed "ip" function to "ipv4"
- Added "ipv6" function
- Adjusted README and config.def.h accordingly
|
|
|
|
|
|
This reduces a lot of equivalent code to one function call.
|
|
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.
|
|
|
|
|
|
|
|
|
|
|
|
According to the FHS, /usr/local/share/man is the correct man page path
in this projects's case. Set this to default in config.mk.
|
|
|
|
Debugging #define is very difficult. The performance overhead of static const
char is negligible.
|
|
Debugging #define, especially in mathematical constructs is very
difficult. The performance overhead of static const int is negligible.
|
|
Extended Ali H. Fardan contribution dates
|
|
|
|
- Added a check for the return value of XOpenDisplay() in main().
This fixes a possible NULL-deref.
- Removed unnsecessary XOpenDisplay and XCloseDisplay from
keyboard_indicators(). The ones in main() are sufficent.
|
|
|
|
|
|
|
|
|
|
What we really want is to either output to WM_NAME or stdout. If we want
just one single line, we do slstatus | head -n 1.
|
|
d-flag: There's no need for that, use the &-operator or fork+exec in a
non-shell-context. In the latter case you get the PID for free.
v-flag: If you want to find out which version of a package is installed,
consult your package manager. That's his job.
|
|
We also change the semantics of -v to only return the version
information.
There is now no need for usage() to exit with anything other than 1.
|
|
|
|
|
|
|
|
|
|
|
|
According to https://opensource.org/licenses/ISC
|
|
A file outside the repository (.git/info/exclude) can replace this and
suits better for this usecase.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|