My Desktop
New Computer Command Center (CCC, C3)
by seb on May.19, 2009, under My Desktop, Video Games, Work
I moved back into a house that I used to live in years ago. In anticipation of the move, I decided to redesign my desk and work area, and name it Computer Command Center; CCC or C3 for short. Here’s a quickly put-together panorama of everything:
From left to right: Xbox 360 controllers, fan (temporary), Xbox360 + games/headset, VOIP desk phone for work, 24″ Dell monitor, Saitek keyboard, IBM T43 laptop, front-left speaker and headphones, Logitech G9 mouse, 8 port Netgear gigabit switch, Saitek Cyborg keyboard, 30″ Dell monitor, another Logitech G9 mouse, misc office/computer stuff, PS2 controller, desktop computer, and a whopping 10TB external RAID enclosure. Also, directly behind where I sit is my drum set, for banging away the frustrations that I encounter, daily, when working.
The desk is a combination of pieces from Ikea. The setup wasn’t supported by their “customization”, so I had to do a bit of grunt work to get everything to fit properly in the space provided. It’s a huge desk, tons of space for me to work and play, and it’s exactly what I wanted.
I’m aware there are some graphical errors in the panorama stitching, and I’m too lazy to retake the pictures and restitch in CS4.
Movie List, Computer Stats
by seb on Jan.11, 2009, under My Desktop, Programming/Scripting
Over the past few days I’ve gotten bored with my website and decided to add some more interesting information. Two new pages have been added: Movie List and Computer Stats. Both pages update periodically with current information. The Movie List page updates about once every hour, and the Computer Stats page updates about once every minute. As long as my computer is on, these pages will keep updating regularly.
For those of you who want to know how I did this, here’s some poorly written code, with brief explanations and no comments:
MakeMovieList.bat: This file gathers the list of movies I have in folders sorted by type (MKV, WMV), sorts it, then uploads it to my website for parsing through PHP. The PHP is dependent on the file names being consistent, so there’s some maintenance involved, but not much.
1 2 3 4 5 6 7 8 9 10 11 | @echo off if exist C:\scripts\movielist.txt del C:\scripts\movielist.txt /Q pushd D:\Movies\wmv dir *.wmv /B>>C:\scripts\movielist.txt popd pushd D:\Movies\mkv dir *.mkv /B>>C:\scripts\movielist.txt popd sort C:\scripts\movielist.txt /O C:\scripts\movielist.txt ftp -s:C:\scripts\ftp-upload-movielist.txt theseb.com del C:\scripts\movielist.txt /Q |
FTP-Upload-MovieList.txt: This is the FTP script used by the batch above. All it does is upload the list to an FTP.
1 2 3 4 5 6 7 | ftpusername
ftppassword
ascii
cd public_html
put C:\scripts\movielist.txt
close
quit |
Movie List PHP Source: Here’s the PHP for parsing the text file that was uploaded in the previous step. Credit to John for writing it for me.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | $str = file_get_contents("/home/seb/public_html/movielist.txt"); $list = explode("\n",$str); $i = 1; foreach($list as $key => $moviedata) { $temp = explode(").",$moviedata); $temp1 = explode("(",$temp[0]); $name = trim($temp1[0]); $movies["$name"][res] = trim($temp1[1]); $movies["$name"][ext] = strtolower(trim($temp[1])); } foreach($movies as $name => $movie) { if($name == '') { unset($movies[$name]); } } echo "<table border=\"0\" id=\"movielisttable\">"; echo "<tr><th>Title</th><th>Resolution</th><th>Container</th></tr>"; foreach($movies as $name => $movie) { echo "<tr><td class=\"movietitle\"><a href=\"http://www.imdb.com/find?q=$name;s=tt\" target=\"_blank\">$name</a></td> <td class=\"movieresolution\">$movie[res]</td> <td class=\"moviecontainer\">$movie[ext]</td></tr>\n"; } echo "</table>"; |
MakeComputerStats.bat: This batch calls up the VBScript that does all of the work, so there’s not much here. Also in there is the call to the FTP command.
1 2 3 4 5 | @echo off if exist C:\scripts\computer-stats.txt del C:\scripts\computer-stats.txt /Q cscript //NoLogo C:\scripts\computer-stats.vbs>C:\scripts\computer-stats.txt ftp -s:C:\scripts\ftp-upload-computer-stats.txt theseb.com del C:\scripts\computer-stats.txt /Q |
FTP-Upload-Computer-Stats.txt: Yet another FTP upload, this time for the computer stats.
1 2 3 4 5 6 7 | ftpusername
ftppassword
ascii
cd public_html
put C:\scripts\computer-stats.txt
close
quit |
Computer-Stats.vbs: Here’s the biggie, the VBScript that actually gathers all the data. It basically does a few calls to WMI and outputs information in HTML form, so that I can just do a php include on the Computer Stats page itself. I’m not sure why I didn’t do this for the Movie List page, but I’m too lazy to change it at this point. There’s also a function for simplifying long values, in bytes, into another, more-readable form like KB, MB, GB, or TB. I’m sure there’s an easier way to do all of this, but I felt like challenging myself last night, out of boredom.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 | on error resume next Function SetBytes(Bytes) If Bytes >= 1099511627776 Then SetBytes = Round(FormatNumber(Bytes / 1024 / 1024 / 1024 / 1024, 2), 2) & " TB" ElseIf Bytes >= 1073741824 Then SetBytes = Round(FormatNumber(Bytes / 1024 / 1024 / 1024, 2), 2) & " GB" ElseIf Bytes >= 1048576 Then SetBytes = Round(FormatNumber(Bytes / 1024 / 1024, 2), 2) & " MB" ElseIf Bytes >= 1024 Then SetBytes = Round(FormatNumber(Bytes / 1024, 2), 2) & " KB" ElseIf Bytes < 1024 Then SetBytes = Bytes & " Bytes" Else SetBytes = "0 Bytes" End If End Function SSection="<h3 class=""CompStatsHeader"">" ESection="</h3>" STable="<table id=""CompStatsTable"">" ETable="</table>" SItem="<tr><td class=""CompStatsItem"">" EItem="</td>" SValue="<td class=""CompStatsValue"">" EValue="</td></tr>" Set objWMIService = GetObject("winmgmts:" & "{impersonationLevel=impersonate}!\\.\root\cimv2") '''OS INFORMATION wscript.echo SSection & "Operating System" & ESection & STable Set colItems = objWMIService.ExecQuery("Select * from Win32_OperatingSystem") For Each objItem in colItems wscript.echo SItem & "Version:" & EItem & SValue & "Microsoft Windows Vista Ultimate, " & objItem.CSDVersion & EValue wscript.echo SItem & "Architecture:" & EItem & SValue & objItem.OSArchitecture & EValue wscript.echo SItem & "Registered To:" & EItem & SValue & objItem.RegisteredUser & EValue wscript.echo SItem & "Local Date:" & EItem & SValue & Date & EValue wscript.echo SItem & "Local Time:" & EItem & SValue & Time & EValue wscript.echo SItem & "Running Processes:" & EItem & SValue & objItem.NumberOfProcesses & EValue wscript.echo SItem & "Total Physical Memory:" & EItem & SValue & SetBytes(objItem.TotalVisibleMemorySize*1024) & EValue wscript.echo SItem & "Available Physical Memory:" & EItem & SValue & SetBytes(objItem.FreePhysicalMemory*1024) & EValue wscript.echo SItem & "Total Virtual Memory:" & EItem & SValue & SetBytes(objItem.TotalVirtualMemorySize*1024) & EValue wscript.echo SItem & "Available Virtual Memory:" & EItem & SValue & SetBytes(objItem.FreeVirtualMemory*1024) & EValue ' wscript.echo SItem & "Pagefile Total Size:" & EItem & SValue & SetBytes(objItem.TotalSwapSpaceSize*1024) & EValue wscript.echo SItem & "Pagefile Free Space:" & EItem & SValue & SetBytes(objItem.FreeSpaceInPagingFiles*1024) & EValue wscript.echo SItem & "Logged In Users:" & EItem & SValue & objItem.NumberOfUsers & EValue Next wscript.echo ETable '''PROCESSOR INFORMATION wscript.echo SSection & "Processor" & ESection & STable Set colItems = objWMIService.ExecQuery("Select * from Win32_ComputerSystem") For Each objItem in colItems wscript.echo SItem & "Processors:" & EItem & SValue & objItem.NumberOfProcessors & EValue Next Set colItems = objWMIService.ExecQuery("Select * from Win32_Processor") For Each objItem in colItems wscript.echo SItem & "Cores:" & EItem & SValue & objItem.NumberOfCores & EValue wscript.echo SItem & "Manufacturer:" & EItem & SValue & objItem.Manufacturer & EValue wscript.echo SItem & "Model:" & EItem & SValue & objItem.Name & EValue wscript.echo SItem & "Revision:" & EItem & SValue & objItem.Version & EValue wscript.echo SItem & "Socket:" & EItem & SValue & objItem.SocketDesignation & EValue wscript.echo SItem & "Load:" & EItem & SValue & objItem.LoadPercentage & "%" & EValue wscript.echo SItem & "Voltage:" & EItem & SValue & objItem.CurrentVoltage/10 & "V" & EValue Next wscript.echo ETable '''VIDEO INFORMATION wscript.echo SSection & "Video" & ESection & STable Set colItems = objWMIService.ExecQuery("Select * from Win32_VideoController") Cards=0 For Each objItem in colItems Cards=Cards+1 Next Set colItems = objWMIService.ExecQuery("Select * from Win32_VideoController where DeviceID = 'VideoController1'") For Each objItem in colItems wscript.echo SItem & "Cards:" & EItem & SValue & Cards & EValue wscript.echo SItem & "Model:" & EItem & SValue & objItem.Description & EValue wscript.echo SItem & "Current BPP:" & EItem & SValue & objItem.CurrentBitsPerPixel & "bpp" & EValue wscript.echo SItem & "Resolution:" & EItem & SValue & objItem.CurrentHorizontalResolution & "x" & objItem.CurrentVerticalResolution & EValue wscript.echo SItem & "Colors:" & EItem & SValue & objItem.CurrentNumberOfColors & EValue wscript.echo SItem & "Refresh Rate:" & EItem & SValue & objItem.CurrentRefreshRate & "MHz" & EValue wscript.echo SItem & "Driver Version:" & EItem & SValue & objItem.DriverVersion & EValue Next wscript.echo ETable '''Disk INFORMATION Set colItems = objWMIService.ExecQuery("Select * from Win32_LogicalDisk where Name='C:' or Name='D:' or Name='X:'") For Each objItem in colItems wscript.echo SSection & "Disk '" & objItem.VolumeName & "'" & ESection & STable wscript.echo SItem & "Drive Letter:" & EItem & SValue & objItem.Name & EValue wscript.echo SItem & "Filesystem:" & EItem & SValue & objItem.FileSystem & EValue wscript.echo SItem & "Size:" & EItem & SValue & SetBytes(objItem.Size) & EValue wscript.echo SItem & "Free Space:" & EItem & SValue & SetBytes(objItem.FreeSpace) & EValue wscript.echo SItem & "Used Space:" & EItem & SValue & SetBytes(objItem.Size-objItem.FreeSpace) & EValue Set colItems2 = objWMIService.ExecQuery("Select * from win32_perfformatteddata_perfdisk_logicaldisk where Name='" & objItem.Name & "'") For Each objItem2 in colItems2 wscript.echo SItem & "Disk Time:" & EItem & SValue & objItem2.PercentDiskTime & "%" & EValue Next wscript.echo ETable Next wscript.quit |
Feel free to ping me with questions, criticisms, or rude comments.
Desktop customization
by seb on Oct.15, 2008, under My Desktop
I’ve been in the mood to customize my desktop lately. It’s gone through major changes in the past month or so, in an effort to make it easier to use on a daily basis. This, so far, is the best I’ve come up with. Lots of info right in front of me without clicking anywhere, and access to common things right from the top bar.
Programs used:
- Samurize
- Deskbar fade (top)
- Winamp controls and info
- Weather/mail indicators, as well as other icons
- All meters (disk activity, CPU usage, disk free space, RAM)
- Date/time
- RocketDock
- All application icons on the left
- Emerge Desktop
- Multi-desktop boxes in the upper right, next to the winamp controls
Wallpaper can be found here.

