Giter Club home page Giter Club logo

i3status-uptime's Introduction

i3status-uptime

Simple python3 script that reads, formats and returns the uptime of your system so that i3status can read and display it.

Since it would be worthless to run a dedicated daemon to do this, the script execution has to be programmed in Cron. This way, we don't even need systemd.

The task will be ran every minute, and its output should be saved into a file that we will then read to display its contents in i3status.

The cron entry should look similar to this:

* * * * * python3 /home/user/whatever/uptime.py > /home/user/uptime

In our i3status config file, we will need to add an element to our bar:

order += "read_file uptime"

And declare it down below:

read_file uptime {
	path = "/home/user/uptime"
	format = "UP %content"
}

In this case, "UP" is simply a prefix that I have set for my own use. The result is the following:

image

i3status-uptime's People

Contributors

pfitzn avatar

Stargazers

Gláuber Brennon avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.