HI guys i have a question i have like 10 scripts on my n900 desktop thats mean 10 qbw like bluetooth on and off in one qbw and the other silent profile and general profile , my question is can i combine this 2 commands in one qbw, 1.bluetooth 2. profile and on my desktop i click 1= bluetooth ( bluetooth on ) and i click 2= profile ( general or silent profile ) PS this scripts in one QBW thank you
if [ `dbus-send --type=method_call --print-reply --dest=com.nokia.profiled /com/nokia/profiled com.nokia.profiled.get_profile|awk -F "\"" '/g/ {print $2}'` == "general" ];then dbus-send --type=method_call --dest=com.nokia.profiled /com/nokia/profiled com.nokia.profiled.set_profile string:"silent" else dbus-send --type=method_call --dest=com.nokia.profiled /com/nokia/profiled com.nokia.profiled.set_profile string:"general" fi dbus-send --type=method_call --print-reply --dest=com.nokia.profiled /com/nokia/profiled com.nokia.profiled.get_profile|awk -F "\"" '/g/ {print $2}'|sed 's/^s/S/;s/^g/G/;s/^/Profile: /'
if [ `dbus-send --system --print-reply --type=method_call --dest=org.bluez $(dbus-send --system --print-reply --dest=org.bluez / org.bluez.Manager.DefaultAdapter | awk -F'"' '/at/ {print $2}') org.bluez.Adapter.GetProperties|sed -n "/Powered/,/boolean/p"|tail -1|awk '{print $3}'` == "true" ];then dbus-send --system --type=method_call --dest=org.bluez $(dbus-send --system --print-reply --dest=org.bluez / org.bluez.Manager.DefaultAdapter | awk -F'"' '/at/ {print $2}') org.bluez.Adapter.SetProperty string:Powered variant:boolean:false else dbus-send --system --type=method_call --dest=org.bluez $(dbus-send --system --print-reply --dest=org.bluez / org.bluez.Manager.DefaultAdapter | awk -F'"' '/at/ {print $2}') org.bluez.Adapter.SetProperty string:Powered variant:boolean:true fi dbus-send --system --print-reply --type=method_call --dest=org.bluez $(dbus-send --system --print-reply --dest=org.bluez / org.bluez.Manager.DefaultAdapter | awk -F'"' '/at/ {print $2}') org.bluez.Adapter.GetProperties|sed -n '/Powered/,/boolean/p'|tail -1|awk '{print $3}'|sed 's/true/ON/;s/false/OFF/;s/^/Bluetooth: /'