?

Log in

Yummy code-fu! - The Desian Universe
Links Home / GitHub January 2017
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
 
 
 
 
deskitty
deskitty
Des
Tue, Feb. 18th, 2003 01:02 am
Yummy code-fu!

So, to continue the current technology thread, I got rather bored of life and wrote a nifty little utility in Perl.

I tend to switch window managers a lot...for a while I was using KDE, then Ion, then PWM, then Enlightenment, then Fluxbox...and I still go back and forth quite often. (So much so, in fact, that I have wmselect installed on my laptop...) To make this transition easier, I decided to write a utility that generates menus from a common menu file.


Basically what this app does is read an XML file describing a menu structure, and then dump out menus in various WM-specific formats. The advantage to writing it myself (over using something like wmconfig) is that I can structure it however I want, and it's easy for me to write additional plugins to handle new window managers.

The cool thing about this (and the reason I decided to use XML in this instance) is, I can have WM-specific stuff in there easily, so things like the Fluxbox settings in the menu don't have to suffer.

Also, I added in the ability to have host-specific menus and submenus. So, for example, on spica (my laptop), I have a "Sync" menu (for syncing the laptop to deneb), whereas on deneb, I don't.

Right now the only modules I have are Fluxbox and Enlightenment DR16, but others like pwm (and possibly E DR17) will be appearing eventually. Perhaps I'll even write one for TWM, if I'm feeling especially masochistic...


Anyway, bedtime for me. I have my MDS interview tomorrow morning, bright and early at 11 AM. Wish me luck...

-- Des

Current Mood: happy happy
Current Music: Orbital {CKY2K Soundtrack} - Halcyon & On & On []

2CommentReplyShare

devpreed
preed
Tue, Feb. 18th, 2003 03:59 am (UTC)

Two things:

a) If you actually get that job at MDS, I will kill you, and start showing up to MDS to work in your place. So, do good at the interview... I need a 'nother victim job.

ii. Geez... you two love to reinvent wheels, don't you? That's fine and dandy, but the reason I bring it up is you'll probably want to do that when someone hires you, and that's a bad thing (tm). It's a waste of their time and money and your intellectual effort.

You both need to read this. And when you're done reading it and think you understand what it's saying, read it again.

Then think on it and read it a third time.


ReplyThread
kion
kion
Kevin Kress
Tue, Feb. 18th, 2003 10:39 am (UTC)

mmmm Joel is cool. I have read that article before and agree with it, throwing out all the old code in favor of new is never a good idea. I learned that lesson, at Com Dev, where we tried to build our own EMS system instead of buying one from a respected source. We eventually ended up abandoning the old system in favor of the commercial product. That seems to go against what you are preaching here, but I disagree. The lesson there is that a group of 8 people were trying to reinvent a wheel that had been perfected by a team of 100, Com Dev just thought they could do it cheaper, they were very very wrong. I have had the desire to throw out entire modules of the project I am working on now, but I am pretty good at suppressing those desires. Refactoring is far better than redoing.

I don't really consider what I am doing with the calendaring idea to be reinventing the wheel, but instead I am playing. I have never written a calendaring system before and it could pose some interesting problems. As I said in my reply to you in my journal, its more a learning experience than anything else. The fact that it is work inspired does not imply I would ask or even want WA to use any calendaring tool I would potentially write.


ReplyThread Parent