OneSwitch pet - control a PC using a single switch

A home for all kinds of Puppy related projects
Message
Author
User avatar
SFR
Posts: 1800
Joined: Wed 26 Oct 2011, 21:52

#31 Post by SFR »

The only real issue I am experiencing so far is that I can't get the radar screen to sit on top of other windows - it always stays in the background behind everything else[...]
Strange, I'm using Compiz on daily basis, but just tested the script under JWM and 'always-on-top' also works fine for me.
Did you check wmctrl permissions?
Also, what will happen when, after launching radar, you'll type directly (open terminal in folder where wmctrl is):

Code: Select all

./wmctrl -r "OneSwitch - Radar/Menu" -b add,above
Another thought - it's rather unlikely, but perhaps you need to recompile wmctrl by yourself..?
1) After I use the "choose action" window to select "click" radar drops back automatically into the "choose direction" mode. Initially that seemed efficient, but now I find it makes it harder to do a "repeated key click". Would it create any adverse problems if that was changed so that after selecting "click" the "choose action" dialog would reappear? Example: when I am using xvkbd I sometimes need to repeatedly click backspace, delete, or page down etc. It would be nice to be able to repeat a keyclick without going through a new "move" procedure. (I guess different users might have a different preference, so I could keep two separate versions of radar to accomodate both methods)
Done. I too think it's more comfortable.
2) The radar sweep is now more jerky than it was previously. It is not a problem but I wondered if this was a deliberate choice, or just a byproduct of the script being "busier" than before?
I reduced number of possible directions from 71 to 35 since some of intermediate degrees were being disregarded by xdotool.
Now cursor really goes where radar shows and indeed - CPU suffers 2xLess. :wink:

Code: Select all

#!/bin/bash

# Radar v0.5

# Req.: Gtkdialog >= 0.8.0, xdotool, detect_key, wmctrl, xwininfo, getcurpos, awk, tr

# POSITION can be one of these:
# CENTER, TOP-LEFT, TOP, TOP-RIGHT, BOTTOM-LEFT, BOTTOM, BOTTOM-RIGHT
POSITION=BOTTOM-RIGHT

# =============================================================================
# Init
# =============================================================================

# Exit if another instance is already running
sleep 0.1
[ `pidof $(basename $(readlink -e "$0")) -o %PPID | wc -w` -gt 1 ] && exit

APPDIR="$(dirname $(readlink -e "$0"))"

POSITION="`echo $POSITION | tr [:lower:] [:upper:]`"

TEMPDIR=/dev/shm/one_switch_temp
mkdir $TEMPDIR

# Delete tempdir and kill all subprocesses on exit
trap 'rm -rf $TEMPDIR; killall detect_key; kill $GTKPID' EXIT

export PIC=$TEMPDIR/cursor_pic
export ROTATION=$TEMPDIR/cursor_rotate
export MENU_1_STATE=$TEMPDIR/menu1_state
export MODE=$TEMPDIR/mode
export DELAY4MENU=$TEMPDIR/delay4menu
export DELAY4RADAR=$TEMPDIR/delay4radar
echo -10 > $ROTATION
echo 0 > $MENU_1_STATE
echo radar > $MODE
echo 4 > $DELAY4RADAR

PRESS=/tmp/switch_state
[ -f $PRESS ] && rm $PRESS
PAUSE="key 119 state 0"
"$APPDIR/detect_key" /dev/input/event0 > $PRESS &

# Read current screen resolution
read MAXX MAXY <<< `xwininfo -root | awk 'NR>=8&&NR<=9 {print $2}'`

# =============================================================================
# Gtkdialog structures
# =============================================================================

export PREVIEW='
<window title="OneSwitch - Radar/Menu" width-request="74" height-request="74" decorated="false" skip-pager-hint="true" skip-taskbar-hint="true" resizable="false">
  <pixmap>
    <variable>PICTURE</variable>
    <input file>'"$PIC"'</input>
  </pixmap>
  <timer visible="false" milliseconds="true" interval="200">
    <action>animate</action>
    <action>refresh:PICTURE</action>
  </timer>
