Skip to content

# anyRemote

# There are several "events" could be triggered

## Initialize event

(Init) event will be fired when anyRemote is initialized.

    (Init)=Exec(kdialog --msgbox "Initialized")

It is possible to customize handling of (Init) event. To do this, just add needed commands to $HOME/.anyRemote/hook_init file. That commands will be executed after all commands from (Init) event handler in configuration file. For example content of the $HOME/.anyRemote/hook_init can be the following:

    Exec(kdialog --msgbox "Initialized")

## Exit event

(Exit) event will be fired when anyRemote is exiting.

    (Exit)=Exec(rm -f /tmp/tmp.log)

It is possible to customize handling of (Exit) event. To do this, just add needed commands to $HOME/.anyRemote/hook_exit file. That commands will be executed after all commands from (Exit) event handler in configuration file. For example content of the $HOME/.anyRemote/hook_exit can be the following:

    Exec(kdialog --msgbox "Exiting")

## Connect event

(Connect) event will be fired when connection established.

    (Connect)=Exec(kdialog --msgbox "Connected now")

It is possible to customize handling of (Connect) event. To do this, just add needed commands to $HOME/.anyRemote/hook_connect file. That commands will be executed after all commands from (Connect) event handler in configuration file. For example content of the $HOME/.anyRemote/hook_connect can be the following:

    Exec(kdialog --msgbox "Connected")

## Disconnect event

(Disconnect) event will be fired if connection is lost.

    (Disconnect)=Exec(kdialog --msgbox Disconnected)

It is possible to customize handling of (Disconnect) event. To do this, just add needed commands to $HOME/.anyRemote/hook_disconnect file. That commands will be executed after all commands from (Disconnect) event handler in configuration file. For example content of the $HOME/.anyRemote/hook_disconnect can be the following:

    Exec(kdialog --msgbox "Disconnected")

Auto-lock example

    (Connect)=Exec(killall kdesktop_lock)
    (Disconnect)=Exec(kdesktop_lock --forcelock)

## Call handling events

Incoming call handling.

    (InCall)=Exec(kdialog --msgbox "Incoming call")

End of call handling.

    (EndCall)=Exec(kdialog --msgbox "Call ends")

Note for Server mode: This feature can not work for some of JSR-82 capabled phones. It was tested successfully only with SE-K750 and Motorola-RIZR-Z3.

Auto-mute example (amixer utility should be installed):

    (InCall)=Exec(amixer sset Master,0 mute);Make(remote,off)
    (EndCall)=Make(remote,on);Exec(amixer sset Master,0 unmute)

## Mode changing events

Mode is a group of key-to-command mapping (do not mix this with AT/Server mode !).

If mode is changed by Make(mode ...); then (ExitMode) event for current keymapping group and (EnterMode) event for the new keymapping group will be fired:

    *=Make(mode,XMMS)
    (ExitMode)=Exec(kdialog --msgbox "Exiting from current mode")
    [Mode]=XMMS
    % Do some initialization steps
    (EnterMode)=Exec(kdialog --msgbox "Enter to XMMS mode");\
                Exec(xmms)
    % Do some cleanup steps
    (ExitMode)=Exec(kdialog --msgbox "Exiting from XMMS mode");\
               Exec(killall xmms)
    [ModeEnd]

Maintained by anyRemote. Website by m.lettner.