SEARCH

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

You are not logged in.

#1 2013-09-13 16:00:29

stratosjack
New Member
Registered: 2013-09-13
Posts: 6

problem with openbox rc shortcuts [SOLVED]

Even though I use crunchbang for about two years now, this is my first post.
So it's really nice to meet you all, you're great!

To the point...
So I've made this script ( named toggleTouchpad ) that helps me toggle the synaptics touchpad ON/OFF, which I also placed in my ~/bin folder for my $PATH.

### this a script that uses synaptics driver to switch on/off the touchpad...
#!/bin/bash
STATE=$(synclient | grep TouchpadOff | cut -d = -f2)
if [ $STATE == 1 ]; then
	synclient TouchpadOff=0
else
	synclient TouchpadOff=1
fi

Then I added a shortcut key (Super-p) in the openbox rc.xml file, that executes the above script.

...
<keybind key="W-p">
      <action name="Execute">
        <name>Toggle TouchPad ON/OFF</name>
        <execute>toggleTouchpad</execute>
      </action>
</keybind>
...

Then it happens: first time I press the combination, everything seems to be working, just like I expected.
But second time I press the shortcut, nothing happens. Feels like the shortcut is dead.
There's also a syndaemon running, with interval 1 sec ( syndaemon -d -K -i 1 ) from the openbox autostart file.
Nevertheless I can confirm that the script is working correctly, no matter how many times I run it through terminal.
What's happening?

Last edited by stratosjack (2013-09-18 20:59:45)

Offline

Be excellent to each other!

#2 2013-09-18 15:28:31

cup_of_squirrel
#! CrunchBanger
From: New York City
Registered: 2013-08-29
Posts: 141

Re: problem with openbox rc shortcuts [SOLVED]

Not sure if this would be helpful but check out this post. It deals with conky restart script but I think you're running into the same problem (i.e. daemon/script not shutting down properly).

Offline

#3 2013-09-18 19:22:44

stratosjack
New Member
Registered: 2013-09-13
Posts: 6

Re: problem with openbox rc shortcuts [SOLVED]

No luck with conkywonkys here....
I was thinking maybe an option like 'run in terminal' inside rc.xml perhaps?

Offline

#4 2013-09-18 19:54:59

VDP76
#! Bean Roaster
Registered: 2012-04-12
Posts: 839

Re: problem with openbox rc shortcuts [SOLVED]

stratosjack wrote:

I was thinking maybe an option like 'run in terminal' inside rc.xml perhaps?

see if this does the trick...

<keybind key="W-p">
      <action name="Execute">
        <name>Toggle TouchPad ON/OFF</name>
        <execute>terminator --command=&quot;toggleTouchpad&quot;</execute>
      </action>
</keybind>

Last edited by VDP76 (2013-09-18 19:57:36)


#!#!#! Forum etiquette #!#!#!
Are you a new member!? Have you introduced yourself?!
CLI basics | LVM | smxi | chrooting | multiarch

Offline

#5 2013-09-18 20:51:14

stratosjack
New Member
Registered: 2013-09-13
Posts: 6

Re: problem with openbox rc shortcuts [SOLVED]

Yeah, that did the trick, thanks!
We found a workaround, so I guess its solved.

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.

Debian Logo