</window>
'

# =============================================================================
# Functions
# =============================================================================

wait_for_switch () {
  until [ "`grep "$PAUSE" $PRESS`" ]; do
    sleep 0.1
  done
}

set_position () {
case "$POSITION" in
  "CENTER" ) CX=$(($MAXX/2-37)); CY=$(($MAXY/2-37)) ;;
  "TOP-LEFT" ) CX=0; CY=32 ;;
  "BOTTOM-LEFT" ) CX=0; CY=$(($MAXY-32-74)) ;;
  "TOP-RIGHT" ) CX=$(($MAXX-74)); CY=32 ;;
  "TOP" ) CX=$(($MAXX/2-37)); CY=32 ;;
  "BOTTOM" ) CX=$(($MAXX/2-37)); CY=$(($MAXY-32-74)) ;;
  * ) CX=$(($MAXX-74)); CY=$(($MAXY-32-74)) ;;
esac
}

animate () {
case "`cat $MODE`" in

  "radar" )
    read DEG < $ROTATION
    read DELAY < $DELAY4RADAR
    if [ $DEG = 0 ] || [ $DEG = 90 ] || [ $DEG = 180 ] || [ $DEG = 270 ]; then
      [ $DELAY -gt 0 ] && ((DELAY--)) && echo $DELAY > $DELAY4RADAR && exit
    else
      echo 4 > $DELAY4RADAR  
    fi
    DEG=$(($DEG+10))
    [ "$DEG" -ge 360 ] && DEG=0
    echo $DEG > $ROTATION
    # Create svg pic
    echo '<svg width="64" height="64" xmlns="http://www.w3.org/2000/svg">
    <circle cx="32" cy="32" r="28" stroke="red" fill="none" stroke-width="3" />
    <line x1="32" y1="32" x2="32" y2="4" stroke="black" stroke-width="3" transform="rotate('$DEG' 32 32)" />
    </svg>' > $PIC
  ;;

  "freeze" )
    exit
  ;;

  "menu" )
    read DELAY < $DELAY4MENU
    if [ $DELAY -gt 0 ]; then
      ((DELAY--)); echo $DELAY > $DELAY4MENU
    else
      echo 4 > $DELAY4MENU      
      case "`cat $MENU_1_STATE`" in
        0) POS=0; echo 1 > $MENU_1_STATE ;;
        1) POS=16; echo 2 > $MENU_1_STATE ;;
        2) POS=32; echo 3 > $MENU_1_STATE ;;
        3) POS=48; echo 0 > $MENU_1_STATE ;;
      esac
      echo '<svg width="64" height="64" xmlns="http://www.w3.org/2000/svg">
      <text font-family="DejaVu Sans" font-size="13" font-weight="bold">
      <tspan x="12" y="12">Move</tspan>
      <tspan x="14" y="28">Click</tspan>
      <tspan x="1" y="44">Db-Click</tspan>
      <tspan x="3" y="60">Rt-Click</tspan>
      </text>
      <rect x="0" y="'$POS'" width="64" height="16" stroke="darkgreen" fill="green" stroke-width="2" opacity="0.5" />
      </svg>' > $PIC
    fi
  ;;
  
esac
}
export -f animate && animate


# =============================================================================
# MAIN LOOP
# =============================================================================

set_position
gtkdialog -G 64x64+$CX+$CY -p PREVIEW & GTKPID=$!
sleep 1
"$APPDIR/wmctrl" -r "OneSwitch - Radar/Menu" -b add,above

