Posts for: #Wmii

wmiirc in lua

I have been running wmii window manager for almost a year, and since the beginning I have been using the ruby wmiirc script.

In wmii all events are handled by the wmiirc script, while wmii handles the display of windows. The wmiirc should thus do nothing until a user event (or a program event) occurs. Well, it turns out that updating the clock and status widgets requires that a thread be ran to write the new text to the screen.

So far, that’s not so bad. We could schedule updates to occur infrequently. The bad part comes from the ruby implementation of threads. Threads in ruby 1.x seem to require that the interpreter do a busy wait at an interval of 10ms… this does not make me very happy as it chews up a ton of battery life according to powertop.

I wanted to rewrite a wmiirc in something else. That something else, I decided, would be [lua]{tag/lua}. I chose lua because of the small footprint, use of coroutines and iterators to avoid threading, and the fact that I can plug things in using C.

Read more →

wmii+ruby xlock action

I use xscreensaver and like to lock my display when I leave my computer. Here is a snippet from my wmiirc-config.rb file that adds an xlock action to the Alt-a action menu.

    plugin_config["standard:actions"]["internal"].update({
      'xlock' => lambda do |wmii, *args|
            system("xscreensaver-command --lock")
      end
    })

I start my xscreensaver in the .xsession file:

    /usr/bin/xscreensaver -nosplash &

… before launching wmii.

Read more →

cloning xterms in wmii+ruby

I have recently added a few things to by wmii+ruby configuration that I wanted to share. These are:

  • start a program in a given view from bash prompt (authored by Dave O’Neill)
  • start a program in a given view using Alt-Shift-p (authored by Jean Richard)
  • start an xterm in a given view using Alt-Shift-Return
  • cache directory changes in a view, start an xterm in the view’s last directory using Alt-Apostrophe
Read more →

wmii w/ ruby wmiirc

My window managers have changed a few times over the years. I started off with OpenSTEP at Carleton, used that for a year. Then switched to Afterstep, which I used for about 3 years. Next I switched to sawfish/sawmill, and used it for about 4 years. Recently I went through a crisis as sawfish stopped working for me in testing on amd64. I found [ion3]{tag/ion3} to be a nice replacement. I was a happy ion3 user for almost a year and then someone suggested that I try [wmii-3]{tag/wmii}.

Read more →