Closed semeion closed 5 years ago
Hi
Yes, that should work.
What do you get if you run “jgmenu_run ob” in a terminal?
Where is your openbox menu.xml file located?
The ob module has it’s own man page. https://github.com/johanmalm/jgmenu/blob/master/docs/manual/jgmenu-ob.1.md
I have refactored the ob module a lot recently, so appreciate feedback if anything doesn’t seem right.
On 18 Nov 2018, at 09:44, Alexandre Bolelli notifications@github.com wrote:
Is possible to use a dynamic openbox menu (for example jgmenu_run ob) in i3-wm?
I can use pmenu, lx, xdg, but when i try to use ob it doesn´t work in my i3 wm. Some workaround?
Thanks in advance
Congratulation for jgmenu, it is a nice tool.
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or mute the thread.
It return:
mnemonic@blackbird[~]$ jgmenu_run ob
(null),^tag(root-menu)
obm,^pipe(jgmenu_run ob --cmd='/home/mnemonic/bin/obm' --tag='obm')
mnemonic@blackbird[~]$
Well, it seems to work fine, the menu is created sucessfull in the i3wm, but when i click on some option nothing happens...
Running jgmenu from console i can see some errors, seems like it is trying to execute my option using some wrong command.
See, that "/bin/bash: null: command not found" happens everytime i click on some option in the menu, i choosed 3 programs from menu and he returned 3 errors:
mnemonic@blackbird[~]$ jgmenu
fatal: an instance of 'jgmenu' is already running
mnemonic@blackbird:1[~]$ killall jgmenu
mnemonic@blackbird[~]$ jgmenu
info: using monitor '1'
info: got font from jgmenurc
info: set font to 'Ubuntu 12px'
info: got icon theme from gtk config file
info: set icon theme to 'nuoveXT2'
/bin/bash: null: command not found
/bin/bash: null: command not found
/bin/bash: null: command not found
^C
info: caught SIGTERM or SIGINT
mnemonic@blackbird[~]$
PS. sorry for my english errors, english isn´t my native language.
switching from "csv_cmd = ob" to "csv_cmd = pmenu" it work fine, but not using the openbox dynamic menu.
My config file:
# jgmenurc - jgmenu_run pmenu
stay_alive = 1
#hide_on_startup = 0
csv_cmd = ob
tint2_look = 0
at_pointer = 0
terminal_exec = urxvtc
terminal_args = -e
#monitor = 0
#hover_delay = 100
#hide_back_items = 1
#columns = 1
menu_margin_x = 4
menu_margin_y = 32
menu_width = 200
#menu_height_min = 0
#menu_height_max = 0
#menu_height_mode = static
menu_padding_top = 10
menu_padding_right = 2
menu_padding_bottom = 5
menu_padding_left = 2
menu_radius = 0
menu_border = 1
menu_halign = left
menu_valign = bottom
#sub_spacing = 1
#sub_padding_top = auto
#sub_padding_right = auto
#sub_padding_bottom = auto
#sub_padding_left = auto
sub_hover_action = 1
#item_margin_x = 3
item_margin_y = 5
item_height = 30
item_padding_x = 8
item_radius = 0
item_border = 0
#item_halign = left
sep_height = 5
#sep_halign = left
#sep_markup =
font = Ubuntu 12px
#font_fallback = xtg
icon_size = 24
#icon_text_spacing = 10
#icon_theme =
#icon_theme_fallback = xtg
#arrow_string = ▸
#arrow_width = 15
color_menu_bg = #2b303b 100
#color_menu_border = #eeeeee 8
color_norm_bg = #2b303b 0
color_norm_fg = #8fa1b3 100
color_sel_bg = #8fa1b3 60
color_sel_fg = #2b303b 100
#color_sel_border = #eeeeee 8
color_sep_fg = #8fa1b3 40
#csv_name_format = %n (%g)
#csv_single_window = 0
#csv_no_dirs = 0
The output of my obm is:
mnemonic@blackbird[~]$ obm
<openbox_pipe_menu>
<item label="File Manager" icon="/usr/share/icons/nuoveXT2/128x128/apps/file-manager.png"><action name="Execute"><execute>xfe</execute></action></item>
<item label="Terminal" icon="/usr/share/icons/nuoveXT2/128x128/apps/terminal.png"><action name="Execute"><execute>urxvtc</execute></action></item>
<item label="Text Editor" icon="/usr/share/icons/nuoveXT2/128x128/apps/text-editor.png"><action name="Execute"><execute>geany</execute></action></item>
<item label="Web Browser" icon="/usr/share/icons/nuoveXT2/128x128/apps/web-browser.png"><action name="Execute"><execute>firefox -P mnemonic</execute></action></item>
<separator label="Applications"/>
<menu id="92" icon="/usr/share/icons/nuoveXT2/128x128/categories/applications-accessories.png" label="Accessories">
<item label="Adie" icon="/usr/share/pixmaps/adie.png"><action name="Execute"><execute>adie</execute></action></item>
<item label="Calculator" icon="/usr/share/icons/Adwaita/16x16/apps/accessories-calculator.png"><action name="Execute"><execute>/usr/bin/xcalc</execute></action></item>
<item label="Character Map" icon="/usr/share/icons/Adwaita/16x16/apps/accessories-character-map.png"><action name="Execute"><execute>gucharmap</execute></action></item>
<item label="CherryTree" icon="/usr/share/icons/hicolor/scalable/apps/cherrytree.svg"><action name="Execute"><execute>cherrytree</execute></action></item>
<item label="FOX Calculator" icon="/usr/share/pixmaps/calculator.png"><action name="Execute"><execute>calculator</execute></action></item>
<item label="KeePassX" icon="/usr/share/pixmaps/keepassx.xpm"><action name="Execute"><execute>keepassx</execute></action></item>
<item label="Virtual Magnifying Glass"><action name="Execute"><execute>vmg</execute></action></item>
<item label="Virtual Magnifying Glass" icon="/home/mnemonic/.local/share/icons/kmag.png"><action name="Execute"><execute>/usr/bin/vmg</execute></action></item>
<item label="Xarchiver" icon="/usr/share/icons/hicolor/16x16/apps/xarchiver.png"><action name="Execute"><execute>xarchiver</execute></action></item>
<item label="Xfi" icon="/usr/share/pixmaps/xfi.png"><action name="Execute"><execute>xfi</execute></action></item>
<item label="Xfw" icon="/usr/share/pixmaps/xfw.png"><action name="Execute"><execute>xfw</execute></action></item>
</menu>
<menu id="96" icon="/usr/share/icons/nuoveXT2/128x128/categories/applications-development.png" label="Development">
<item label="Android SDK" icon="/home/mnemonic/.local/share/icons/android-sdk.png"><action name="Execute"><execute>android</execute></action></item>
<item label="Android Studio" icon="/home/mnemonic/.local/share/icons/android-studio.png"><action name="Execute"><execute>studio.sh</execute></action></item>
<item label="CMake" icon="/usr/share/icons/hicolor/128x128/apps/CMakeSetup.png"><action name="Execute"><execute>cmake-gui</execute></action></item>
<item label="Geany" icon="/usr/share/icons/hicolor/16x16/apps/geany.png"><action name="Execute"><execute>geany</execute></action></item>
<item label="Meld" icon="/usr/share/icons/hicolor/16x16/apps/meld.png"><action name="Execute"><execute>meld</execute></action></item>
<item label="MySQL Workbench" icon="/usr/share/icons/hicolor/128x128/apps/mysql-workbench.png"><action name="Execute"><execute>mysql-workbench</execute></action></item>
</menu>
<menu id="104" icon="/usr/share/icons/Adwaita/16x16/categories/applications-games.png" label="Games">
<item label="Counter-Strike" icon="/home/mnemonic/.local/share/icons/hicolor/16x16/apps/steam_icon_10.png"><action name="Execute"><execute>steam steam://rungameid/10</execute></action></item>
<item label="Day of Defeat" icon="/home/mnemonic/.local/share/icons/hicolor/32x32/apps/steam_icon_30.png"><action name="Execute"><execute>steam steam://rungameid/30</execute></action></item>
<item label="Deathmatch Classic" icon="/home/mnemonic/.local/share/icons/hicolor/16x16/apps/steam_icon_40.png"><action name="Execute"><execute>steam steam://rungameid/40</execute></action></item>
<item label="Dosbox" icon="/usr/share/pixmaps/dosbox.png"><action name="Execute"><execute>dosbox</execute></action></item>
<item label="Fistful of Frags" icon="/usr/share/pixmaps/steam.png"><action name="Execute"><execute>steam steam://rungameid/265630</execute></action></item>
<item label="Half-Life: Blue Shift" icon="/home/mnemonic/.local/share/icons/hicolor/16x16/apps/steam_icon_130.png"><action name="Execute"><execute>steam steam://rungameid/130</execute></action></item>
<item label="Half-Life" icon="/home/mnemonic/.local/share/icons/hicolor/16x16/apps/steam_icon_70.png"><action name="Execute"><execute>steam steam://rungameid/70</execute></action></item>
<item label="Half-Life: Opposing Force" icon="/home/mnemonic/.local/share/icons/hicolor/32x32/apps/steam_icon_50.png"><action name="Execute"><execute>steam steam://rungameid/50</execute></action></item>
<item label="Portal" icon="/home/mnemonic/.local/share/icons/hicolor/16x16/apps/steam_icon_400.png"><action name="Execute"><execute>steam steam://rungameid/400</execute></action></item>
<item label="Quake III Arena" icon="/usr/share/pixmaps/quake3.png"><action name="Execute"><execute>/usr/bin/quake3</execute></action></item>
<item label="Ricochet" icon="/home/mnemonic/.local/share/icons/hicolor/32x32/apps/steam_icon_60.png"><action name="Execute"><execute>steam steam://rungameid/60</execute></action></item>
<item label="Steam (Native)" icon="/usr/share/pixmaps/steam.png"><action name="Execute"><execute>/usr/bin/steam-native</execute></action></item>
<item label="Steam (Runtime)" icon="/usr/share/pixmaps/steam.png"><action name="Execute"><execute>/usr/bin/steam-runtime</execute></action></item>
<item label="Team Fortress 2" icon="/home/mnemonic/.local/share/icons/hicolor/16x16/apps/steam_icon_440.png"><action name="Execute"><execute>steam steam://rungameid/440</execute></action></item>
<item label="Team Fortress Classic" icon="/home/mnemonic/.local/share/icons/hicolor/16x16/apps/steam_icon_20.png"><action name="Execute"><execute>steam steam://rungameid/20</execute></action></item>
<item label="Tibia" icon="/home/mnemonic/.local/share/icons/tibia.png"><action name="Execute"><execute>'/home/mnemonic/.local/share/CipSoft GmbH/Tibia/start-tibia-launcher.sh'</execute></action></item>
<item label="Urban Terror" icon="/usr/share/pixmaps/urbanterror.png"><action name="Execute"><execute>urbanterror</execute></action></item>
<item label="Warsow" icon="/usr/share/pixmaps/warsow.png"><action name="Execute"><execute>warsow</execute></action></item>
</menu>
<menu id="108" icon="/usr/share/icons/nuoveXT2/128x128/categories/applications-graphics.png" label="Graphics">
<item label="Dia Diagram Editor" icon="/usr/share/icons/hicolor/16x16/apps/dia.png"><action name="Execute"><execute>dia</execute></action></item>
<item label="gbdfed" icon="/usr/share/pixmaps/gbdfed.png"><action name="Execute"><execute>gbdfed</execute></action></item>
<item label="Image Viewer" icon="/usr/share/icons/hicolor/48x48/apps/gpicview.png"><action name="Execute"><execute>gpicview</execute></action></item>
<item label="Screenshoot in 20 secs" icon="/usr/share/icons/Adwaita/16x16/emblems/emblem-photos.png"><action name="Execute"><execute>scrot -d 20</execute></action></item>
</menu>
<menu id="112" icon="/usr/share/icons/nuoveXT2/128x128/categories/applications-multimedia.png" label="Multimedia">
<item label="Alsaplayer" icon="/home/mnemonic/.local/share/icons/alsaplayer.png"><action name="Execute"><execute>alsaplayer</execute></action></item>
<item label="gtk-recordMyDesktop" icon="/usr/share/pixmaps/gtk-recordmydesktop.png"><action name="Execute"><execute>gtk-recordMyDesktop</execute></action></item>
<item label="HandBrake" icon="/usr/share/icons/hicolor/scalable/apps/fr.handbrake.ghb.svg"><action name="Execute"><execute>ghb</execute></action></item>
<item label="PulseAudio Manager" icon="/usr/share/icons/Adwaita/16x16/devices/audio-card.png"><action name="Execute"><execute>paman</execute></action></item>
<item label="PulseAudio Volume Control" icon="/usr/share/icons/Adwaita/16x16/apps/multimedia-volume-control.png"><action name="Execute"><execute>pavucontrol</execute></action></item>
<item label="Qmmp" icon="/usr/share/icons/hicolor/16x16/apps/qmmp.png"><action name="Execute"><execute>qmmp</execute></action></item>
<item label="QNapi" icon="/usr/share/icons/hicolor/128x128/apps/qnapi.png"><action name="Execute"><execute>qnapi</execute></action></item>
<item label="Qt V4L2 video capture utility" icon="/usr/share/icons/hicolor/16x16/apps/qvidcap.png"><action name="Execute"><execute>qvidcap</execute></action></item>
<item label="VLC media player" icon="/usr/share/icons/hicolor/128x128/apps/vlc.png"><action name="Execute"><execute>/usr/bin/vlc --started-from-file</execute></action></item>
</menu>
<menu id="116" icon="/usr/share/icons/nuoveXT2/128x128/categories/applications-internet.png" label="Network">
<item label="Chromium" icon="/usr/share/icons/hicolor/128x128/apps/chromium.png"><action name="Execute"><execute>/usr/bin/chromium</execute></action></item>
<item label="Dropbox" icon="/usr/share/pixmaps/dropbox.png"><action name="Execute"><execute>dropbox</execute></action></item>
<item label="FileZilla" icon="/usr/share/pixmaps/filezilla.png"><action name="Execute"><execute>filezilla</execute></action></item>
<item label="Firefox" icon="/usr/share/icons/nuoveXT2/128x128/apps/firefox.png"><action name="Execute"><execute>/usr/lib/firefox/firefox</execute></action></item>
<item label="Firefox Profile Manager" icon="/usr/share/icons/nuoveXT2/128x128/apps/firefox.png"><action name="Execute"><execute>firefox --ProfileManager</execute></action></item>
<item label="IPTV App" icon="/usr/share/icons/Adwaita/16x16/devices/video-display.png"><action name="Execute"><execute>iptv prog 1 100 --make --gtk</execute></action></item>
<menu label="IPTV" id="57-12" icon="/usr/share/icons/Adwaita/16x16/devices/video-display.png" execute="iptv list --ob"/>
<item label="Python CGIHTTPServer" icon="/usr/share/icons/nuoveXT2/128x128/apps/utilities-terminal.png"><action name="Execute"><execute>urxvtc -e sh -c 'cd ~/public_html;python2 -m CGIHTTPServer'</execute></action></item>
<item label="qBittorrent" icon="/usr/share/pixmaps/qbittorrent.png"><action name="Execute"><execute>qbittorrent</execute></action></item>
<item label="Thunderbird" icon="/usr/share/icons/nuoveXT2/128x128/apps/thunderbird.png"><action name="Execute"><execute>/usr/lib/thunderbird/thunderbird</execute></action></item>
<item label="WeeChat" icon="/usr/share/icons/hicolor/32x32/apps/weechat.png"><action name="Execute"><execute>urxvtc -e /usr/bin/weechat-curses</execute></action></item>
<item label="Wireshark (GTK+)" icon="/usr/share/icons/hicolor/128x128/apps/wireshark.png"><action name="Execute"><execute>wireshark-gtk</execute></action></item>
<item label="Zenmap (as root)" icon="/usr/share/zenmap/pixmaps/zenmap.png"><action name="Execute"><execute>/usr/share/zenmap/su-to-zenmap.sh</execute></action></item>
<item label="Zenmap" icon="/usr/share/zenmap/pixmaps/zenmap.png"><action name="Execute"><execute>zenmap</execute></action></item>
</menu>
<menu id="120" icon="/usr/share/icons/nuoveXT2/128x128/categories/applications-office.png" label="Office">
<item label="CoolReader3" icon="/usr/share/pixmaps/cr3.png"><action name="Execute"><execute>cr3</execute></action></item>
<item label="Xpdf" icon="/usr/share/pixmaps/xpdf.svg"><action name="Execute"><execute>xpdf</execute></action></item>
</menu>
<menu id="128" icon="/usr/share/icons/Adwaita/16x16/categories/preferences-system.png" label="Settings">
<item label="Adobe Flash Player" icon="/usr/share/icons/hicolor/16x16/apps/flash-player-properties.png"><action name="Execute"><execute>flash-player-properties</execute></action></item>
<item label="Customize Look and Feel" icon="/usr/share/icons/nuoveXT2/128x128/apps/preferences-desktop-theme.png"><action name="Execute"><execute>lxappearance</execute></action></item>
<item label="Default applications for LXSession" icon="/usr/share/icons/nuoveXT2/128x128/categories/preferences-desktop.png"><action name="Execute"><execute>lxsession-default-apps</execute></action></item>
<item label="Desktop Session Settings" icon="/usr/share/icons/nuoveXT2/128x128/categories/preferences-desktop.png"><action name="Execute"><execute>lxsession-edit</execute></action></item>
<item label="FOX Desktop Setup" icon="/home/mnemonic/.local/share/icons/ControlPanel.png"><action name="Execute"><execute>ControlPanel</execute></action></item>
<item label="OBApps" icon="/usr/share/pixmaps/obconf.png"><action name="Execute"><execute>/usr/bin/obapps</execute></action></item>
<item label="Openbox Configuration Manager" icon="/usr/share/pixmaps/obconf.png"><action name="Execute"><execute>obconf</execute></action></item>
<menu label="Openbox" id="17-8" icon="/usr/share/pixmaps/openbox.png" execute="obm-openbox"/>
<item label="Tint2 Settings" icon="/usr/share/icons/hicolor/scalable/apps/tint2conf.svg"><action name="Execute"><execute>tint2conf</execute></action></item>
<menu label="Wallpapers" id="17-9" icon="/usr/share/icons/Adwaita/16x16/apps/preferences-desktop-wallpaper.png" execute="obm-fehpipe"/>
</menu>
<menu id="132" icon="/usr/share/icons/nuoveXT2/128x128/categories/applications-system.png" label="System">
<item label="bashmount" icon="/usr/share/icons/nuoveXT2/128x128/apps/utilities-terminal.png"><action name="Execute"><execute>urxvtc -e sh -c 'bashmount'</execute></action></item>
<item label="devmon" icon="/usr/share/icons/nuoveXT2/128x128/apps/utilities-terminal.png"><action name="Execute"><execute>urxvtc -e sh -c 'mnt'</execute></action></item>
<item label="GParted" icon="/usr/share/icons/hicolor/16x16/apps/gparted.png"><action name="Execute"><execute>/usr/bin/gparted</execute></action></item>
<item label="Hardware Locality lstopo"><action name="Execute"><execute>lstopo</execute></action></item>
<item label="Htop" icon="/usr/share/pixmaps/htop.png"><action name="Execute"><execute>urxvtc -e htop</execute></action></item>
<item label="LXPolkit" icon="/usr/share/icons/nuoveXT2/128x128/apps/utilities-terminal.png"><action name="Execute"><execute>urxvtc -e sh -c 'lxpolkit'</execute></action></item>
<item label="Oracle VM VirtualBox" icon="/usr/share/icons/hicolor/128x128/mimetypes/virtualbox.png"><action name="Execute"><execute>VirtualBox</execute></action></item>
<menu label="Removable Media" id="33-15" icon="/usr/share/icons/Adwaita/16x16/devices/media-removable.png" execute="obdevicemenu"/>
<menu label="Services" id="33-17" icon="/usr/share/icons/Adwaita/16x16/actions/system-run.png" execute="obm-services"/>
<menu label="System Files" id="33-16" icon="/usr/share/icons/nuoveXT2/128x128/apps/text-editor.png" execute="obm-system_files"/>
<item label="System Profiler and Benchmark" icon="/usr/share/icons/hicolor/48x48/apps/hardinfo.png"><action name="Execute"><execute>/usr/bin/hardinfo</execute></action></item>
<item label="Task Manager" icon="/usr/share/icons/nuoveXT2/128x128/apps/utilities-system-monitor.png"><action name="Execute"><execute>lxtask</execute></action></item>
<item label="urxvt (client)" icon="/usr/share/icons/nuoveXT2/128x128/apps/utilities-terminal.png"><action name="Execute"><execute>urxvtc</execute></action></item>
<item label="urxvt" icon="/usr/share/icons/nuoveXT2/128x128/apps/utilities-terminal.png"><action name="Execute"><execute>urxvt</execute></action></item>
<item label="urxvt (tabbed)" icon="/usr/share/icons/nuoveXT2/128x128/apps/utilities-terminal.png"><action name="Execute"><execute>urxvt-tabbed</execute></action></item>
<item label="UXTerm" icon="/usr/share/pixmaps/xterm-color_48x48.xpm"><action name="Execute"><execute>uxterm</execute></action></item>
<menu label="VirtualBox" id="33-18" icon="/usr/share/icons/hicolor/128x128/mimetypes/virtualbox-vbox.png" execute="obm-vbox"/>
<item label="Xfe" icon="/usr/share/pixmaps/xfe.png"><action name="Execute"><execute>xfe</execute></action></item>
<item label="XTerm" icon="/usr/share/pixmaps/xterm-color_48x48.xpm"><action name="Execute"><execute>xterm</execute></action></item>
</menu>
<separator/>
<menu id="140" icon="/home/mnemonic/.local/share/icons/Archlinux-icon-256.png" label="Arch Linux">
<item label="AUR" icon="/usr/share/icons/hicolor/32x32/apps/arch-logo.png"><action name="Execute"><execute>xdg-open https://aur.archlinux.org</execute></action></item>
<item label="Bugs" icon="/usr/share/icons/hicolor/32x32/apps/arch-logo.png"><action name="Execute"><execute>xdg-open https://bugs.archlinux.org</execute></action></item>
<item label="Developers" icon="/usr/share/icons/hicolor/32x32/apps/arch-logo.png"><action name="Execute"><execute>xdg-open http://www.archlinux.org/developers/</execute></action></item>
<item label="Documentation" icon="/usr/share/icons/hicolor/32x32/apps/arch-logo.png"><action name="Execute"><execute>xdg-open https://wiki.archlinux.org/index.php/Official_Arch_Linux_Install_Guide</execute></action></item>
<item label="Donate" icon="/usr/share/icons/hicolor/32x32/apps/arch-logo.png"><action name="Execute"><execute>xdg-open http://www.archlinux.org/donate/</execute></action></item>
<item label="Forum" icon="/usr/share/icons/hicolor/32x32/apps/arch-logo.png"><action name="Execute"><execute>xdg-open https://bbs.archlinux.org</execute></action></item>
<item label="Homepage" icon="/usr/share/icons/hicolor/32x32/apps/arch-logo.png"><action name="Execute"><execute>xdg-open http://www.archlinux.org</execute></action></item>
<item label="Schwag" icon="/usr/share/icons/hicolor/32x32/apps/arch-logo.png"><action name="Execute"><execute>xdg-open http://www.zazzle.com/archlinux/</execute></action></item>
<item label="SVN" icon="/usr/share/icons/hicolor/32x32/apps/arch-logo.png"><action name="Execute"><execute>xdg-open http://projects.archlinux.org/svntogit/</execute></action></item>
<item label="Wiki" icon="/usr/share/icons/hicolor/32x32/apps/arch-logo.png"><action name="Execute"><execute>xdg-open https://wiki.archlinux.org</execute></action></item>
</menu>
<menu id="144" icon="/usr/share/icons/nuoveXT2/128x128/apps/firefox.png" label="Firefox" execute="obm-specified_bookmarks"/>
<menu id="148" icon="/usr/share/pixmaps/xfe.png" label="XFE" execute="obm-xfe_bookmarks"/>
<menu id="152" icon="/usr/share/icons/nuoveXT2/128x128/mimetypes/unknown.png" label="Recent Documents" execute="obm-recents"/>
<separator/>
<item label="Run command" icon="/usr/share/icons/Adwaita/16x16/actions/system-run.png"><action name="Execute"><execute>gmrun</execute></action></item>
<menu id="164" icon="/usr/share/icons/nuoveXT2/128x128/actions/application-exit.png" label="Exit">
<item label="Hybrid-sleep" icon="/usr/share/icons/Arc/actions/16@2x/system-suspend-hibernate.png"><action name="Execute"><execute>systemctl hybrid-sleep</execute></action></item>
<item label="Hibernate" icon="/usr/share/icons/Arc/actions/16@2x/system-hibernate.png"><action name="Execute"><execute>systemctl hibernate</execute></action></item>
<item label="Suspend" icon="/usr/share/icons/Arc/actions/16@2x/system-suspend.png"><action name="Execute"><execute>systemctl suspend</execute></action></item>
<item label="Logout" icon="/usr/share/icons/nuoveXT2/128x128/actions/system-log-out.png"><action name="Exit" /></item>
<item label="Reboot" icon="/home/mnemonic/.local/share/icons/system-reboot.png"><action name="Execute"><execute>sudo -A systemctl reboot</execute></action></item>
<item label="Shutdown" icon="/usr/share/icons/nuoveXT2/128x128/actions/system-shutdown.png"><action name="Execute"><execute>sudo -A systemctl poweroff</execute></action></item>
</menu>
</openbox_pipe_menu>
mnemonic@blackbird[~]$
Well, following the link of the docs you told me i did:
mnemonic@blackbird:1[~]$ killall jgmenu
mnemonic@blackbird[~]$
mnemonic@blackbird[~]$ jgmenu_run ob | jgmenu --simple
info: using monitor '1'
info: got font from jgmenurc
info: set font to 'Ubuntu 12px'
info: got icon theme from gtk config file
info: set icon theme to 'nuoveXT2'
/bin/bash: null: command not found
^C
info: caught SIGTERM or SIGINT
mnemonic@blackbird[~]$
Like you can see, running on that way it return same error (/bin/bash: null: command not found) for each program i select in menu.
That ^C is because i pressed ^C in the keyboard :P
I think have something wrong on the "exec" command format, maybe a #0 null character or some quotes, i don´t know.
Great feedback - really appreciated.
You have structured obm
as follows:
<item label="foo">
<action name="Execute">
<execute>foo</execute>
</action>
</item>
According to the openbox.org wiki Action page, the <execute>
tag is depreciated and <command>
should be used instead.
See: http://openbox.org/wiki/Help:Actions#Action_syntax
Interestingly, one of the examples on the wiki menu page uses <execute>
and so does the /etc/xdg/openbox/menu.xml
on my machine.
See: http://openbox.org/wiki/Help:Menus
When I coded the ob module, I mostly used the BunsenLabs menu.xml which uses <command>
.
I did of course look at the openbox wiki pages, but didn't notice the <command>
vs <execute>
peculiarity.
I will patch the ob module to cope with both.
Are you running jgmenu from your distribution repo or do you build it yourself?
Would it be easy for you to replace the <execute>
tags with <command>
for the time being?
Nice menu by the way :)
Can could set “csv_cmd = jgmenu_run ob —cmd=obm”
Hello johanmalm,
Well, i modified the obm code (in perl) and changed the tag
I modified to:
<item label="foo">
<action name="Execute">
<command>foo</command>
</action>
</item>
obm isn´t using indent on xml structure, each line of the obm menu is printed from obm to stdout like:
<item label="foo"> <action name="Execute"> <command>foo</command> </action> </item>
1 item per line, may be it the reason of the problem?
And i am using the jgmenu from the official Arch Linux repository.
Oh, thanks for the above tip "csv_cmd = jgmenu_run ob —cmd=obm".
The indentation and new-line characters do not matter. We use libxml2 which is quite sophisticated.
Are you sure that <command>
doesn't work? It does for me :)
I've created obm-small
which contains the following:
#!/bin/sh
cat <<'EOF'
<openbox_pipe_menu>
<item label="File Manager"><action name="Execute"><execute>pcmanfm</execute></action></item>
<item label="Terminal"><action name="Execute"><execute>terminator</execute></action></item>
</openbox_pipe_menu>
EOF
jgmenu_run ob --cmd=obm-small
gives
(null),^tag(root-menu)
File Manager,(null)
Terminal,(null)
If I replace the <execute>
tags with <command>
tags, I get the output below (which makes the menu work).
(null),^tag(root-menu)
File Manager,pcmanfm
Terminal,terminator
OMG, you are right! I forget regenerate the menu file after my modifications LOL
It is working right now! Amazing :D
BTW, do you have some tip to have icons on the menu?
My rc file is the same above.
Thank you very much! jgmenu is really a nice tool.
We now support both <execute>
and <command>
It's a nice menu you've got there :smile:
The ob module does currently not support icons, but I will added that.
Indeed, it is really nice! Thank you!
I will wait for the next jgmenu and the icon update :D
Is possible to use a dynamic openbox menu (for example jgmenu_run ob) in i3-wm?
I can use pmenu, lx, xdg, but when i try to use ob it doesn´t work in my i3 wm. Some workaround?
Thanks in advance
Congratulation for jgmenu, it is a nice tool.