# Infinite loop
while :; do
    
  wait_for_switch
  
  : > $PRESS
  echo freeze > $MODE
 
  read DEG < $ROTATION
  # Move cursor until switch signal will appear again
  until [ "`grep "$PAUSE" $PRESS`" ]; do
    xdotool mousemove_relative --polar $DEG 6
    read X Y <<< `getcurpos`
    [ $X -ge $(($MAXX-1)) ] && X=1 && xdotool mousemove $X $Y
    [ $X -le 0 ] && X=$MAXX && xdotool mousemove $X $Y
    [ $Y -ge $(($MAXY-1)) ] && Y=1 && xdotool mousemove $X $Y
    [ $Y -le 0 ] && Y=$MAXY && xdotool mousemove $X $Y
    sleep 0.1
  done

  while :; do
    : > $PRESS
    echo 0 > $DELAY4MENU
    echo 0 > $MENU_1_STATE
    echo menu > $MODE
  
    wait_for_switch
    echo freeze > $MODE
  
    case "`cat $MENU_1_STATE`" in
      1) break ;;
      2) xdotool click 1 ;;
      3) xdotool click --repeat 2 1 ;;
      0) xdotool click 3 ;;
    esac
  
    sleep 0.5
  done
  echo radar > $MODE
  echo 0 > $DELAY4MENU
  echo 0 > $MENU_1_STATE
  : > $PRESS
done

# =============================================================================
__________________

A bit different approach, using dzen2 (wmctrl no needed, dzen acts as a dock): a top or bottom bar with rolling options. No radar picture, but arrows instead (only 8 directions).
See attached tgz.

Greetings!
Attachments
NavBar.tar.gz
(20.94 KiB) Downloaded 430 times
[color=red][size=75][O]bdurate [R]ules [D]estroy [E]nthusiastic [R]ebels => [C]reative [H]umans [A]lways [O]pen [S]ource[/size][/color]
[b][color=green]Omnia mea mecum porto.[/color][/b]

User avatar
greengeek
Posts: 5789
Joined: Tue 20 Jul 2010, 09:34
Location: Republic of Novo Zelande

#32 Post by greengeek »

Navbar looks interesting. I will have to give this a good try on several different puppies.

Two things I have noted so far:
1) On my Slacko53 install some program windows opened up so large that the control functions (minimise/maximise/close) are hidden behind the navbar. I think I can get around this by resizing manually, then it should be ok next time I open that program.
2) If I accidentally rightclick the navbar it stops running and disappears. :-)
(Mind you that might be a handy shortcut to stop the script if needed...)

Also noted that in my PuppyNOP532 installation Opera seems to have the old symptom of closing the bookmarks list when clicking. Will have to try Opera on a wider variety of pups. At least functionality seems good with pups using Seamonkey and Firefox.

EDIT :Both radar4 and Navbar run really well on MagooPup (which is based on Precise and targeted at the vision-challenged) so I think these scripts are ready to be mentioned on the other thread about single-switch functionality.

Are you happy for me to go ahead and post there or would you prefer to do it?

I will be doing more testing with a range of puppies and browsers to get a better idea of what can be recommended, but I think the performance on Magoo suggests that these scripts are already at the stage where they could benefit many users, so I think the time is right to mention them.

What do you think?

(and which names do you prefer to call your scripts? I prefer radar4 and Navbar, but maybe you prefer one_switch or similar? )

User avatar
SFR
Posts: 1800
Joined: Wed 26 Oct 2011, 21:52

#33 Post by SFR »

1) On my Slacko53 install some program windows opened up so large that the control functions (minimise/maximise/close) are hidden behind the navbar. I think I can get around this by resizing manually, then it should be ok next time I open that program.
Hmm, when NavBar is already running and then I maximize a window, its top bar (with all control buttons) is right below NavBar.
Did you try that? (tested in JWM/Compiz - Slacko-5.5)
2) If I accidentally rightclick the navbar it stops running and disappears. :)
(Mind you that might be a handy shortcut to stop the script if needed...)
Luckily dzen has "-e ungrabmouse" option - it disables that behavior, but for now it's indeed more convenient to have this "shortcut" active.
Also noted that in my PuppyNOP532 installation Opera seems to have the old symptom of closing the bookmarks list when clicking. Will have to try Opera on a wider variety of pups. At least functionality seems good with pups using Seamonkey and Firefox.
Maybe problems with Opera will end when they'll switch to WebKit..?
EDIT :Both radar4 and Navbar run really well on MagooPup (which is based on Precise and targeted at the vision-challenged) so I think these scripts are ready to be mentioned on the other thread about single-switch functionality.

