Damn Small Linux - Not!
The forum for DSL-N
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

sed script to transform fluxbox menu to jwm menu

 
Post new topic   Reply to topic    Damn Small Linux - Not! Forum Index -> DSL-N Tips and Tricks
View previous topic :: View next topic  
Author Message
fredvej



Joined: 07 Sep 2006
Posts: 4

PostPosted: Thu Sep 07, 2006 1:05 pm    Post subject: sed script to transform fluxbox menu to jwm menu Reply with quote

If you put this script :
[code:1]
/\[exec\]/s/\[exec\] *(/<Program label="/
/<Program label="/s/) *{/"> /
/<Program label="/s/}.*/ <\/Program>/

/\[submenu\]/s/\[submenu\] *(/<Menu label="/
/<Menu label="/s/).*/"> /

s/\[end\]/<\/Menu>/
[/code:1]
into a file called flux2jwm.sed and run [code:1] sed -f flux2jwm.sed .fluxbox/menu > jwmenu [/code:1] you can easily edit out the parts that are missing from the jwm menu in RC4 and put it into .jwmrc.

The resulting jwmenu needs some editing, so you probably want to extract the missing entries from .fluxbox/menu first and run sed on the result.

The missing parts in RC4 are
[code:1]
<Program label="Samba"> LinNeighborhood </Program>

<Menu label="Apps">
<Program label="Web browser"> /usr/seamonkey/seamonkey </Program>
<Program label="Email"> /usr/seamonkey/seamonkey -mail </Program>
<Program label="IRC"> /usr/seamonkey/seamonkey -chat </Program>
<Program label="Mplayer"> /usr/bin/gmplayer </Program>
<Program label="WordProcessor"> abiword </Program>
<Program label="Spreadsheet"> gnumeric </Program>
<Program label="FTP Client"> gftp-gtk </Program>
<Program label="IM Client"> gaim </Program>
<Program label="PDF Viewer"> xpdf </Program>
<Menu label="File Manager">
<Program label="emeLFM"> emelfm </Program>
<Program label="emelFM as super-user"> sudo /bin/bash -c emelfm </Program>
</Menu>
<Program label="Xpaint"> /usr/bin/xpaint </Program>
</Menu>

<Menu label="Cups Printing">
<Program label="start"> sudo /etc/init.d/cupsys start </Program>
<Program label="stop"> sudo /etc/init.d/cupsys stop </Program>
<Program label="restart"> sudo /etc/init.d/cupsys restart </Program>
<Program label="reload"> sudo /etc/init.d/cupsys reload </Program>
<Program label="force-reload"> sudo /etc/init.d/cupsys force-reload </Program>
<Program label="Cups Admin"> /usr/seamonkey/seamonkey http://localhost:631 </Program>
</Menu>

<Program label="Leafpad"> leafpad </Program>
[/code:1]

Put Samba into the Network submenu , Leafpad under Editors and the CUPS menu under System.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Damn Small Linux - Not! Forum Index -> DSL-N Tips and Tricks All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group