Sporkbox Productions

3-Month "Hiatus"

I'm leaving on April 12th to pursue my future as a US Marine. I'll be attending basic training until mid-to-late July. I'll be home for about 10 days. After that, I'll be undergoing 4 weeks of combat training, then attend my occupational training. With any luck, I should be able to return to a fairly normal online presence by my birthday or Christmas. Apologies to anyone who was looking forward to further developments with Sporkbox. When I return, you can expect some pictures and maybe some new content.

I know hardly nobody visits this page, but I felt it was important to plaster this notice on every online presence I have, so nobody doesn't know why I disappeared all of a sudden. Thanks for understanding.

Posted by xelados on 2009-04-11 at 12:21. Direct Link
Tags: Life

Are You a Fan of Delete?

I love the Delete key. Really, I do. On my keyboard, it's the same size as my Enter and Backspace keys (except it's 2 normal keysizes tall). Needless to say, I'm a fan of deleting things: files, parts of code, unnecessary comments in config files, bookmarks I don't visit anymore, you name it. I am obsessed with keeping things clean, simple, and streamlined. Am I alone? Probably not, but I don't know anyone else who loves to delete things as much as I do.

I also love vim, the best text editor ever IMO. Its learning curve was a bit difficult when I first tried it a few years ago, but once I figured out the concept of "modes", it all clicked and I loved it. vim is very delete-friendly. It's friendly to anyone who needs utmost control over the text file. What better way to exert or prove your mastery over the file than to hover over it menacingly, saying "Your very existence is at my mercy!"

Hundreds of thousands of people use vim every day for coding, config file editing, copy writing, and more. There are times where you just need to delete stuff, though. A paragraph you wrote might be a little pretentious, or that new function wasn't as smart (or dumb) as you wanted it to be. vim can delete things in many ways, and it's this article's job to expose you to them.

For those of you out there who know vim, you can use the delete (d) function on any object. That is, lines, words, location anchors like $ and ^, etc. Here's a quick-and-dirty list for those who aren't already savvy:

NOTE: All of the basic commands can be modified by numbers to delete more than one of that object. Replace "#" with a number to get said results. All spans are inclusive, as well. For instance, doing d3d on line 36 will delete lines 36, 37, and 38.

d#d
Delete a line. When more than one is specified, it starts deleting from the current line.
d#[h,j,k,l]
Delete in the chosen direction (h = left, j = down, k = up, l = right)
d#[w,b]
Delete a (w)ord, or delete a word (b)ackwards.
d#[^,$]
Delete from the cursor to the beginning of the line (^) or the end of the line ($). Using numbers mimics dd's functionality.
dG
Delete from the current line to the end of the file. Effectively a truncation.
dgg
Delete the current line and every line before it. Think of it as reverse truncation.
:#,#d
This one is a bit different.. It's an actual vim command. The two #s are the beginning and end of the span you want to delete.

You can also go into one of the two select modes (Shift+V for line-select, Control+V for box select) and perform (d)eletion on them, as well.

As you can see, vim is a very powerful editor and allows you to unleash über deletion powers in many different (and useful) ways. How will you delete things? :D

Posted by xelados on 2009-04-05 at 09:31. Direct Link
Tags: Computing Software

esetbg - frontend for Esetroot

Right click (or wget) me to save!

Name: esetbg
Type: Shell Script
Purpose: Background switching
Dependencies: Esetroot (supplied by Eterm in most distros; Arch's AUR has a stand-alone version)
License: WTFPL

esetbg is a quick, simple way to set a background with a relatively flexible background setter, Esetroot. It doesn't support custom background colors to accomodate your badass background, but that's nothing you can't fix by editing /usr/share/X11/rgb.txt; that's where X itself fetches color values from.

It's the first "true" Bash script I've made that's worth anything. Esetroot's not a very common background setter, but it's one of the few good ones that just draw directly to the root window without getting in the way or requiring a ton of dependencies like Metacity, xfdesktop, etc. Anyway, I picked up all the bash necessary for this script in about 3-4 hours, trial-and-error included. If someone like myself can pick it up and find something to do with it, I'm sure anyone can if they just think. :)

The real value of this script comes in its default behavior: it reads from ~/.esetbg and parses its contents to set your background automatically. That means it's great for those of us who rely on ~/.xinitrc to do our session "management".

If you have any suggestions or contributions, feel free to e-mail me. And as always, check a script's code before you execute it! :P

Posted by xelados on 2009-03-29 at 07:20. Direct Link
Tags: Arch Linux Software

Older Posts