Are you happy for me to go ahead and post there or would you prefer to do it?

I will be doing more testing with a range of puppies and browsers to get a better idea of what can be recommended, but I think the performance on Magoo suggests that these scripts are already at the stage where they could benefit many users, so I think the time is right to mention them.

What do you think?

(and which names do you prefer to call your scripts? I prefer radar4 and Navbar, but maybe you prefer one_switch or similar? )
Be my guest. :)

And I think "Radar" (now 0.6) and "NavBar" are fine.

______________

I found statically (I guess) compiled version of xdotool.
I included it into the suite, so practically everything what's needed is in one place now.
(However if one has xdotool already installed - it'll be utilized in the first place.)

In addition I polished up both scripts a bit and added 'Drag' menu option, so now one can drag icons/windows and select text.

Greetings!
Attachments
Radar-0.6.tar.gz
(66.89 KiB) Downloaded 425 times
NavBar-0.2.tar.gz
(51.7 KiB) Downloaded 419 times
[color=red][size=75][O]bdurate [R]ules [D]estroy [E]nthusiastic [R]ebels => [C]reative [H]umans [A]lways [O]pen [S]ource[/size][/color]
[b][color=green]Omnia mea mecum porto.[/color][/b]

User avatar
greengeek
Posts: 5789
Joined: Tue 20 Jul 2010, 09:34
Location: Republic of Novo Zelande

#34 Post by greengeek »

Magnificent work SFR - thank you very much. These scripts seem to be very useful in their current form. I need to do a lot of testing across a range of puppies and browsers before I can make any further comments (but will not be around the computer much for the next few weeks...)

Hopefully others will also give some feedback over the next few weeks and pinpoint good combinations of puppy/browser/window manager.

This has been a very satisfying effort for me. Thanks so much!

User avatar
SFR
Posts: 1800
Joined: Wed 26 Oct 2011, 21:52

#35 Post by SFR »

Thanks Greengeek, it'll be very helpful since these apps really like to behave differently under various WMs/Puppies.
For example, I just found two another oddities:
- under JWM dragging window causes xdotool freeze until left mouse button is pressed (physically), but no problems under Compiz and Openbox
- In Lupu-528 NavBar is displayed ~ in the middle of the screen and there's no way to adjust its Y position (perhaps there's a need to recompile dzen right there..?)

Anyway, Will asked to have more control on Radar size, so I made the code more configurable - most of settings is customizable now (see at the beginning of the code).
Same done to NavBar.

______________

EDIT: Ok, I have found a workaround for 'JWM window move' problem:
1. Open as text /root/.jwm/jwmrc-personal
2. Change these two parameters from 'outline' to 'opaque':

Code: Select all

<!-- The move mode (outline or opaque) -->
<MoveMode>opaque</MoveMode>

<!-- The resize mode (outline or opaque) -->
<ResizeMode>opaque</ResizeMode>
3. Restart JWM

And now it works as it should.

_______________
me wrote:- In Lupu-528 NavBar is displayed ~ in the middle of the screen and there's no way to adjust its Y position
It's not Lupu specific, but Openbox issue. But I also found a workaround:
Go to Menu -> Desktop -> Desktop Settings -> Openbox Config (or Obconf or similar)
then press 'Windows' tab and make sure that:
- Place new windows under the mouse pointer
- Center new windows when they are placed
checkboxes are both UNCHECKED.

It seems to (usually) work, however only TOP position is being respected.
BOTTOM works, so far, only under Compiz...

BTW, I reuploaded the attachment with added 'readme.txt', which contains the above workarounds.

