You are not logged in.

#1 2011-01-26 19:21:25

jwhendy
Member
Registered: 2010-04-01
Posts: 621

[SOLVED] Set openbox root-menu to fixed position (e.g. a corner)?

Is it possible to set the root-menu to a fixed position (say, upper left hand corner?) via rc.xml? I know applications have this with the <position> options and <x><y>... but I am not finding anything about doing this for the root-menu. It doesn't seem to be an application.

I'm aware of THIS and was thinking I could try something like this:

<keybind key="C-A-m">
  <action name="Execute">
    <command>/usr/bin/xdotool key alt+Escape</command>
  </action>
</keybind>

but that doesn't seem to work. I tried using

<command>eval '/usr/bin/xdotool key alt+Escape'</command>

as well but that didn't work either. I already have the root menu bound to alt+Escape (which works) and typing the xdotool command show above into the terminal directly works fine. I just wanted to try and create an action out of it to see if I could then specify some x,y coordinates for the command in the <applications> section. I'm not even sure if that would work, but I can't get it functioning to begin with to try it. Any thoughts?

Last edited by jwhendy (2015-11-16 15:04:34)

Offline

#2 2011-01-26 20:25:41

Mr Green
Forum Fellow
From: U.K.
Registered: 2003-12-21
Posts: 5,899
Website

Re: [SOLVED] Set openbox root-menu to fixed position (e.g. a corner)?


Mr Green

Offline

#3 2011-01-26 20:29:48

jwhendy
Member
Registered: 2010-04-01
Posts: 621

Re: [SOLVED] Set openbox root-menu to fixed position (e.g. a corner)?

@Mr Green:

Thanks -- I guess it's going to come down to figuring out if "root-menu" qualifies as an application or has a class/name associated with it or not. So far I haven't been able to figure that out. Coming from xfce, the panel was an actual app (xfce4-popup-menu, which I think changed to xfce4-popup-applicationsmen or something with 4.8). Not sure how OB works with the menu, though (as in, is it an app, script, or something?).

Offline

#4 2011-01-26 20:31:51

Mr Green
Forum Fellow
From: U.K.
Registered: 2003-12-21
Posts: 5,899
Website

Re: [SOLVED] Set openbox root-menu to fixed position (e.g. a corner)?

With Openbox I bound most of the things I wanted with keys.... so never used root menu

It is a good question never really thought about it, sounds like one for Planet Openbox

MrG


Mr Green

Offline

#5 2011-01-26 20:37:11

jwhendy
Member
Registered: 2010-04-01
Posts: 621

Re: [SOLVED] Set openbox root-menu to fixed position (e.g. a corner)?

@MG:

I do the same for most things (terms, file manager, chromium,...) but not stuff that I don't use that often like gimp, for example.

Looked at Planet OB... no idea how to post something there -- do I have to get my blog linked or something?

All in all, it really doesn't matter... I just like looking at one place when I access the menu, like the upper left or lower left corners, rather than where my mouse happens to be at the time. I figure a bunch of users might like the same. The principle above would work well -- right clicking the desktop could still produce it at the mouse, but to bind it to something in xdotool might allow a keyboard shortcut to produce it at a given location. Just my take, though!

Offline

#6 2011-01-26 21:59:35

SolarShado
Member
Registered: 2011-01-24
Posts: 14

Re: [SOLVED] Set openbox root-menu to fixed position (e.g. a corner)?

If you just want a menu as a fixed place on-screen, you might like dmenu. The included dmenu_run script may not be to your liking, but a custom wraper's easy to make

Offline

#7 2011-01-26 22:39:25

jwhendy
Member
Registered: 2010-04-01
Posts: 621

Re: [SOLVED] Set openbox root-menu to fixed position (e.g. a corner)?

@SolarShado: thanks for the suggestion... though using another program to do what Openbox already does isn't that appealing to me. I can deal with the menu popping up at the mouse location over another thing to configure smile Thanks again for the suggestion, though.

Offline

#8 2011-01-27 07:18:59

Mr Green
Forum Fellow
From: U.K.
Registered: 2003-12-21
Posts: 5,899
Website

Re: [SOLVED] Set openbox root-menu to fixed position (e.g. a corner)?

You have not stated if you use a panel, something like ldxe-panel gives you a set place for a menu like in Gnome

Have a feeling you just want to keep it simple, as I have said once you get key combos going you will not need menu at all

MrG

Last edited by Mr Green (2011-01-27 07:20:20)


Mr Green

Offline

#9 2011-01-27 16:18:02

jwhendy
Member
Registered: 2010-04-01
Posts: 621

