View previous topic :: View next topic |
Author |
Message |
tactless l33t
Joined: 14 Jul 2002 Posts: 642 Location: Mitzpe Adi, Israel
|
Posted: Thu Oct 09, 2003 4:52 am Post subject: Openbox3 menus - easy editor? |
|
|
They're obviously not that hard to understand, but they're still annoying to edit. Is there perhaps a generic XML tree-based editor, so I can edit both the menus and the configuration easily? Or perhaps an Openbox3-specific menu editor? _________________ Tactless
"If it wasn't for fog, the world would run at a really crappy framerate."
Jabber: tactless@amessage.info |
|
Back to top |
|
|
zenlunatic Guru
Joined: 09 Apr 2003 Posts: 312
|
Posted: Thu Oct 09, 2003 6:40 am Post subject: |
|
|
Perhaps you could use the GPL'd GTK2 app called Conglomerate. |
|
Back to top |
|
|
tactless l33t
Joined: 14 Jul 2002 Posts: 642 Location: Mitzpe Adi, Israel
|
Posted: Thu Oct 09, 2003 7:02 am Post subject: |
|
|
Looks promising. Will check out.
Edit: Nah, it pretty much chokes on it. Anything else? _________________ Tactless
"If it wasn't for fog, the world would run at a really crappy framerate."
Jabber: tactless@amessage.info |
|
Back to top |
|
|
zenlunatic Guru
Joined: 09 Apr 2003 Posts: 312
|
Posted: Thu Oct 09, 2003 3:33 pm Post subject: |
|
|
Emacs? Sorry that's all here. |
|
Back to top |
|
|
Ansorg Apprentice
Joined: 13 Jul 2002 Posts: 193
|
Posted: Thu Oct 09, 2003 6:15 pm Post subject: try app-text/mlview |
|
|
* app-text/mlview
Latest version available: 0.0.3_rc1
Latest version installed: [ Not Installed ]
Size of downloaded files: 608 kB
Homepage: http://www.nongnu.org/mlview/
Description: XML Editor for Gnome
ah, make sure to emerge the (masked) 0.6 version for Gnome2 _________________ thanks
Jens |
|
Back to top |
|
|
tactless l33t
Joined: 14 Jul 2002 Posts: 642 Location: Mitzpe Adi, Israel
|
Posted: Thu Oct 09, 2003 11:50 pm Post subject: |
|
|
Yeah, mlview's kinda what I was looking for. Not all too comfy to use in this instance, but works, and is faster than doing it manually. _________________ Tactless
"If it wasn't for fog, the world would run at a really crappy framerate."
Jabber: tactless@amessage.info |
|
Back to top |
|
|
dub.wav Tux's lil' helper
Joined: 09 Apr 2003 Posts: 149 Location: Norway
|
Posted: Fri Oct 10, 2003 11:00 am Post subject: |
|
|
Here's a small script I wrote for this purpose:
Code: |
#!/bin/bash
function fluxbox() {
local menu="$HOME/.fluxbox/menu"
echo -e "\t[exec] ("$1") {"$2"}" >> $menu
vim + $menu
}
function xfce() {
local menu="$HOME/.xfce4/menu.xml"
echo -e "\t<app name="\"""$1""\"" cmd="\"""$2""\""/>" >> $menu
vim + $menu
}
function openbox() {
local menu="$HOME/.config/openbox/menu.xml"
local w1=" "
local w2=" "
echo -e "$w1<item label="\"""$1""\"">\n$w2<action name=""\""Execute""\""><execute>"$2"</execute></action>\n$w1</item>" >> $menu
vim + $menu
}
[ "$#" = "3" ] || exit
case "$1" in
"fluxbox" ) fluxbox "$2" "$3";;
"xfce" ) xfce "$2" "$3";;
"openbox" ) openbox "$2" "$3";;
* ) exit;;
esac
|
The echo -e line in openbox() got wrapped, so remember to fix that if you're going to try the script.
Here's how to use it:
addentry.sh <wm> <name> <exec>
i.e. addentry.sh openbox epiphany epiphany
The script just echoes the entry to the end of the menufile, because I'm not able to figure out how to to echo it to the right place. (Is it even possible?) Instead, the script launches vim. Here's how to move the entry to the right place:
Place the cursor at the beginning of the new entry. press esc, and then type dd for flux/xfce, or 3dd for openbox. Move up to where you want the entry, and press p. If openbox, make sure the cursor is at a </item> tag. Then press Esc, and ZZ to save and exit. Alternatively, change the script so it reads gvim + etc instead of vim. This works great for me at least
Edit: Never mind about the line getting wrapped, it only happened in the preview. |
|
Back to top |
|
|
lain iwakura Apprentice
Joined: 09 May 2002 Posts: 176 Location: sd, ca
|
Posted: Mon Dec 08, 2003 11:43 pm Post subject: |
|
|
menumaker 0.15 doesn't do too bad of a job creating a decent menu, then from there, edit at your hearts content.
Code: |
emerge menumaker
mmaker -o menu.xml openbox3
|
your menu.xml file should go under ~/.config/openbox for a user specific configuration. _________________ [resident anime junkie] -- not just a linux freak. |
|
Back to top |
|
|
|