Greetings!
Attachments
radar-0.7+navbar-0.3.tar.gz
(119.13 KiB) Downloaded 422 times
[color=red][size=75][O]bdurate [R]ules [D]estroy [E]nthusiastic [R]ebels => [C]reative [H]umans [A]lways [O]pen [S]ource[/size][/color]
[b][color=green]Omnia mea mecum porto.[/color][/b]

User avatar
greengeek
Posts: 5789
Joined: Tue 20 Jul 2010, 09:34
Location: Republic of Novo Zelande

#36 Post by greengeek »

Hi SFR, I just tried your latest versions on Precise 5.5 and they work well. I had occasional problems with some windows (eg mtpaint) opening up the first time underneath the navbar, but other than that all good so far. (later openings seem fine...Although if necessary I can bring a window back out from under the navbar by right clicking on it's icon in the taskbar at the bottom of the screen, and selecting "maximise" from those choices.)

One improvement I think might be nice is if it was possible to add a brief delay on the first choice of the "choose action" menu (eg:"Move") and also the first choice in the "choose direction" menu (especially in navbar where the first arrow lights up too quick for my eyes to find it and I have to wait a moment to get my bearings again)

Also - one other thought - some people might prefer a version of navbar that only uses 4 direction arrows (no diagonals) - just to bring a little more visual simplicity. In my opinion radar would not need this change because the circular motion is slightly easier to follow than navbars' icon stepping.

User avatar
SFR
Posts: 1800
Joined: Wed 26 Oct 2011, 21:52

#37 Post by SFR »

Hey Greengeek
Also - one other thought - some people might prefer a version of navbar that only uses 4 direction arrows (no diagonals) - just to bring a little more visual simplicity. In my opinion radar would not need this change because the circular motion is slightly easier to follow than navbars' icon stepping.
Hmm, why not? Done. Can be adjusted via 'ARROWS' constant at the beginning of the code.
One improvement I think might be nice is if it was possible to add a brief delay on the first choice of the "choose action" menu (eg:"Move") and also the first choice in the "choose direction" menu (especially in navbar where the first arrow lights up too quick for my eyes to find it and I have to wait a moment to get my bearings again)
Yep, it's a good idea. I had similar problems.
In NavBar I've implemented it globally (directions/actions), however only for "main" options, since in the second menu are only two (Move & Release), but in Radar it's been done only for the actions (Move, Click...).
If it comes for radar panel itself, to not add more complexity to the code, I've done it a bit differently:
when you choose "Move" action to get back to the radar, its position will be regressed to the previous 'hard' position (0°, 90°, 180°, or 270°), since they're already have an extra delay.

Of course all of those new parameters can be adjusted/turned off via adequate constants.

______________

One more thing - I encountered the problem with wmctrl (non-working 'always on top' for Radar) in Lupu-528/JWM.
I guess it's caused by too old JWM version, because under Openbox all is ok.

______________

EDIT: I did implement extra delay for "Move" option (in Radar) in wrong way. Corrected now. The attachement has been reuploaded.

Greetings!
Attachments
radar-0.8+navbar-0.4.tar.gz
(119.64 KiB) Downloaded 414 times
[color=red][size=75][O]bdurate [R]ules [D]estroy [E]nthusiastic [R]ebels => [C]reative [H]umans [A]lways [O]pen [S]ource[/size][/color]
[b][color=green]Omnia mea mecum porto.[/color][/b]

User avatar
greengeek
Posts: 5789
Joined: Tue 20 Jul 2010, 09:34
Location: Republic of Novo Zelande

#38 Post by greengeek »

Thanks again! I'm just trying navbar4 on Precise5.5 and find that if I look in pprocess for the navbar process number and try to kill navbar it does not terminate the first time - I need to display pprocess again and I find a new navbar running and I have to kill that aswell. I did not notice this behaviour before, but have not done a lot of testing with Precise, so I don't know the cause yet. Will try to test some more with Slacko soon..

User avatar
SFR
Posts: 1800
Joined: Wed 26 Oct 2011, 21:52

#39 Post by SFR »

Oh, I think I know what's wrong.
Did you launch navbar directly from the provided 'radar-0.8+navbar-0.4' directory, without moving its own 'NavBar-0.4' dir somewhere else before?
Both scripts create some subprocesses (for detect_key and dzen2), that can be also visible for 'ps | grep navbar' or in pprocess list, if you launch Radar/NavBar from a directory, which path contains words 'radar' or 'navbar' (and so it is in this case).
Sorry, I didn't realize that until now.
But it's enough to rename the main dir to, eg. 'Radar-0.8+NavBar-0.4' what should eliminate such behavior.
Also 'killall radar' or 'killall navbar' will do the job as well, however it's not the best way to do so...

____________
greengeek/the_other_thread wrote:[...] to alter the transition speed from "choose action" to "choose direction".
I see I could misunderstood you - did you mean the additional delay only when switching between direction<->action modes and not delaying the very first direction/action every time it's highlighted?
If so, just let me know - it's very easy to re-implement it this way...however the "regress" option for Radar could be preserved IMHO, what do you think (you are testing it more extensively than me, after all :) )?

Greetings!
[color=red][size=75][O]bdurate [R]ules [D]estroy [E]nthusiastic [R]ebels => [C]reative [H]umans [A]lways [O]pen [S]ource[/size][/color]
[b][color=green]Omnia mea mecum porto.[/color][/b]

User avatar
greengeek
Posts: 5789
Joined: Tue 20 Jul 2010, 09:34
Location: Republic of Novo Zelande

#40 Post by greengeek »

SFR wrote:I see I could misunderstood you - did you mean the additional delay only when switching between direction<->action modes and not delaying the very first direction/action every time it's highlighted?
Sorry - my mistake! You did not misunderstand me - I have used the wrong wording on the other thread. I will edit it for better clarity.

User avatar
SFR
Posts: 1800
Joined: Wed 26 Oct 2011, 21:52

#41 Post by SFR »

No problem, however I did implement it anyway, 'coz it might be useful too.
It's handled by TRANS_DELAY constant (by default it's set to 0).
FIRST_POS_DELAY remained untouched.
___________

