A small script in rust to get the cpu usage in %'s with a gradient color for the text

Overview

cpu_usage-polybar

A small script in rust to get the cpu usage in %'s with a gradient color for the text

To get it to work on your PC you will have to make some changes to the path in the polybar settings (exec = ...) and the path in the .sh script You'll also have to make sure you compile it first

Inside polybar settings;

[module/cpus_usage]
type = custom/script
exec = ~/.config/polybar/scripts/cpu_usage.sh
tail = true

# Optional past this line
format-prefix-foreground = ${colors.primary}
format-prefix = CPU's: (
format-suffix = )
format-suffix-foreground = ${colors.primary}
label = %output%

and the cpu_usage.sh:

#!/bin/bash

~/Rusty/cpu_usage/target/release/cpu_usage

2023-04-14_14-54 2023-04-14_15-00

You might also like...
Replace an app's icon from a png with a single terminal script. Made with Rust

Replace macOS App Icon Replace an app's icon from a png with a single terminal CLI. Made with Rust

Fix the simple rust script as shown in README.md
Fix the simple rust script as shown in README.md

Rust Fix Me Steps Create a Github account. (If you already have one no issues) Star this repository. Fork this repository to your Github account. Clon

An elegant language for script-kiddies and terminal squatters.

Tonic An elegant language for script-kiddies and terminal squatters. About I started Tonic to complete the Advent of Code 2021. My eventual goal is to

Cargo script subcommand

cargo-script cargo-script is a Cargo subcommand designed to let people quickly and easily run Rust "scripts" which can make use of Cargo's package eco

Nvm - Node Version Manager - POSIX-compliant bash script to manage multiple active node.js versions

Node Version Manager Table of Contents Intro About Installing and Updating Install & Update Script Additional Notes Troubleshooting on Linux Troublesh

Write a simple CLI script, that when given a 64-byte encoded string

Write a simple CLI script, that when given a 64-byte encoded string, it finds a suitable 4-byte prefix so that, a SHA256 hash of the prefix combined with the original string of bytes, has two last bytes as 0xca, 0xfe. Script should expect the original content of the string to be passed in hexadecimal format and should return two lines, first being the SHA256 string found and second 4-byte prefix used (in hexadecimal format).

A bit like tee, a bit like script, but all with a fake tty. Lets you remote control and watch a process

teetty teetty is a wrapper binary to execute a command in a pty while providing remote control facilities. This allows logging the stdout of a process

A standalone Luau script runner πŸŒ™

Lune πŸŒ™ A standalone Luau script runner πŸš€ Use the ergonomics and readability of Luau for your shell scripts πŸš€ βš™οΈ Installation The preferred way of i

Fast KubeJS script manager. Includes version control and compatibility with KJSPKG packages.
Fast KubeJS script manager. Includes version control and compatibility with KJSPKG packages.

CarbonJS A KubeJS script manager Features πŸ”₯ Super fast βš™οΈ Version control πŸ“ Constantly new scripts being added βœ… Easy to use 🧱 Compatibility with K

Owner
Sara
Another self-taught programmer that also spends way to much time gaming :)
Sara
Zenith - sort of like top or htop but with zoom-able charts, CPU, GPU, network, and disk usage

Zenith - sort of like top or htop but with zoom-able charts, CPU, GPU, network, and disk usage

Benjamin Vaisvil 1.6k Jan 4, 2023
A CLI tool which can help you automatically kill process of your choice. Useful for freeing up memory and CPU usage!

Quickiller There are always programs such as chrome that keep eating up your resources even when closed! The only way to prevent this is to kill all o

Codingsquirrel 1 Dec 8, 2021
dye is a tool to easily color text in shell.

Dye dye is a tool to easily color text in shell. Usage See the gif below to see these commands in action. echo $(dye --red WARN) This tool will knock

Kurt Wolf 15 Nov 1, 2022
❗️ Small script to view GitHub notifications in the terminal

github-notifications Small script to view GitHub notifications in the terminal Shows and color-codes the notification source, eg if you're the owner o

Brian Shaginaw 1 Jan 10, 2022
A small script to facilitate the making of .src.spm.tar.gz packges

SPM-Helper Rust version: Installation PYTHON: install python and git Clone the repo with this command: git clone -b Python https://github.com/Soviet-L

Soviet Linux 3 Jun 24, 2022
A small Rust library that let's you get position and size of the active window on Windows and MacOS

active-win-pos-rs A small Rust library that let's you get position and size of the active window on Windows and MacOS Build % git clone https://github

Dmitry Malkov 21 Jan 6, 2023
An implementation of Piet's text interface using cosmic-text

piet-cosmic-text Implements piet's Text interface using the cosmic-text crate. License piet-cosmic-text is free software: you can redistribute it and/

John Nunley 7 Mar 12, 2023
Kana - a small CLI program for transliterating romaji text to either hiragana (γ²γ‚‰γŒγͺ) or katakana (γ‚«γ‚Ώγ‚«γƒŠ).

Kana About Kana is a small CLI program for transliterating romaji text to either hiragana (γ²γ‚‰γŒγͺ) or katakana (γ‚«γ‚Ώγ‚«γƒŠ). How it works Internally, it uses

Gabriel Sanches 3 Dec 27, 2022
A Rust-based shell script to create a folder structure to use for a single class every semester. Mostly an excuse to use Rust.

A Rust Course Folder Shell Script PROJECT IN PROGRESS (Spring 2022) When completed, script will create a folder structure of the following schema: [ro

SebastiΓ‘n Romero Cruz 1 Apr 10, 2022
comfy is a flexible command script manager / runner written in Rust

comfy is a cross-platform command script manager / runner tool, which allows you to run commands in the command line itself, but being these predefined in a portable and universal .comfy file.

daCoUSB 17 Nov 12, 2021