This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
head -c -1 | |
tr "\n" " " | |
echo -n $(<command>) | |
xargs echo -n | |
[[ $(<command>) =~ <regex> ]] && echo -n $BASH_REMATCH |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# GNU bash, version 5.0.3(1)-release (x86_64-pc-linux-gnu) | |
# Some of these are a little tongue-in-cheek as an unresponsive prompt would be | |
# an annoying distraction. But still. This file should be sourcable to ensure | |
# individual commands can be pasted straight into the terminal. | |
# Uptime | |
PS1='$( |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cpu-status-string(){ | |
# Create some colours | |
idle="\u001b[32m" | |
low="\u001b[36m" | |
medium="\u001b[33m" | |
high="\u001b[31m" | |
reset="\u001b[0m" | |
# Extract CPU info from top |
NewerOlder