I added another menu option - 'XVKBD-Mode'.
It's kinda implementation of your initial idea.
Works this way, after choosing 'XVKBD-Mode' option:
- if XVKBD is not installed - appropriate message will pop-up.
- if XVKBD is installed, but not running - it will be launched.
- XVKBD window will be focused, and then:
1. Relocate mouse cursor to the top-left corner of XVKBD window
2. Keep moving mouse cursor down (wrapping is enabled) until switch will be pressed.
3. Keep moving mouse cursor right
a) if cursor will reach the right edge of the window and switch won't be pressed until then - leave XVKBD-Mode.
b). If switch will be pressed - send 'left-click' and GOTO 1

I tested it only under Compiz/JWM (Slacko-5.5).
BTW, Compiz is so nice, that it's enough to click a window (eg. Geany) before entering into XVKBD-Mode and such window is ready to receive keystrokes.
In JWM the use of "Focus" button before is necessary...

I'll be grateful for info if this new option works correctly and if it's useful (or not) in the long run..?

Greetings!
Attachments
Radar-0.9+NavBar-0.5.tar.gz
(120.96 KiB) Downloaded 437 times
[color=red][size=75][O]bdurate [R]ules [D]estroy [E]nthusiastic [R]ebels => [C]reative [H]umans [A]lways [O]pen [S]ource[/size][/color]
[b][color=green]Omnia mea mecum porto.[/color][/b]

User avatar
greengeek
Posts: 5789
Joined: Tue 20 Jul 2010, 09:34
Location: Republic of Novo Zelande

#42 Post by greengeek »

