View Single Post
Posts: 2,014 | Thanked: 1,581 times | Joined on Sep 2009
#108
Messed around with the scripts a little and came up with some stuff that doesn't require any outside apps etc to work.

Edit a file called /opt/bin/boostfm.sh
Code:
!/bin/sh
STATE=`fmtx_client | grep state | cut -d '=' -f2`
if [ "disabled" = ${STATE} ]
then
   echo "Turning on FM transmitter"
   fmtx_client -p1
else
   echo "Turning off FM transmitter"
   fmtx_client -p0
fi
/bin/echo 118 > /sys/class/i2c-adapter/i2c-2/2-0063/power_level
exit 0
Now add the following to /etc/sudoers

Code:
user ALL = NOPASSWD: /opt/bin/boostfm.sh
Now create a file called BoostFM.desktop in /usr/share/applications/hildon which contains

Code:
[Desktop Entry]
Version=0.1
Type=Application
Name=BoostFM
Exec=osso-xterm 'sudo /opt/bin/boostfm.sh'
Icon=general_fm_transmitter
X-Windows-Icon=
X-HildonDesk-ShowInToolbar=false
X-Osso-Type=application/x-executable
This will open up an xterm, run the script and then close the xterm. It checks to see if the transmitter is on and will turn it off if it is. I used a standard system icon for the icon in the desktop file. All you need to now is put it as a shortcut on your desktop and its one tap on and off.
__________________
Class .. : Power Poster, Potential Coder
Humor .. : [*********] Alignment: Chaotic Evil
Patience : [***-------] Weapon(s): +2 Logic Mace
Agro ... : |*****-----] Relic(s) : G1, N900

 

The Following 11 Users Say Thank You to Bratag For This Useful Post: