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
full=$(pmset -g batt | { read; read n full; echo "$full"; }) | |
batt=$(echo "$full" | cut -d';' -f1 | tr -d '%') | |
status=$(echo "$full" | cut -d';' -f2 | tr -d ' ') | |
time=$(echo "$full" | cut -d';' -f3 | sed 's/^ *//') | |
noc=$'\e[39m' | |
if (($batt >= 66)); then battc=$'\e[32m'; | |
elif (($batt >= 33)); then battc=$'\e[33m'; | |
else battc=$'\e[31m'; | |
fi; |
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
ps xro %cpu=,comm= | while read cpu comm; ((i++<5)); do | |
int=$cpu | |
int="${int%%.*}" | |
if (($int >= 50)); then color=$'\e[31m'; | |
elif (($int >= 25)); then color=$'\e[33m'; | |
else color=$'\e[32m'; | |
fi; | |
echo "$color$cpu% $(basename "$comm")"$'\e[0m'""; |
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
df -Hl | { | |
read keys; | |
keys="${keys%% on}"; | |
while read ${keys//%}; do | |
echo "`basename "$Mounted"` - $Used/$Size ($Capacity)"; | |
done | |
} |
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
ps xmo rss=,pmem=,comm= | while read rss pmem comm; ((n++<5)); do | |
size="$[rss/1024]"; | |
short=$[4-${#size}]; | |
size="(${size}M)"; | |
i=0; | |
while ((i++ < short)); do size=" $size"; done; | |
pmem="${pmem%%.*}" | |
if (($pmem >= 20)); then color=$'\e[31m'; |
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 | |
# Update your wallpapager regularly. | |
# Preferrably installing it in your crontab: | |
# | |
# (crontab -l | sed '1,3d'; echo "# Update wallpager every half an hour."; echo "0,30 * * * * /path/to/wallpaper.sh") | crontab - | |
# | |
# by Jerry Fleming <[email protected]> | |
# on 2013-03-25. | |
# No rights reserved. Use at your own risk. |
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
[user] | |
name = Pavan Kumar Sunkara | |
email = [email protected] | |
[core] | |
editor = vim | |
whitespace = fix,-indent-with-non-tab,trailing-space,cr-at-eol | |
[sendemail] | |
smtpencryption = tls | |
smtpserver = smtp.gmail.com | |
smtpuser = [email protected] |