Posts for: #Desktop

wmiirc-lua v0.2 has suspend and raw modes

[wmiirc-lua]{tags/wmiirc-lua} is a replacement for sh-based wmiirc that ships with the wmii window manager.

The big improvement in version 0.2 is the client tracking support; this enables raw and suspend modes

  • in raw mode the wmii key-bindings are ignored and all input is passed to the application.

  • in suspend mode, the process that created a particular window will be sent the STOP signal when the window is not in focus. I wrote this with firefox in mind; even when idle and off-screen my firefox gets woken up 100 times per second.

There were also several bug fixes in this release. You will still need to build libixp and wmii from hg [as detained here]{wmiirc-in-lua-v0.1.1}.

Read more →

wmiirc-lua debianization

I just fixed the install scripts for wmiirc-lua. It is now possible to install wmiirc-lua in system directories and run from there. There is also a Wmii-lua session for the display managers (kdm, gdm, etc).

The new and improved way to install wmiirc-lua is to [get libixp and wmii from hg]{wmiirc-in-lua-v0.1.1} and then…

    sudo apt-get install lua5.1 liblua5.1-0-dev liblua5.1-posix0 git-core
    
    git clone git://repo.or.cz/wmiirc-lua.git/
    
    cd wmiirc-lua
    git checkout debian
    make deb
    
    sudo debi
    
    install-wmiirc-lua

… restart X, and select Wmii-lua as your login session.

Read more →

wmiirc-lua v0.1.1

Last night, just before midnight, I released v0.1 of wmiirc-lua. And then a few minutes later I had to release v0.1.1. Let this be a lesson to me, midnight is way too late to make releases.

So what do you get in v0.1.1?

  • a very fast and lean implementation of an event loop for wmii-3.5
  • all keyboard shortcuts from the (shell) wmiirc that ships with wmii-3.5
  • some ideas taken from wmii+ruby like more advanced keyboard shortcuts and plugins
  • a clock plugin, a load plugin
  • and most importantly a huge community of 3 users!

Why would you want to use wmiirc-lua over the default, or even over the fabulous wmii+ruby?

  • unlike wmii+ruby, wmiirc-lua can run with wmii-3.5
    • debian/testing no longer has wmii-3.1 and according to the wmii website: wmii-3.1 is deprecated
  • wmiirc-lua is faster then the shell version because it doesn’t have to exec things on event processing
    • we communicate with wmii over an IXP socket directly
  • wmiirc-lua will not eat your laptop’s battery life like ruby threading can
    • powertop used to show ruby as the #1 source of CPU wakeups
    • 300 wakeups/s with wmii+ruby and 1 wakeup/s with wmiirc-lua
Read more →

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 →

urxvt mouseless url yanking

In the quest for a completely mouse free desktop, I wanted to be able to yank URLs from the termial without using the mouse. This happens often enough in IRC when I would want to grab the most recent URL and run it in firefox.

I talked to the author of vimperator and he suggested that I look at urxvt (packaged as rxvt-unicode). So I did.

A few hours later and I have a perl plug-in for urxvt that does just want I wanted.

Read more →

mouse-free

First there was a Navigator, then there was an Explorer. Later it was time for a Konqueror. Now it’s time for an Imperator, the VIMperator :)

VIMperator is a mozilla/firefox plugin from Martin Stubenschrott. It completely redefines the firefox interface to mimic the beloved VIM editor.

If you love vim, you are likely to love VIMperator. If not… well, your loss.

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 →