|
2008-02-23
, 17:32
|
Posts: 51 |
Thanked: 2 times |
Joined on Jan 2008
|
#22
|
machster, apologies if this is too simple minded, but
did you make your script executable (chmod a+x swmb.sh)?
|
2008-02-23
, 17:43
|
|
Posts: 538 |
Thanked: 168 times |
Joined on Dec 2007
@ Seattle
|
#23
|
#!/bin/sh BTN=$(/usr/bin/xmodmap -pp | sed -ne 's/^\s\+1\s\+\([[:digit:]]\+\)\s*$/\1/p') if [ $BTN == 3 ]; then MAP='1 2 3' else MAP='3 2 1' fi /usr/bin/xmodmap -e "pointer = $MAP" 2>/dev/null
|
2008-02-25
, 03:06
|
Posts: 51 |
Thanked: 2 times |
Joined on Jan 2008
|
#24
|
|
2008-02-25
, 14:26
|
|
Posts: 538 |
Thanked: 168 times |
Joined on Dec 2007
@ Seattle
|
#25
|
Thanks to those who have tried to help, but unfortunately, I have not been able to get either script to work. No change is occuring when the shortcut key is pressed. Perhaps something is preventing the script from executing? I just don't know at this time.
|
2008-02-26
, 01:57
|
Posts: 51 |
Thanked: 2 times |
Joined on Jan 2008
|
#26
|
Here's one last thought... Do you have xmodmap installed? you can get it here: http://maemo.lancode.de/?path=./chinook/binary
Have you tried a different button assignment? Are you using a N800 or N810 - the N800 is quite limited in button selection and you can't use the "Escape" button for this.
|
2008-02-26
, 17:15
|
|
Posts: 3,096 |
Thanked: 1,525 times |
Joined on Jan 2006
@ Michigan, USA
|
#27
|
YEEEESSS!! Installed xmodmap and right click now works with the menu button I had assigned it to on the n800. PCQ, you have earned your crown. This is cool, thanks!
|
2008-03-07
, 19:24
|
Posts: 16 |
Thanked: 3 times |
Joined on Feb 2008
|
#28
|
#!/usr/bin/python from subprocess import call, Popen, PIPE xmodmap = Popen(['/usr/bin/xmodmap', '-pp'], stdout=PIPE) for line in xmodmap.stdout: setting = line.split() # get a list of non-whitespace sequences if setting: # can't index a zero length list print setting setting = line.split()[-1] # Get last item in list (button) if setting == '1': print 'click set to lmb, switching' #/usr/bin/xmodmap -e "pointer = 3 2 1" call(['/usr/bin/xmodmap', '-e', 'pointer = 3 2 1']) break elif setting == '3': print 'click set to rmb, switching' #/usr/bin/xmodmap -e "pointer = 1 2 3" call(['/usr/bin/xmodmap', '-e', 'pointer = 1 2 3']) break
|
2008-03-23
, 00:51
|
Posts: 67 |
Thanked: 6 times |
Joined on Dec 2007
|
#29
|
|
2008-03-23
, 21:59
|
Posts: 7 |
Thanked: 0 times |
Joined on Mar 2008
|
#30
|
Tags |
deprecated, kde, kde35, mouse |
|
Don't know if using the Aquamacs has anything to do with it - not even sure what that program is... you could try to Save As using KWrite - sometimes applications will automatically save files differently and shell scripts need to be simple text only without any formatting.
When you wish upon a star, your dreams really can come true... Unless it's an asteroid hurtling towards earth that will destroy all life.