All-In-One Binary to Obtain Output Information for Polybar Modules
a493c266 — deadjakk a month ago
added xbps-install for updates
dfa84199 — deadjakk 3 months ago
added pacman support
137809c2 — deadjakk 3 months ago
updated readme


browse  log 



You can also use your local clone with git send-email.

#Rice Stats


The goal of rice_stats is to have one cross-compilable binary that can be used to retrieve output for 'custom/script' polybar modules to streamline polybar configurations across installations. Each command will append to the last, so that it can all in one polybar module. Alternatively the binary can be run separately for each polybar module, however one might prefer...


cargo install --git https://git.sr.ht/~deadjakk/RiceStats If you plan on using the -a (update) function of the binary, it will need root privileges to obtain the number of available updates, this is most easily achieved by setting the SUID bit on the binary.

sudo chown root `which rice_stats` && sudo chmod u+s `which rice_stats`


rice_stats -h
rice_stats 0.1.0

    rice_stats [FLAGS] [OPTIONS]

    -h, --help          Prints help information
    -p, --packages      When this flag is used, the existence of pacman or apt will be determnined by running the
                        'which' program. if apt is present, it will run 'apt update -y'. if pacman is present, it will
                        run 'pacman -Syu'. No updates will actually take place, it will only parse the output to
                        determine the number of available packages and then output the number. REQUIRES SUID bit to be
                        set on this binary via: sudo chown <this binary> && sudo chmod u+s <this binary> or
                        alternatively this binary can be run as an elevated user
    -s, --sys-uptime    Return the system uptime in days
    -u, --usage         Return the current network usage for the primary interface
    -V, --version       Prints version information

    -i, --interface <interface>    Override the interface that is used for several commands. If this is not provided an
                                   attempt will be made to find the primary interface based on the presence of an ip and
                                   then traffic rate


~$ rice_stats -p -u
rx-8869 tx-9323 0 Updates Available