Recently in ruby Category

My random old scripts moved to git

| No Comments

So, I had a few random old scripts lying around in SVN. I've migrated them to git now. Along with my other repos, they're browseable at http://git.pioto.org/

Things of interest might be:

  • rbtpb - A replacement for tpb which is hopefully more robust.
  • rubeak - A tool for handling multimedia keyboard keys, and some IR remotes.

Update: fixed links.

So, been a while, but here's something I just threw together. It's still a little rough around the edges, but it seems to be more robust than tpb for my system, at least, and it doesn't require me to make /dev/nvram available.

It uses /sys/class/backlight/thinkpad_screen/actual_brightness (from the thinkpad_acpi module in the 2.6.22 kernel) to figure out the screen brightness, and /proc/acpi/ibm/volume to figure out the volume and mute states, also provided by the thinkpad_acpi module (I'll switch to using sysfs for this when it becomes available).

It also requires the ruby-xosd package, which you can get from my overlay: git://git.pioto.org/pioto-overlay.git

For lazy paludis users, just add this to /etc/paludis/repositories/pioto-overlay.conf:

format = ebuild
location = /var/paludis/repositories/pioto-overlay
sync = git://git.pioto.org/pioto-overlay.git
master_repository = gentoo
names_cache = /var/cache/paludis/names
write_cache = /var/cache/paludis/metadata

Or, you can just do: playman -a pioto-overlay

You can get the current version of this script from git at: https://github.com/pioto/rbtpb

Update: Fix links.
Update 2: Fix links, again.

2 New Paludis Scripts

| 4 Comments

I'm currently working on 2 new ruby scripts based upon paludis' ruby bindings: grex and playman.

Grex is going to ultimately do all the things that herdstat can. For now, it just lists who maintains a given package (maintainers and herds) and, optionally, lists the members of each herd. This script requires you to have a recent -scm version of paludis installed with the ruby USE flag enabled.

Playman is a layman replacement for paludis. It works on the same layman-global.txt file that layman does. Right now it is able to list overlays and add them. It can still probably use a little cleaning up, but I think those are the main important features. This script requires you to have paludis installed with the ruby USE flag enabled. I think it should work with version 0.14.3, but I've only tested it with the latest -scm version.

So, feel free to try them out, but be sure to back up your configs before you play around with playman too much. Grex should be quite safe to play with, it's just rather lacking in features for the moment.

Update: Fixed the links above.

Update 2: Playman is now installed as part of paludis when built with USE="ruby". Look for it in /usr/share/paludis/ruby/demos/playman.rb

Update 3: Fixed links, again.

Update 4: Fixed links yet again.