SEARCH

Enter your search query in the box above ^, or use the forum search tool.

You are not logged in.

#1 2011-07-25 01:40:02

boh
Member
Registered: 2011-07-25
Posts: 29

Command for client-list-combined-menu? Bind it to screen edge?


OB4LiFE

Offline

Help fund CrunchBang, donate to the project!

#2 2011-07-25 04:10:19

psyco430404
#! Die Hard
From: Las Vegas, Nevada
Registered: 2011-07-04
Posts: 804

Re: Command for client-list-combined-menu? Bind it to screen edge?


"'If fighting is to result in victory, then you must fight'...Sun Tzu said that and id say he knows a little more about fighting then you do pal."

- TF2 Soldier

Offline

#3 2011-07-25 13:53:04

boh
Member
Registered: 2011-07-25
Posts: 29

Re: Command for client-list-combined-menu? Bind it to screen edge?

Hello. Thanks for the reply.

That looks like an ideal solution. Unfortunately, i can not get xautolock to activate F12 and bring up the desired menu. In fact, i don't think i can get xautolock to activate any one key.

I have tried adding "xautolock -locker  "xte key 'F12'" -corners 0+00  -cornerdelay 0 &" to autostart.sh, and i have tried running it from terminal as well, no joy.
And, i tried binding xautolock to the 'Print' key, which i have bound to gnome-screenshot, but that doesn’t work either.

I thought it might be due to 'unclutter', which i use for hiding the mouse pointer, but i disabled that and it still doesn't work.

However, xautolock does work when it is linked to an application, say 'leafpad' text editor.

Anyone have any ideas what i am doing wrong? As far as i can tell i have followed the instructions in the link posted by psycho, and elsewhere on the net.


OB4LiFE

Offline

#4 2011-07-27 03:49:30

johnraff
nullglob
From: Nagoya, Japan
Registered: 2009-01-07
Posts: 4,148
Website

Re: Command for client-list-combined-menu? Bind it to screen edge?

Another idea - xdotool will emulate a keypress from a command. For example, I tie an openbox sub-menu to the key combo 'S-C-W-t' in openbox's rc.xml and call it from a panel with the command 'xdotool key shift+ctrl+super+t'.

That just leaves the question of how to recognize the mouse event and fire off the command...

Offline

#5 2011-07-27 04:39:16

boh
Member
Registered: 2011-07-25
Posts: 29

Re: Command for client-list-combined-menu? Bind it to screen edge?

Thank you both, Phycho and Johnraff. A combination of your solutions worked.

I can now simply run (directly, or add to autostart.sh) the following:

xautolock -locker ~/Stuff/xdotool -corners ++++  -cornerdelay 0

Where "xdotool" is a simple shell script containing:

xdotool key F12

...and which has been 'activated' with chmod +x (not to patronise, just to help anybody interested who might need a little explication).

After, of course, first adding:

    <keybind key="F12">
      <action name="ShowMenu">
        <menu>client-list-combined-menu</menu>
      </action>
    </keybind>

...to my rc.xml.

The only thing is, it is not the snappiest solution, taking a couple of seconds to appear, but is a working one.

Is there, perhaps, a place i could place the script where it could be accessed by xautolock faster? Or perhaps you reading this knows of an altogether better solution. If so, please let me know.

Seems to me, this feature makes Openbox itself an altogether more complete stand alone experience, after all, sometimes your keyboard is just not particularly to hand.

Cheers.


OB4LiFE

Offline

#6 2011-07-27 04:46:38

psyco430404
#! Die Hard
From: Las Vegas, Nevada
Registered: 2011-07-04
Posts: 804

Re: Command for client-list-combined-menu? Bind it to screen edge?

Glad you got it to work man, ill see if i can find another application that does this more efficiently.


"'If fighting is to result in victory, then you must fight'...Sun Tzu said that and id say he knows a little more about fighting then you do pal."

- TF2 Soldier

Offline

#7 2011-07-27 04:54:18

boh
Member
Registered: 2011-07-25
Posts: 29

Re: Command for client-list-combined-menu? Bind it to screen edge?

That would be great, as adding it to /bin, /usr/bin, and/usr/local/bin, didn't speed it up, perceptibly.

Cheers.

EDIT: "it" being the shell script.

EDIT: After a little experimentation, it seems that a delay of a second or two, before activating the "locker", is intrinsic to xautolock.

Last edited by boh (2011-07-27 05:05:08)


OB4LiFE

Offline

Board footer

Powered by FluxBB

Copyright © 2012 CrunchBang Linux.
Proudly powered by Debian. Hosted by Linode.
Debian is a registered trademark of Software in the Public Interest, Inc.
Server: acrobat

Debian Logo