You are not logged in.
Does anybody know of a good "hello world" pipemenu written in python or bash? I'd like to get started with making my own pipemenus, but I'm having a hard time looking though some of the pipemenus on the Openbox website. I just need a nice clean one to look at for a starting point. Thanks.
Offline
Hi kiwisaotome,
The idea is to make a script that creates an xml form at the time when it is called, which the openbox menu can use. It's fairly easy. Here is an example that I use. I don't remember where I got it from:
#!/bin/bash
FREQ=`cpufreq-info -p | awk '{print $3}'`
echo '<openbox_pipe_menu>'
if [ $FREQ = 'powersave' ]; then
echo '<separator label="Powersave"/>'
else
echo '<item label=" Powersave">'
echo '<action name="Execute"><execute>sudo cpufreq-set -g powersave</execute></action>'
echo '</item>'
fi
if [ $FREQ = 'ondemand' ]; then
echo '<separator label="Ondemand"/>
else
echo '<item label="Ondemand">'
echo '<action name="Execute"><execute>sudo cpufreq-set -g ondemand</execute></action>'
echo '</item>'
fi
if [ $FREQ = 'performance' ]; then
echo '<separator label="Performance"/>'
else
echo '<item label="Performance">'
echo '<action name="Execute"><execute>sudo cpufreq-set -g performance</execute></action>'
echo '</item>'
fi
echo '</openbox_pipe_menu>'
Then I call it from the openbox menu.xml where it first is declared or what ever it's called:
<menu execute="~/.config/openbox/scripts/cpufreq-pipe.sh" id="system-cpu-menu" label="CPU Governor"/>
And then called:
<menu id="system-cpu-menu"/>
Hope that helps.
Offline
This is pretty simple. Thanks for breaking it down for me.
Offline