Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
System Info Bash Scripts for XFCE Generic Monitor Panel Plugins
#!/bin/bash
#--------------------------
#Load Average
#--------------------------
awk '{print $1FS$2FS$3}' /proc/loadavg
#!/usr/bin/env python
#--------------------------
#BitCoin Sell
#--------------------------
import requests
import json
import html
r = requests.get( "https://api.coindesk.com/v1/bpi/currentprice.json" )
if r.text == "":
sys.exit()
bpi = json.loads( r.text )
bpi = bpi["bpi"]["USD"]
print( bpi["code"] + " " + html.unescape(bpi["symbol"]) + bpi["rate"] )
#!/bin/bash
#--------------------------
#Free Memory
#--------------------------
free -h | awk 'NR==2{print $3FSprint " of "FSprint $2;}'
#!/bin/bash
#-----------------------
#Running VirtualBox VMs
#--------------------------
vboxmanage list runningvms | grep -Po '(?<=\")[\w\d\s]+(?=\")'
#!/bin/bash
#--------------------------
#Top Processes
#--------------------------
ps -eo comm,%mem,%cpu --sort=-%cpu | head
#!/bin/bash
#--------------------------
#Uptime
#--------------------------
uptime -p|sed 's/ hours\?,/h/g' |sed 's/ minutes\?/m/g' | sed 's/ days\?,/d/g' | sed 's/ weeks\?,/w/g' | sed 's/up //g'
#!/bin/bash
#--------------------------
#Generate Room from TEMPer USB Thermometer
#--------------------------
temp=$(/usr/bin/temper-poll -qf)
echo "TEMP:$temp" > /var/log/temper.log
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.