The Following User Says Thank You to Benson For This Useful Post: | ||
![]() |
2008-10-03
, 14:34
|
Posts: 33 |
Thanked: 1 time |
Joined on Aug 2008
@ South Carolina
|
#22
|
![]() |
2008-10-03
, 16:51
|
|
Posts: 4,930 |
Thanked: 2,272 times |
Joined on Oct 2007
|
#23
|
#!/bin/sh sudo gainroot << E_O_F /usr/bin/matchboxwm stop /usr/local/bin/fvwm2 E_O_F
#!/bin/sh sudo gainroot << E_O_F killall fvwm2 /usr/bin/matchboxwm start E_O_F
ButtonStyle 1 5 45x45@1 55x45@1 55x55@0 45x55@0 45x45@1 # Dot ButtonStyle 2 5 25x25@1 25x75@1 75x75@0 75x25@0 25x25@1 # Big Box ButtonStyle 4 4 50x65@1 35x35@1 65x35@1 50x65@0 # small down triangle ButtonStyle 3 13 25x25@1 41x25@1 41x50@0 41x25@0 59x25@1 59x50@0 59x25@0 75x25@1 75x55@0 60x80@0 40x80@0 25x55@1 25x25@1 # Mouse #ButtonStyle * 4 50x35@1 65x65@0 35x65@0 50x35@1 # Small up Triangle #ButtonStyle * 4 50x65@1 35x35@1 65x35@1 50x65@0 # Small down Triangle #ButtonStyle * 4 50x25@1 75x75@0 25x75@0 50x25@1 # Large up Triangle #ButtonStyle * 4 50x75@1 25x25@1 75x25@1 50x75@0 # Large down Triangle
# This menu is invoked as a sub-menu - it allows you to quit, # restart, or switch to another WM. AddToMenu "Quit-Verify" "Really Quit Fvwm? " Title + "Yes, Really Quit " Quit + "Restart fvwm " Restart fvwm2 + "Restart fvwm 1.x" Restart fvwm + "Start matchbox " Restart /usr/bin/matchboxwm start + "" Nop + "No, Don't Quit " Nop
# This menu will fire up some very common utilities AddToMenu "Utilities" "Utilities " Title + "Xterm " Exec exec xterm -e /bin/sh& + "Rxvt " Exec exec rxvt -fn 6x13 -rv -e /bin/bash& + "Calculator " Exec exec xcalc & + "Xman " Exec exec xman & + "Xmag " Exec exec xmag & + "" Nop + "Input " Popup Input + "" Nop + "Modules" Popup Module-Popup + "" Nop + "Exit Fvwm " Popup Quit-Verify AddToMenu "Input" "Input " Title + "Button 1 " Exec exec xmodmap -e 'pointer = 1 2 3' + "Button 2 " Exec exec xmodmap -e 'pointer = 2 3 1' + "Button 3 " Exec exec xmodmap -e 'pointer = 3 1 2' + "" Nop + "Xvkbd" Exec exec xvkbd &
# # On Appilcation Window Decoration # # Button Context Modifi Function # the title bar buttons Mouse 0 1 A Menu Window-Ops Close Mouse 0 2 A Maximize-Func Mouse 0 3 A Menu Input Nop Mouse 0 4 A Iconify # titlebar Mouse 1 T A Move-or-Raise Mouse 2 T A Menu Window-Ops2 Nop # rest of the frame Mouse 1 FS A Resize-or-Raise Mouse 2 FS A Menu Window-Ops2 Nop # Icon Mouse 1 I A Move-or-Iconify Mouse 2 I A Menu Window-Ops2 Iconify # anything Mouse 3 TSIF A RaiseLower
![]() |
2008-10-03
, 18:12
|
Posts: 33 |
Thanked: 1 time |
Joined on Aug 2008
@ South Carolina
|
#24
|
![]() |
2008-10-03
, 22:03
|
|
Posts: 903 |
Thanked: 632 times |
Joined on Apr 2008
|
#25
|
#!/bin/sh KEYBOARD=`pidof hildon-input-method` POKERTH=`pidof pokerth` if [ "$POKERTH" ] then echo "PokerTH is already started, exiting..." exit 0 else if [ "$KEYBOARD" ] then /etc/osso-af-init/keyboard.sh stop echo "Starting PokerTH..." /usr/local/games/PokerTH-0.6.2/pokerth.sh while [ "$POKERTH" ] do echo "Debugger: If you see this text, there is a problem" sleep 300 done /etc/osso-af-init/keyboard.sh start else echo "hildon-input-method is stopped." if [ "$POKERTH" ] then echo "Killing PokerTH..." kill $POKERTH fi echo "Starting hildon-input-method..." /etc/osso-af-init/keyboard.sh start fi fi exit 0
![]() |
2008-10-04
, 19:40
|
Posts: 33 |
Thanked: 1 time |
Joined on Aug 2008
@ South Carolina
|
#26
|
![]() |
2008-10-04
, 19:58
|
Posts: 33 |
Thanked: 1 time |
Joined on Aug 2008
@ South Carolina
|
#27
|
![]() |
2008-10-04
, 21:09
|
|
Posts: 4,930 |
Thanked: 2,272 times |
Joined on Oct 2007
|
#28
|
![]() |
2008-10-04
, 21:11
|
|
Posts: 4,930 |
Thanked: 2,272 times |
Joined on Oct 2007
|
#29
|
Benson,
I don't know if you are familiar with PokerTH, but someone on ITT recently ported it to Hildon.
There is one major problem with it though, and that is everytime the turn comes to you, the keyboard pops up. Very frustrating.
So, the most elegant way I found to stop this from happening was to kill hildon-input-method via "/etc/osso-a-init/keyboard.sh stop" while using the game. Originally, I wrote a simple "script" that would see if hildon-input-method was running, and if it was kill it, else start it.
This was still a bit of a pain because you'd have to run this script everytime you were done with the game to restart your keyboard (you could automatically run it when PokerTH started to kill your keyboard).
So today, I spent an hour seeing if I could automate the whole process. And after a bit and trial and error, I came up with this:
Please disregard the while loop, I put it in there before I knew what I was doingCode:#!/bin/sh KEYBOARD=`pidof hildon-input-method` POKERTH=`pidof pokerth` if [ "$POKERTH" ] then echo "PokerTH is already started, exiting..." exit 0 else if [ "$KEYBOARD" ] then /etc/osso-af-init/keyboard.sh stop echo "Starting PokerTH..." /usr/local/games/PokerTH-0.6.2/pokerth.sh while [ "$POKERTH" ] do echo "Debugger: If you see this text, there is a problem" sleep 300 done /etc/osso-af-init/keyboard.sh start else echo "hildon-input-method is stopped." if [ "$POKERTH" ] then echo "Killing PokerTH..." kill $POKERTH fi echo "Starting hildon-input-method..." /etc/osso-af-init/keyboard.sh start fi fi exit 0
As you can probably see, my script calles PokerTH on line 15, and when PokerTH is killed control "returns" to my script and hildon-input-method is started back up. Ok, this is the second script I've ever written, be easy
Couldn't this exact same philosophy be applied to killing hildon-desktop, starting fvwm, then when fvwm quits, restarting hildon-desktop?
Please point out where my logic is flawed
![]() |
2008-10-04
, 21:22
|
Posts: 33 |
Thanked: 1 time |
Joined on Aug 2008
@ South Carolina
|
#30
|
If you read through the whole thread, you'll see a couple of options to avoid that; the one in post 15 is what I currently use, as I think it's the best option.
I think the CPU applet iiiedokeiii mentioned is the same one I use; it's full name is osso-statusbar-cpu. You can also use Personal Menu or Personal Launcher to run arbitrary commands.
With any of those, you should be able to select a menu item that will run a script; you can have that script either shut matchbox down cleanly (as above) or kill it, as you like, and then start FVWM. You can also have another entry to stop FVWM and restart Matchbox.
World's first inductively-charged N900!