Closed 10maurycy10 closed 2 years ago
The uptime
in my system allows this:
$ uptime --pretty
up 4 hours, 36 minutes
The
uptime
in my system allows this:$ uptime --pretty up 4 hours, 36 minutes
calling a command in the status is rather inefficient.
I can also not find a clean way to integrate with uptime
in i3status.
For now I have forked the repo.
The intent of the read_file
directive is to run arbitrary commands. Complete example:
i3status config:
order += "read_file uptime"
read_file uptime {
path = "/tmp/uptime"
}
And, somewhere else, start a script that will continuously update /tmp/uptime
. For example:
while true; do uptime --pretty > /tmp/uptime; sleep 1; done
constant disk writes, seem inefficient.
/tmp is usually an in-memory tmpfs.
Besides, it's a few bytes (<100) per second. Comparatively nothing to using a modern browser.
Either way, feel free to maintain the fork if you'd prefer :)
read-file allows displaying uptime in seconds.
Is it possible to display uptime in nicer units?