Tuesday, March 13, 2007

OSD Desktop

Yet Another Long Deferred (for years) Post. At last I've recorded how a working upon my desktop looks like (640x480 10fps 2mb or 1024x768 10fps 6mb). The idea concerning osd'ish desktop had floated around for long, before I sat and wrote first lines of code. Due to a logical evolution of my desktop I had gotten used to work with any application in fullscreen mode. Things like clocks, bars and meters had quickly been rid from my desktop. Although I found myself in a world without notifications. I was happy. Then, OSD came to me as a solution to keep fullscreenness and be aware of events. Using python and osd library for it, I've implemented an events daemon. The daemon reads lines from the ~/log/events file and parses them using one of the following patterns:
  • string - add this string into a list of displaying strings.
  • [][][]\d\d\d\d: string - the same as previous case, but the string is visible for the \d\d\d\d (four digits) ms.
  • \d\d\:\d\d:\d\d: string - the same as first case, but with a date preceeding string. The date is not visible on OSD.
  • \d\d\:\d\d:\d\d: [][][]\d\d\d\d: string - The same as second case with the mark as in third case.
    Now it was a time to implement programs that would write to the ~/log/events file. First such program became aktimelog that writes time into the events log every 25 minutes. Others I've made: plugin for irssi to see either public, private or both messages, monitoring of keyboard layout changes, workspace switching, mail notifications, shell notifications. Also it is not needless to say that workspace switching is driven by shortcuts. For instance, if you press the MOD-e shortcut, in addition to switching workspace, ion3 checks whether emacs is runned and run it if it is not yet and you confirmed it for. I usually know where I have to switch to, and don't waste my time running through the list of open programs. So MOD-e is for emacs, MOD-p -- revelation, MOD-c -- eclipse, MOD-b -- browser, MOD-1 -- first terminal, MOD-2 -- second terminal... and so on. That is how my desktop works. But how does yours work? :)

    Sources.
  • No comments:

    Post a Comment