Age | Commit message (Collapse) | Author |
|
Updated for style.
|
|
On OpenBSD the backlight percentage cannot be retrieved in a simple way.
The only two solutions we are aware of for now are:
- reading from /dev/ttyC0: which isn't possible without changing
permissions or running slstatus as root
- linking against xcb-xrandr: which is bloat and does not work in every
case appearently
This reverts commit 37724ac2c3f496f4736223d0d8e5d8fecb933590 for now.
|
|
Adding a new keymap component that will
indicate the current keyboard layout (language)
and variant if any was set. I use the
standard X11 XKB APIs to retrieve and parse
the xkb_symbols set with setxkbmap.
|
|
At the moment linux only, but will add support for OpenBSD as well.
|
|
In a later commit something like that will be enabled for every
component
|
|
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.
|
|
|
|
Tabs for indentation, spaces for alignment
|
|
Implementation of a battery_remaining function which returns the
remaining battery time in HH:MM format. Linux function still needs
implementation.
Move common code to load_apm_power_info
|
|
|
|
|
|
|
|
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.
|
|
|
|
- Battery power cannot be easily gatherable via apm(4)
- IMHO it does not represent essential information
|
|
|
|
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
|
|
|
|
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.
|
|
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
worth making, because the clock would act weird if this used to work with cpu_perc().
|
|
|
|
|
|
&& trying to fix possible buffer overflow
|
|
|
|
|
|
|
|
|
|
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)
|
|
|
|
|