Hi SFR - for some reason my earlier post today has disappeared :-(

Anyway - I have been having problems with Precise55 and Slacko55 so I have gone back to THINSlacko for my testing.

xvkbd-mode is very interesting! However, at the moment it is problematic. When I clicked focus the mouse would continue to track over the keyboard only, so I could not select a window. Also, I could not find a way to get back into the "choose action" menu - it was locked into xvkbd mode.

I think it would be a great idea to develop the xvkbd mode a little more. It has good potential. However, at the moment I want to focus on finding what is causing my problems with Precise55 and Slacko55 because I need to identify a good base for radar and navbar to be recommended with.

More testing tonight!

EDIT : O.k, I see now that I can get out of xvkbd-mode by driving the cursor right off the right hand end of the keyboard. Works ok, but very slow to get that far... :-)

User avatar
SFR
Posts: 1800
Joined: Wed 26 Oct 2011, 21:52

#43 Post by SFR »

EDIT : O.k, I see now that I can get out of xvkbd-mode by driving the cursor right off the right hand end of the keyboard. Works ok, but very slow to get that far... :)
No problem, we can add also vertical breakpoint (just replace both scripts with the attached ones).
Try and see which approach acts better.

Good luck with 5.5! :)

Greetings!
Attachments
Nav_Radar_scripts_only.tar.gz
(4.78 KiB) Downloaded 392 times
[color=red][size=75][O]bdurate [R]ules [D]estroy [E]nthusiastic [R]ebels => [C]reative [H]umans [A]lways [O]pen [S]ource[/size][/color]
[b][color=green]Omnia mea mecum porto.[/color][/b]

User avatar
greengeek
Posts: 5789
Joined: Tue 20 Jul 2010, 09:34
Location: Republic of Novo Zelande

#44 Post by greengeek »

SFR wrote:No problem, we can add also vertical breakpoint (just replace both scripts with the attached ones)
Excellent idea. I hope to try these tonight.

Just had another thought - some experienced users might prefer to speed up the "choose action" menu - maybe this could be enhanced by allowing the "drag" and "xvkbd" options to be de-selected somehow?

eg:, at the beginning of the script where you define all the variables, maybe there could be variables called something like:

Display_DRAG_option_in_menu true/false
Display_XVKBD-MODE_option_in menu true/false

and then a user could strip the menu down to "move, click, doubleclick, rightclick" if they felt they wanted the extra speed and simplicity this would bring to cycling through the menu.

Or even if they were still displayed but just not included in the cycle...

User avatar
greengeek
Posts: 5789
Joined: Tue 20 Jul 2010, 09:34
Location: Republic of Novo Zelande

#45 Post by greengeek »

I've noticed a few times that the radar screen obscures the scrollbar in many windows (especially browsers). Is it possible to move it approx 20 pixels or so to the left of the right hand screen boundary?

User avatar
SFR
Posts: 1800
Joined: Wed 26 Oct 2011, 21:52

#46 Post by SFR »

I've noticed a few times that the radar screen obscures the scrollbar in many windows (especially browsers). Is it possible to move it approx 20 pixels or so to the left of the right hand screen boundary?
Done, controlled via OFFSET_H & OFFSET_V (horizontal & vertical) constants.
...allowing the "drag" and "xvkbd" options to be de-selected somehow?
Yeah, the "main" menu became a bit clogged. :wink:
I resolved this differently, mostly because I introduced new option.
Now the 'main' menu contains:
Move
L-Click
R-Click
Dbl-Click
more...


'Drag' & 'XVBD' have been moved to 'more...' submenu, as well as the new action: 'Cycle'.
'Cycle' allows to...cycle opened windows (simply - emulates Alt+Tab); delay is controlled by CYCLE_DELAY (default = 1.5 sec).

Just let me know if this approach is efficient, so I'll roll it back, if not.

____________

UPDATE: version 1.0alpha2 with added GUI for configuration purposes and to start/stop the scripts in a bit easier way.
Important change - now the main scripts are named "navbar-main" and "radar-main".
GUI is launched via "navbar-config" and "radar-config" scripts, settings will be saved inside app's directory ("radar_settings" & "navbar_settings") and if anything goes wrong, it's enough to delete those files, what will revert default settings.


