You are not logged in.

#1 2016-12-29 19:11:20

Head_on_a_Stick
Member
From: London
Registered: 2015-09-29
Posts: 8,759
Website

Touchpad toggle in Openbox menu

Add this stanza to ~/.config/openbox/menu.xml:

<item label="Touchpad Toggle">
        <action name="Execute">
                <command>bash -c &quot;[[ $(synclient  | awk '/TouchpadOff/{print $NF}') -eq 1 ]] &amp;&amp; synclient touchpadoff=0 || synclient touchpadoff=1&quot;</command>
        </action>
</item>

Or, if you are not feeling masochistic enough to edit XML directly [1], use:

Desktop right-click menu → Preferences → Openbox → GUI Menu Editor

And create a new entry with this in the Execute box:

bash -c "[[ $(synclient  | awk '/TouchpadOff/{print $NF}') -eq 1 ]] && synclient touchpadoff=0 || synclient touchpadoff=1"

Once menu.xml has been changed, reconfigure Openbox to add the item to the current menu:

openbox --reconfigure

[1] XML sucks!


“Et ignotas animum dimittit in artes.” — Ovid, Metamorphoses, VIII., 18.

Forum Rules   •   How to report a problem   •   Software that rocks

Offline

#2 2016-12-31 11:04:52

ohnonot
...again
Registered: 2015-09-29
Posts: 4,598
Website

Re: Touchpad toggle in Openbox menu

Head_on_a_Stick wrote:

can't say anything about that, but...

Head_on_a_Stick wrote:

Or, if you are not feeling masochistic enough to edit XML directly...

...i recommend using miniscripts in ~/bin for that (and make sure they use dash instead of bash for snappiness).
added bonus: no need to reconfigure openbox after editing the script.


BL quote proposals to this thread please.
how to ask smart questions | my repos / my repos | my blog
---
Thank you for posting direct image links!

Offline

Board footer

Powered by FluxBB