Re: [SOLVED] Set openbox root-menu to fixed position (e.g. a corner)?

@MrG: yes, I use tint2... but don't want to click a panel... just have it appear. In xfce, I had it bound to alt-escape, so I'm just used to that. But I also got used to seeing it in the lower left all the time. When I'm typing (like now) and am not aware of the mouse and press that key combo (now bound to root-menu in OB)... I look around for where it appears (last place I left my cursor) rather than reflexively looking at the lower left. I'll probably just leave it how it is smile

Offline

#10 2011-01-28 02:31:20

quigybo
Member
Registered: 2009-01-15
Posts: 223

Re: [SOLVED] Set openbox root-menu to fixed position (e.g. a corner)?

One idea I just got (from your other post while playing with xdotool) is to use xdotool to right click at a certain point on your desktop, something like this:

xdotool mousemove 0 0 click 3 mousemove restore

Offline

#11 2011-01-28 02:37:40

jwhendy
Member
Registered: 2010-04-01
Posts: 621

Re: [SOLVED] Set openbox root-menu to fixed position (e.g. a corner)?

Ha! I actually fiddled with this by setting up a rc.xml (I think it was) rule where root-menu would occur when I moved the mouse to the bottom left of the screen and then tried using mousemove but it wouldn't activate unless I moved it ever so slightly again. I had not thought to actually integrate the move + a click to do it!

This is great -- maybe that's my ticket. I don't mind the mouse moving, so perhaps this is the way to rock. Thanks!

Last edited by jwhendy (2011-01-28 02:38:14)

Offline

#12 2011-02-10 19:22:34

drmarkafriedman
Member
Registered: 2011-02-10
Posts: 1
Website

Re: [SOLVED] Set openbox root-menu to fixed position (e.g. a corner)?

Thanks for the hint, I'm using:

<keybind key="r">
    <action name="Execute"><command>xdotool mousemove 0 0 click</command></action>
    <action name="ShowMenu"><menu>root-menu</menu></action>
</keybind>

Last edited by drmarkafriedman (2011-02-10 19:23:53)


Dr. Mark A. Friedman
web: http://www.drmarkafriedman.com

Offline

#13 2011-02-10 23:56:06

jwhendy
Member
Registered: 2010-04-01
Posts: 621

Re: [SOLVED] Set openbox root-menu to fixed position (e.g. a corner)?

@drmarkafriedman: even better than a click! Thanks for sharing smile

Offline

#14 2015-11-15 22:15:19

peterpan
Member
Registered: 2015-09-09
Posts: 2

Re: [SOLVED] Set openbox root-menu to fixed position (e.g. a corner)?

Hi!

I'm using the Openbox menu as a panel menu for tint2 and went with the xdotool solution. Was, however, a bit crappy, delayed and sometimes the menu didn't show up at all. But now i found the solution:

You can set a menu to a fixed position when you bind it to a key. Here's a section of my rc.xml:

<keybind key="Menu">
  <action name="ShowMenu">
     <menu>root-menu</menu>
      <position>
        <x>0</x>
        <y>25</y>
      </position>
    </action>
</keybind>

That's it.

If you also like to use the OB menu as a panel menu for tint2, create /usr/share/applications/NameForTheEntry.desktop with this content:

[Desktop Entry]
Type=Application
Encoding=UTF-8
Name=Tint2 Menu
Comment=Openbox Menu as panel menu in tint2
Exec=xdotool key "Menu"
Icon=/usr/share/icons/arch.png
Terminal=false
Categories=Menu;

Now edit your tint2rc:

# Launcher
launcher_item_app = /usr/share/applications/NameForTheEntry.desktop

Looks like this:

j9u76ve8.png

Maybe i should also put this on the openbox forum, this question is there around also i think.

Hope this helps and sorry for the necropost cool

peterpan

Offline

#15 2015-11-16 15:04:04

jwhendy
Member
Registered: 2010-04-01
Posts: 621

Re: [SOLVED] Set openbox root-menu to fixed position (e.g. a corner)?

@peterpan: Genius! Wow, how in the world did everyone miss that you can pass a <position> option in rc.xml?? Fantastic, and love that it works with just openbox vs. another tool. I already had a menu entry, so I just had to add a position option to it, reload OB, and it worked like a charm:

    <keybind key="A-Escape">
      <action name="ShowMenu">
        <menu>root-menu</menu>
        <position><x>0</x><y>0</y></position>
      </action>
    </keybind>

Thanks again, and my interpretation of the Arch forum rules may be too flexible, but I think a necropost that solves an unsolved question are great smile In fact, I'm going to finally set this to [SOLVED]!

Offline

Board footer

Powered by FluxBB