Greetings!
Attachments
Radar-1.0a2+NavBar-1.0a2.tar.gz
(123.8 KiB) Downloaded 605 times
Radar-1.0a+NavBar-1.0a.tar.gz
(121.17 KiB) Downloaded 586 times
[color=red][size=75][O]bdurate [R]ules [D]estroy [E]nthusiastic [R]ebels => [C]reative [H]umans [A]lways [O]pen [S]ource[/size][/color]
[b][color=green]Omnia mea mecum porto.[/color][/b]

User avatar
ETP
Posts: 1193
Joined: Tue 19 Oct 2010, 19:55
Location: UK

Radar-1.0a2

#47 Post by ETP »

Hi SFR/Greengeek,

I have just tried 1.0alpha2 with added GUI and must say that it is very impressive.

The biggest issue remaining in the project is that of navigation which remains tedious and calls for too much precision. Try for example navigating to the mike icon in Google voice. The same applies to the keys on Xvkbd even when it is launched at a slightly larger size as in my beta.

My eyes were drawn however to the free line beneath Xvkbd on your Radar menu. It cries out for one last additional menu which could provide 4 further choices plus BACK. Some possibilities may be as follows:
1. ALT+F10
This toggles and can therefore give you a full screen keyboard with easier to navigate icons that require less precision. I tried it and text does indeed go to the browser or document beneath. Your cycle function is then very handy.

2 & 3. Page Up and Page Down.

Very handy for scrolling a web page/thread and documents/pdfs.

4. Return.
“Press enter to continue
Regards ETP
[url=http://tinyurl.com/pxzq8o9][img]https://s17.postimg.cc/tl19y14y7/You_Tube_signature80px.png[/img][/url]
[url=http://tinyurl.com/kennels2/]Kennels[/url]

User avatar
greengeek
Posts: 5789
Joined: Tue 20 Jul 2010, 09:34
Location: Republic of Novo Zelande

#48 Post by greengeek »

I have not had a chance to get my teeth into the latest version yet, but am hung up on an issue with NAVBAR versions 0.4 and 0.5 (which may be well suited to some of my needs because of their simplicity)

The problem is this: if I do not choose the direction quickly enough, navbar will cycle through all the arrows, then display a "blank" period for 11 seconds, then go back to displaying the arrows. This is happening on the "SwitchPup" that I have based on racyNOP532. (I have not investigated this further on other puppies yet - very little PC access at present)

NAVBAR 0.3 does not exhibit this problem so I will probably use that for further testing at the moment.

User avatar
SFR
Posts: 1800
Joined: Wed 26 Oct 2011, 21:52

#49 Post by SFR »

@ETP:
Done.
Custom options can be changed via GUI (by default - options proposed by you).

@Greengeek:
IIRC it's been fixed a couple of versions before.
If you'd like to apply the fix to an older version (eg. 0.5), just find this line:

Code: Select all

((DIRECTION_POS++)); [ $DIRECTION_POS -ge ${#DIRECTIONS} ] && DIRECTION_POS=0
and replace it with:

Code: Select all

((DIRECTION_POS++)); [ $DIRECTION_POS -ge $ARROWS ] && DIRECTION_POS=0
Greetings!
Attachments
Radar-1.0b+NavBar-1.0b.tar.gz
(125.55 KiB) Downloaded 611 times
[color=red][size=75][O]bdurate [R]ules [D]estroy [E]nthusiastic [R]ebels => [C]reative [H]umans [A]lways [O]pen [S]ource[/size][/color]
[b][color=green]Omnia mea mecum porto.[/color][/b]

User avatar
ETP
Posts: 1193
Joined: Tue 19 Oct 2010, 19:55
Location: UK

Radar - new version

#50 Post by ETP »

Hi SFR,

That was quick! Many thanks, I will give it a try.
It should enable me to then produce a screen resolution agnostic remaster. :)
Regards ETP
[url=http://tinyurl.com/pxzq8o9][img]https://s17.postimg.cc/tl19y14y7/You_Tube_signature80px.png[/img][/url]
[url=http://tinyurl.com/kennels2/]Kennels[/url]

Post Reply