Configuring the Pandora?


Silent-Hunter

Hardcore Member
Joined
May 29, 2010
Messages
3,485
How do I change what the power switch does? I want to be able to have it ask me if I want to reboot or power off when I press it. Also, I can't change the shift key so it doesnn't move the window around. I want just the L or R button to do that. Thanks in advance!
 
Why do you feel the need to ask Craig this question directly? I think the support section would be a better place for this.
 
Yes, especially as Craig is not working on the OS ;)


Regarding the powerswitch:


There's a config file named /etc/pandora/conf/eventmap where you can set what script will be run when you move the powerswitch.


Per default it's set to /usr/pandora/scripts/op_power.sh



Code:
# Open Pandora
# Event-to-shscript map configuration

[keys]
# pass 'hold duration' to the script
# if a number follows script name, will always force invocation at that time (or less)
pandora /usr/pandora/scripts/op_menu.sh 2
power	/usr/pandora/scripts/op_power.sh 3
lcdbrightdown	/usr/pandora/scripts/op_bright_down.sh
lcdbrightup	/usr/pandora/scripts/op_bright_up.sh

[events]
# pass 'action code' to the script
# lid actions are: 1 lid-is-closing, 0 lid-is-opening
lid-toggle	/usr/pandora/scripts/op_lid.sh

[pndevmapperd]
# logging level 0 means to include debug; level 1 (regular), 2 (warnings), 3 (errors)
loglevel	1
minimum_separation	1	# 1 second minimum between a single event repeating

[battery]
# for LED-blinking when battery gets low
threshold	   10		# in %age; at x%, we go into blink-mode as warning
check_interval	   90		# in seconds to check threshold; should be a high 300s
blink_interval	   2		# frequency of blink
blink_duration	   50000	# how long a blink lasts, in uSecs
shutdown_threshold 5		# battery %age we force a shutdown (to save the SD!)
shutdown_script	   /usr/pandora/scripts/op_battlow.sh


Regarding the key to move the windows:


That's a setting of XFCE4 and can be changed in the settings there.

[/CODE]
 
Would it be possible to map the power switch to different actions depending on how long it's held? Like a short toggle will trigger the sleep mode while holding for some seconds pops up the menu? Also in /etc/pandora/conf/eventmap there are two entries for lcdbrightdown and lcdbrightup, but how are those actions mapped to the keyboard itself (i.e Fn+u and Fn+i)?
 
Would it be possible to map the power switch to different actions depending on how long it's held? Like a short toggle will trigger the sleep mode while holding for some seconds pops up the menu?

Yes, that's done in the script. Check op_power.sh or op_menu.sh to see how it's done.

Also in /etc/pandora/conf/eventmap there are two entries for lcdbrightdown and lcdbrightup, but how are those actions mapped to the keyboard itself (i.e Fn+u and Fn+i)?

AFAIR that's hardcoded... if I remember right, notaz mentioned we had to hardcode that, as the Fn as we use it didn't exist in a kernel...
 
Would it be possible to map the power switch to different actions depending on how long it's held? Like a short toggle will trigger the sleep mode while holding for some seconds pops up the menu?

Yes, that's done in the script. Check op_power.sh or op_menu.sh to see how it's done.
Cool, I will try it.

Also in /etc/pandora/conf/eventmap there are two entries for lcdbrightdown and lcdbrightup, but how are those actions mapped to the keyboard itself (i.e Fn+u and Fn+i)?

AFAIR that's hardcoded... if I remember right, notaz mentioned we had to hardcode that, as the Fn as we use it didn't exist in a kernel...

Oh ok, that's why I couldn't find it... :)
 
Yes, especially as Craig is not working on the OS ;)


Regarding the powerswitch:


There's a config file named /etc/pandora/conf/eventmap where you can set what script will be run when you move the powerswitch.


Per default it's set to /usr/pandora/scripts/op_power.sh



Code:
# Open Pandora

# Event-to-shscript map configuration


[keys]

# pass 'hold duration' to the script

# if a number follows script name, will always force invocation at that time (or less)

pandora /usr/pandora/scripts/op_menu.sh 2

power	/usr/pandora/scripts/op_power.sh 3

lcdbrightdown	/usr/pandora/scripts/op_bright_down.sh

lcdbrightup	/usr/pandora/scripts/op_bright_up.sh


[events]

# pass 'action code' to the script

# lid actions are: 1 lid-is-closing, 0 lid-is-opening

lid-toggle	/usr/pandora/scripts/op_lid.sh


[pndevmapperd]

# logging level 0 means to include debug; level 1 (regular), 2 (warnings), 3 (errors)

loglevel	1

minimum_separation	1	# 1 second minimum between a single event repeating


[battery]

# for LED-blinking when battery gets low

threshold	   10		# in %age; at x%, we go into blink-mode as warning

check_interval	   90		# in seconds to check threshold; should be a high 300s

blink_interval	   2		# frequency of blink

blink_duration	   50000	# how long a blink lasts, in uSecs

shutdown_threshold 5		# battery %age we force a shutdown (to save the SD!)

shutdown_script	   /usr/pandora/scripts/op_battlow.sh


Regarding the key to move the windows:


That's a setting of XFCE4 and can be changed in the settings there.
Thanks for the power info! I tried changing the move key it with the setting manager, but it wasn't even set to shift in there. It's set to ALT-F7 in there.
 
Last edited by a moderator:
Back
Top