3

Fuji Desktop

Posted in Collections by genimac 1722 days ago

My first serious attempt for a Geektool desktop. Near all of them are found here, I just tried to customize to my liking and knowledge so I will just comment what I did. Thanks to all the people who create them for first time.

System Info, go by two calls to the system_profller and a temporary file for grep use.

Current and Next month, just put sunday at end of week and mark the current day.

Uptime, have not modified yet.

Internal external IP not touched.

Last backup This is mine. As I don’t have the time machine disk connected all time i used a temporary file to save the last backup date. I put the file in /Users/genimac/Documents/Geeklets/offlinecopy, you can change the file name or path.

Doing TimeMachine backup You need the ARC font for this to work.

IPs in network In my work I keep an eye on some network disks and server. I installed “fing” from Overlook http://www.overlooksoft.com/download The only “problem”, not for me, is that it need root access. I send my password by an echo on the script. If you are ok with that, just change the “adminpass” with your current one. Can the password be send encrypted? I adjusted it to 30 IP in 3 columns as that fits my network, you need to modify the code for more.

Network totals for that to work you need “vnstat” installed, it can be compiled directly or you can use “brew” to install. The later is more easy so go to http://brew.sh and follow the instructions, mainly ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" brew doctor brew update

then install vnstat with brew install vnstat and follow the instructions to create the database vnstat -u -i en0 For my MacbookProo retina en0 is the wifi board. You can use “vnstat --iflist” for the list on your computer. Once all that done in a few minutes (5 or so) you will have data to display.

Top RAM and CPU processes I modified the ruby scripts from http://brettterpstra.com to bash.


Comments

User Avatar
BigBadBobD 1705 days ago
Current Month Script does not highlight Saturday's..
User Avatar
genimac 1634 days ago
I make a revised current month geeklet, just get it in pastebin as below.
User Avatar
genimac 1634 days ago
A revised version of the current month. Mainly ensuring escape codes are not interfering sed.

#!/bin/sh

DIA=`echo '\033[0;32m'`

NORMAL=`echo '\033[0m'`

cal | awk '{

print "\033[1m"$0;

getline;

print " Mo Tu We Th Fr Sa Su \033[0m";

getline;

if (substr($0,1,2) == " 1") print " \033[0;31m1\033[0m ";

do {

prevline=$0;

if (getline == 0) exit;

print " "substr(prevline,4,18)" \033[0;31m"substr($0,1,2)" \033[0m";

} while (1)

}' | sed "s/$(date +%e)[^0-9]/$DIA&$NORMAL/"
User Avatar
genimac 1634 days ago
Revised current month

#!/bin/sh

DIA=`echo '\033[0;32m'`

NORMAL=`echo '\033[0m'`

cal | awk '{

print "\033[1m"$0;

getline;

print " Mo Tu We Th Fr Sa Su \033[0m";

getline;

if (substr($0,1,2) == " 1") print " \033[0;31m1\033[0m ";

do {

prevline=$0;

if (getline == 0) exit;

print " "substr(prevline,4,18)" \033[0;31m"substr($0,1,2)" \033[0m";

} while (1)

}' | sed "s/$(date +%e)[^0-9]/$DIA&$NORMAL/"
User Avatar
genimac 1634 days ago
Revised current month geeklet

#!/bin/sh

DIA=`echo '\033[0;32m'`

NORMAL=`echo '\033[0m'`

cal | awk '{

print "\033[1m"$0;

getline;

print " Mo Tu We Th Fr Sa Su \033[0m";

getline;

if (substr($0,1,2) == " 1") print " \033[0;31m1\033[0m ";

do {

prevline=$0;

if (getline == 0) exit;

print " "substr(prevline,4,18)" \033[0;31m"substr($0,1,2)" \033[0m";

} while (1)

}' | sed "s/$(date +%e)[^0-9]/$DIA&$NORMAL/"
User Avatar
genimac 1634 days ago
Revised current month

`

#!/bin/sh

DIA=`echo '\033[0;32m'`

NORMAL=`echo '\033[0m'`

cal | awk '{

print "\033[1m"$0;

getline;

print " Mo Tu We Th Fr Sa Su \033[0m";

getline;

if (substr($0,1,2) == " 1") print " \033[0;31m1\033[0m ";

do {

prevline=$0;

if (getline == 0) exit;

print " "substr(prevline,4,18)" \033[0;31m"substr($0,1,2)" \033[0m";

} while (1)

}' | sed "s/$(date +%e)[^0-9]/$DIA&$NORMAL/"

`
User Avatar
genimac 1634 days ago
Corrected current month geeklet. Mainly ensuring escape codes don't interfere.

[geeklet](http://pastebin.ca/3009475)
User Avatar
MaorBenezri 1628 days ago
Nice, tnx
User Avatar
BigBadBobD 1544 days ago
highlight works now, but the months are incorrect. For example, August only displays 30 days instead of 31

ROFL
User Avatar
HarshReality 1529 days ago
ok, how can one configure the fing geeklet to display only the ip address, MAC and hostname in the list.
User Avatar
HarshReality 714 days ago
OK, my system went down and I am revisiting my configuration slowly.. so I can run fing as sudo from terminal but the geeklet does/returns nothing butthe IP text.. I even added myself to sudoers so im not prompted for a password.

Log in to comment or register here.