This file contains 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
# source: https://askubuntu.com/a/675109 | |
# Without a parameter, the script lists some infos. | |
# With --delete, the list files will be removed, if no packages are installed. | |
#!/usr/bin/env bash | |
for f in /etc/apt/sources.list.d/*.list; do | |
grep -Po "(?<=^deb\s).*?(?=#|$)" "$f" | while read -r ENTRY ; do | |
echo "ENTRY: $ENTRY" | |
HOST=$(cut -d/ -f3 <<< "$ENTRY") |
This file contains 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
#!/usr/bin/env bash | |
#script is based on: https://raw.githubusercontent.com/matryer/bitbar-plugins/master/Network/bandwidth.1s.sh | |
#Do this first: | |
#sudo apt install ifstat sysstat lm-sensors | |
#sudo sensors-detect | |
netspeed=$(ifstat -n -w -i wlp1s0 0.1 1 | tail -n 1 | awk '{print "▼", $1, "▲", $2;}') | |
mem=$(free | grep Mem | awk '{print $3/$2 * 100.0}') |