2008-09-02 12:10:00
Vulpes vulpes SLiM themes
After seeing a friend's really nifty
login screen, I decided to give it a shot. I turned to the Arch
Linux wiki, which discussed several options. The only one I knew I
didn't hate was the one I hadn't seen before, SLiM. I gave it a shot, and it seemed
decent enough. In fact, it's what my friend was using. I couldn't
find any really good themes for it that fit my tastes, but I did
notice that making a theme was insanely easy (as opposed, to, say,
configuring XDM). In keeping with my current backgrounds, I decided
to make a Vulpes vulpes (red fox) theme. Then I realised that you
could have more than one theme in the configuration file, and it
would pick them at random, so I made six themes!
They're all up at http://staticfree.info/~samuel/nieuw/unix/slim/ . You can view a preview of each of them there, and download them all tarballed up. There's different versions depending on how many monitors you have and if you want an exact copy of what I'm running or not.
They're all up at http://staticfree.info/~samuel/nieuw/unix/slim/ . You can view a preview of each of them there, and download them all tarballed up. There's different versions depending on how many monitors you have and if you want an exact copy of what I'm running or not.
2008-08-27 15:36:31
gtkfortune
The idea to write a fortune-like gui
program to display ArmA TTP quotes/snippets came to me while I was
washing dishes yesterday. I finished and promptly started to write
it. Eventually I realised it would just be better to write a
frontend for fortune itself and produce a ShackTac related (based
on the ArmA TTP) fortune database. One thing turned to another, and
I finished most of it last night. This morning I created a man
page, added a few other obligatory files, and I was set! (If you
can't tell, I'm not in a very chatty/writingish mood, but I felt
oblidged to make a post regarding gtkfortune.)
Anyways, it has support for printing extra information regarding the fortune (what file it came from and what fortune number it was) with the -e flag, and support for buttons (Prev, Next, New File, Quit) with -b. You can also specify if you want to pull from the offensive database's directory with -o, and it will rotate the rot13 quotes back to plain text. If you pass it an argument, it'll try to open that file instead of picking one at random.
Looks a bit like this:
Hopefully by the next release I'll have support for running it on windows, which I would image will be very useful, as it's kind of a pain to run console applications on windows without something like cygwin. It'd be great to have this start up when I login to play ArmA, giving me a nice quote from the Shack Tactical ArmA TTP guide (by Dslyecxi).
You can view the page here and download the tarball at http://staticfree.info/~samuel/nieuw/code/gtkfortune/gtkfortune-0.1.tar.gz.
Anyways, it has support for printing extra information regarding the fortune (what file it came from and what fortune number it was) with the -e flag, and support for buttons (Prev, Next, New File, Quit) with -b. You can also specify if you want to pull from the offensive database's directory with -o, and it will rotate the rot13 quotes back to plain text. If you pass it an argument, it'll try to open that file instead of picking one at random.
Looks a bit like this:
Hopefully by the next release I'll have support for running it on windows, which I would image will be very useful, as it's kind of a pain to run console applications on windows without something like cygwin. It'd be great to have this start up when I login to play ArmA, giving me a nice quote from the Shack Tactical ArmA TTP guide (by Dslyecxi).
You can view the page here and download the tarball at http://staticfree.info/~samuel/nieuw/code/gtkfortune/gtkfortune-0.1.tar.gz.
2008-08-22 12:09:56
Screenie 0.2
So after talking with my uncle about screenie,
he decided it was in his best interest to write a similar program
in Tcl/Tk. So he did, and there's links on his livejournal. He
didn't stop and decided he should write a minor ftp client with it
to, to help with the uploading, in Tcl/Tk again. Go check it
out.
Anyways, all this talk about screenie made me realise it lacked a feature to specify a remote user (obviously, anyways. I added some comments to the configuration file that makes it a bit more obvious.) or handle filename collisions. If I take a screenshot called 'new_irssi_theme.png', then take one with the same name months later, it's going to overwrite the old one. How sad would that be? So now if it detects a filename conflict in the remote directory, it'll append the output of 'date +%s' to your filename (to produce something like 'new_irssi_theme-1219420836.png') and carry along happily.
Now, if you're familiar with how ssh works and screenie, you'll know that now you have to type in the same password a grand total of 3 times. That's just silly! Right now, I'd recommend you use ssh keyrings such as detailed here: http://www.gentoo.org/doc/en/keychain-guide.xml. I'm currently looking into having it ask you for your password just once per remote host (it's possible to check/upload to one host and run the rcommand on another. I can't think of too many uses for this, but I can think of a few, so therefore I'll support it.). This will hopefully save time and sanity. Obviously, if you want to use keyrings/ssh-agent, this could be obnoxious since it probably won't detect if you have a key to get into either remote host, so you can turn it off with a flag. Probably '-p' is what I'm thinking now.
That's mostly it for now, the latest tarball is up at http://staticfree.info/~samuel/nieuw/code/screenie/screenie-0.2.tar.gz. I'm working on getting kudu/delta to help me host our projects on a mercurial repository on his rather new OpenBSD server (apollo.kudu.homeunix.net). Right now I've got two mercuria repositories, one on my server and one on my desktop (development/storage), but because of my situation here I can't make either public. I'm moving in two weeks though, we'll see what happens. For now just use the tarball.
Anyways, all this talk about screenie made me realise it lacked a feature to specify a remote user (obviously, anyways. I added some comments to the configuration file that makes it a bit more obvious.) or handle filename collisions. If I take a screenshot called 'new_irssi_theme.png', then take one with the same name months later, it's going to overwrite the old one. How sad would that be? So now if it detects a filename conflict in the remote directory, it'll append the output of 'date +%s' to your filename (to produce something like 'new_irssi_theme-1219420836.png') and carry along happily.
Now, if you're familiar with how ssh works and screenie, you'll know that now you have to type in the same password a grand total of 3 times. That's just silly! Right now, I'd recommend you use ssh keyrings such as detailed here: http://www.gentoo.org/doc/en/keychain-guide.xml. I'm currently looking into having it ask you for your password just once per remote host (it's possible to check/upload to one host and run the rcommand on another. I can't think of too many uses for this, but I can think of a few, so therefore I'll support it.). This will hopefully save time and sanity. Obviously, if you want to use keyrings/ssh-agent, this could be obnoxious since it probably won't detect if you have a key to get into either remote host, so you can turn it off with a flag. Probably '-p' is what I'm thinking now.
That's mostly it for now, the latest tarball is up at http://staticfree.info/~samuel/nieuw/code/screenie/screenie-0.2.tar.gz. I'm working on getting kudu/delta to help me host our projects on a mercurial repository on his rather new OpenBSD server (apollo.kudu.homeunix.net). Right now I've got two mercuria repositories, one on my server and one on my desktop (development/storage), but because of my situation here I can't make either public. I'm moving in two weeks though, we'll see what happens. For now just use the tarball.
2008-06-19 12:00:15
Screenie
So I recently re-installed Arch Linux
(in an attempt to upgrade/have a cleaner install, it went well, if
you were wondering). I accidentally overwrote my /opt/bin
directory, though, which I only recently discovered I had backed
up. This contained some simple stuff like caps2ctrl (`setxkbmap
-option ctrl:nocaps`), but also my `screenie` script. This was a
hackish little perl-that-should-have-been-a-shell-script program.
It would take a screenshot with import, upload it to my server, and
then print out the URL. It had seen many different rewrites, all
the same basic design (just store the command I want in a scalar,
call it with system(), (although the first version used ``, that
was a bit silly.) and print the url, hardcoded in). Well, no
longer. It now has a "real" excuse for being a perl script.
Configuration is handled by a YAML file, which defaults to
~/.screenie, unless specified otherwise. You can also specify all
of the options from the command line, with simple flags (-c config
-h hostname.com, so on and so forth). I actually feel as if now
it's a real program. Nothing is hardcoded in at all, except
for the defaulting to ~/.screenie for the config.
Right now it takes a screenshot, with a command of your choosing. Then it uploads it to a remote server (that you specify, of course) with scp. It then runs a local command, then a remote command (of your chosing). If you change something (such as -h), the rest of the config file is still used for everything else. Incase you wanted to, say, ommit the local command, you'd have to turn off parsing of the config file with -n.
Technically, it merely runs a local command, scps a file, runs a local command, runs a remote command, and then prints a URL. You could use it to upload something else, but it's rather optimised for screenshots (such as the fact that it grabs the last arguement passed on the command line and calls that $filename, which is used througout the program).
You can grab the source here, and view the project page at http://staticfree.info/~samuel/nieuw/code/screenie/.
Right now it takes a screenshot, with a command of your choosing. Then it uploads it to a remote server (that you specify, of course) with scp. It then runs a local command, then a remote command (of your chosing). If you change something (such as -h), the rest of the config file is still used for everything else. Incase you wanted to, say, ommit the local command, you'd have to turn off parsing of the config file with -n.
Technically, it merely runs a local command, scps a file, runs a local command, runs a remote command, and then prints a URL. You could use it to upload something else, but it's rather optimised for screenshots (such as the fact that it grabs the last arguement passed on the command line and calls that $filename, which is used througout the program).
You can grab the source here, and view the project page at http://staticfree.info/~samuel/nieuw/code/screenie/.
2008-05-31 03:23:30
Mk2 Mod0
Been working on fourier some more
(with an intermission for TF2, of course). Now it checks if you're
missing anything critical in your config file, no longer pings with
+m, and prints a fortune if you have fortune_time defined, but not
otherwise. Logs to a text file, which I 'deem' satistfactory for
the moment. I suppose it's going to have to work its way into MySQL
some time. I guess new logfile per day. That'd make sense.
(Unfortunately, I write good CODE when tired, not good English, I
don't know if you can tell.) I'm also implementing "feature flags",
so you can turn on and off things like fortune less hackishly in
the YAML file. I'm also about to write in the bit that lets you
define your silent-time and decay algorithms, which shall be read
by an eval. (I figured it was okay since it was in a config file,
or at least I'm told so.)
I also want to implement printing with formats, so it looks nicer. The logs obviously wont be, but the optional overly-verbose non-log debugging bit should look good. Right now it's horrendously hacked together. If I can print out a nice formatted table of all the config options, then run the bot, it should be fine. There's no reason to bother printing that garbage to the log.
This is a dreadfully short post, but I'm getting tired. I'll have to plod through tomorrow and implement said features. Then I might relax and embark on that WM project.
I also want to implement printing with formats, so it looks nicer. The logs obviously wont be, but the optional overly-verbose non-log debugging bit should look good. Right now it's horrendously hacked together. If I can print out a nice formatted table of all the config options, then run the bot, it should be fine. There's no reason to bother printing that garbage to the log.
This is a dreadfully short post, but I'm getting tired. I'll have to plod through tomorrow and implement said features. Then I might relax and embark on that WM project.
2008-05-30 23:21:40
Fourier Mk2
So, yeah. I've been working lately on
the IRC bot for #mathdorks , 'fourier'. He right now isn't totally
functional. Right now it's modified enough so that silent time goes
up arthimetically by two every time, but it's hackishly done. I
think it's got a bug or two. I'm in the process of cleaning up the
code base and trying to implement a configurable-via-yaml-file
silent-time increment-algorithm-thingy. It depends on if I can
store perl code in a string, then evaluate it like lisp. I believe
I can. I'm also in the process of building a configurable decay
function. I'm also trying to centralise some stuff in the file
itself to make it easier to read, and whatnot. I also want to
implement logging to MySQL instead of merely printing out to
stdout. It might do this already, though, I'll have to check.
Eventually when the actual bot is properly stable I want to setup a catalyst application that will display statistics over HTTP. You should be able to browse logs, and view all sent messages from or to a user, as well as being able to search with simple regexes (for security reasons it'll have to be limited, since I believe you can escape out of a regex and execute code... I believe this is the same reason why transmogrifier.org had to dumb down their search) for strings. It should show next decay, and by how much, and how much your next silent-time is. It might show if someone is silent or not, and who's it the channel. Basically it'd be great for monitoring a channel over text, except you have to refresh, so not really. A good log browser, though. It would defeat the need for a persistant IRC connection for most clients, but that's assuming the bot had 24/7 uptime (if I'm hosting it, it wont), and that you can live without getting messages (since there wont be a login system it can't notify you of anything.)
I'm also going to work on my own hybrid window manager that combines the clean base of EvilWM, along with basic functionaly with the layout algorithm of Ratpoison, but with the option keyboard bindings like EvilWM and/or Ratpoison (ratpoison is the 'sanest' but not so usable as EvilWMs for moving windows). You should be able to initiate a window control mode from ^t (or whatever the Ratpoison-style key you have is). It will of course sport a floating mode similar to DWM (in the toggle sense), which behaves exactly like EvilWM. It should also support multiple desktops, something that Ratpoison unfortunately lacks. It'd be nearly perfect, save the single-workspace issue, and the no-floating-mode (ever tried to use the gimp in Ratpoison? NIGHTMARE.) bit. Basically add those two features to Ratpoison, and you get my project. It should be fun. I've yet to come up with a good name for it. Probably something like ManiacalRodent. Or something to do with astro- or particle physics.
That seems to be it for now, those are the two main independant projects on my mind right now. Perl and C, it's all Perl and C... :)
Oh, I also had some idea for something in Python, but I forgot what it was. Dang not-writing stuff down. It might be lost forever. I dunno. Bollocks.
Eventually when the actual bot is properly stable I want to setup a catalyst application that will display statistics over HTTP. You should be able to browse logs, and view all sent messages from or to a user, as well as being able to search with simple regexes (for security reasons it'll have to be limited, since I believe you can escape out of a regex and execute code... I believe this is the same reason why transmogrifier.org had to dumb down their search) for strings. It should show next decay, and by how much, and how much your next silent-time is. It might show if someone is silent or not, and who's it the channel. Basically it'd be great for monitoring a channel over text, except you have to refresh, so not really. A good log browser, though. It would defeat the need for a persistant IRC connection for most clients, but that's assuming the bot had 24/7 uptime (if I'm hosting it, it wont), and that you can live without getting messages (since there wont be a login system it can't notify you of anything.)
I'm also going to work on my own hybrid window manager that combines the clean base of EvilWM, along with basic functionaly with the layout algorithm of Ratpoison, but with the option keyboard bindings like EvilWM and/or Ratpoison (ratpoison is the 'sanest' but not so usable as EvilWMs for moving windows). You should be able to initiate a window control mode from ^t (or whatever the Ratpoison-style key you have is). It will of course sport a floating mode similar to DWM (in the toggle sense), which behaves exactly like EvilWM. It should also support multiple desktops, something that Ratpoison unfortunately lacks. It'd be nearly perfect, save the single-workspace issue, and the no-floating-mode (ever tried to use the gimp in Ratpoison? NIGHTMARE.) bit. Basically add those two features to Ratpoison, and you get my project. It should be fun. I've yet to come up with a good name for it. Probably something like ManiacalRodent. Or something to do with astro- or particle physics.
That seems to be it for now, those are the two main independant projects on my mind right now. Perl and C, it's all Perl and C... :)
Oh, I also had some idea for something in Python, but I forgot what it was. Dang not-writing stuff down. It might be lost forever. I dunno. Bollocks.