maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Brainstorm (https://talk.maemo.org/forumdisplay.php?f=47)
-   -   [Proposal pending]Disable vibration when on charging mode? (https://talk.maemo.org/showthread.php?t=49848)

aman18narang 2010-04-12 18:36

[Proposal pending]Disable vibration when on charging mode?
 
Link to the brainstorm
http://maemo.org/community/brainstor...n_on_charging/


Hi,
i am not programmer but just an idea which i guess should not be very difficult to implement.

Usually we keep our phones on a hard surface when on charging mode and so when i get a call or a msg it vibrates, scratching the lower body. Plus, i also dont like the sound of vibration on a hard surface.

Can anyone make a hack that disables vibration mode when charging and re-enables it when removed from charging mode?

hawaii 2010-04-12 18:57

Re: Disable vibration when on charging mode?
 
Should be possible with dbus-scripts running a script with the following;

dbus-send --print-reply --dest='com.nokia.profiled' /com/nokia/profiled com.nokia.profiled.set_value string:general string:vibrating.alert.enabled string:"Off"

Marcus 2010-04-12 18:58

Re: Disable vibration when on charging mode?
 
Not to steal the topic, but any chance you could make the brightness 100% when charging as well?

Apox 2010-04-12 23:02

Re: Disable vibration when on charging mode?
 
I really like the charging and not vibrating idea! Could this be made a reality?

HtheB 2010-04-12 23:15

Re: Disable vibration when on charging mode?
 
Quote:

Originally Posted by Apox (Post 607724)
I really like the charging and not vibrating idea! Could this be made a reality?

Why not just change your profile?

I really like that it's vibrating while charging!!!!

thecubed 2010-04-12 23:34

Re: Disable vibration when on charging mode?
 
If you check what DBUS signals are sent when you plug the device in to charge, you can write a script that is launched whenever the usb cable is plugged in to disable vibration, and another to re-enable it when the charger is removed.

The documentation for dbus-scripts.d should contain almost everything you need. Just find the DBUS event that is emitted when the charger is plugged in, and find what is emitted when it is removed. Add a dbus-script to run the command above to disable vibrate when those signals are received, and you're in business!

I could potentially see use for this (for me) to turn _on_ the ringer when placed on charger, as my charger is upstairs while I am downstairs (too lazy to buy a 2nd charger).

For Marcus' idea, yes- you can make the brightness 100% too, I'd just have to find the right dbus command from the simple-brightness applet.

If I get a chance, I could whip this up for you later on today.

hawaii 2010-04-13 03:22

Re: Disable vibration when on charging mode?
 
dbus-scripts-settings has this information in it already, and a GUI to boot - if you're too lazy to sniff dbus calls or even issue dbus-scripts --debug --system and pull the interface values.

thecubed 2010-04-13 04:41

Re: Disable vibration when on charging mode?
 
Quote:

Originally Posted by hawaii (Post 607921)
dbus-scripts-settings has this information in it already, and a GUI to boot - if you're too lazy to sniff dbus calls or even issue dbus-scripts --debug --system and pull the interface values.

Yep, I've got the right dbus calls, I just need to install dbus-scripts on my n900. It was acting up earlier from some of my SmartDial tests (apparently abusing Qt isn't good for it... :) ) so I haven't had a chance yet.

I am coding it to allow you to perform different actions when the charger is plugged in or unplugged-- such as setting the brightness or changing the profile to speaker or vibrate on/off.

This is turning out to be just the simple project I wanted, something without a GUI :)

Ah, the joys of Linux!

aman18narang 2010-04-13 19:39

Re: Disable vibration when on charging mode?
 
thanks for taking up the idea guys..i'll be happy to test if someone comes up with a script..pls try make the instructions a bit noob friendly! :)

thecubed 2010-04-13 19:41

Re: Disable vibration when on charging mode?
 
Working on it right now!
Only problem is that I don't have my charger with me (nor a usb cable, so I'm going off the dbus logs I saved yesterday)

If I can, I'll make a .sh file that will do it all for you.


All times are GMT. The time now is 11:56.

vBulletin® Version 3.8.8