• hi,
    although my ultimate aim will be to use only 1 swipe to popup a menu to control "back to clock, back to launcher, back 1 step" etc,
    currently my fastest shortcut will be to use "swip back" using swipe left to right,
    with "swipe back to clock" <-- if this could be modified to use swipe up to down. currently "swip back to clock" is hard coded to use swipe Lt to Rt so these 2 app cant be used the same time.

    I found this reference on event Bangle.swipe
    manual

    with help from GPT4,
    it seems for the "swipe back to clock"'s boot.js,
    for this part:

    let swipeHandler = (dir) => {
        let currentFile = global.__FILE__||"default";
        log("swipe:" + dir + " on app: " + currentFile);
    
        if (!inhibit && dir === 1 && !Bangle.CLOCK) {
          log("on a not clock app " + currentFile);
          if ((settings.mode === 1 && settings.whiteList.includes(currentFile)­) || // "White List"
          (settings.mode === 2 && !settings.blackList.includes(currentFile­)) || // "Black List"
          settings.mode === 3) { // "Always"
            log("load clock");
            Bangle.showClock();
          }
        }
        inhibit = false;
      };
    
      Bangle.on("swipe", swipeHandler);
    }
    

    I simply change it into
    let swipeHandler = ( _ , dir) => {

    will do the trick?

    1. if it works, i would like to call it "swipe back to clock UD", later i would like to add the menu function to it, may be call it "swip back to clcok SM" S for selecting swipe U/D/L/R, M for menu.
      But the SM version will be a long way to go. Currently should I keep the UD version for my own and not publishing to the bangle store? however i think it do will help as it now let people can use gesture to switch back to clcok by swipe U2D and use "swipe back" Lt to Rt together.

    thanks

  • del1234

  • ok, gpt4 worked,
    originally after i read the manual i'll use

    let swipeHandler = ( 0 , dir) => {

    but gpt4 is weak, but still stronger than layman.

    so should use let swipeHandler = ( _ , dir) => {

    may be no need to upload this subtle thing to the bangle store,
    but this will make "swipe back to clock" use swipe Up to Down, instead of Lt to Rt;
    so now you can at the same stime use "swipe back" swipe Lt to Rt for 1 step back.

  • NOT very helpful,
    now with "swipe back to clock" using swipe up to down, then in "folder launcher", you cant scroll up

    so,
    the 4 lists of (always on, whitelist, blacklist, always off) should be extended to L to R, R to L, U to D, D to U, for BOTH "back swipe" and "swipe back to clock"

    may be if "back swipe" works (1 step back, this never worked for me), a menu will be pop up upon the swipe and let user choose.
    it WORKed, but only on apps that have an arrow in the Lt Upper corner.
    so when compare to "swipe back to clock", this app brings you back to the clock on any screen.

  • hi, before i implment the 4 list/menu for the "swipe back to clock" or "back swipe",
    currently the best way is leave "swipe back to clock" untouched, handle any Lt to Rt swipe, as it works on any clock/app ("backswipe" only work if there is an arrow at Lt upper corner).

    and modify "back swipe" into swipe U to D:

     function goBack(lr, _) {
        // if it is a left to right swipe
        if (lr === 1) {
          // if we're in an app that has a back button, run the callback for it
          if (global.BACK && countHandlers("swipe")<=settings.standar­dNumSwipeHandlers && countHandlers("drag")<=settings.standard­NumDragHandlers) {
            global.BACK();
          }
        }
      }
    

    simply change the
    function goBack(lr, _) {

    into function goBack(_, lr) {

  • just found,
    keeping swipe back to clock as Lt to Rt swipe,
    and make back swipe as Rt to Lt swipe is the best choice,
    keeping up and down swipe for choosing things.

    do so by modifiying the lr === 1 into lr === -1 below

    function goBack(lr, _) {
        // if it is a left to right swipe
        if (lr === 1) {
          // if we're in an app that has a back button, run the callback for it
          if (global.BACK && countHandlers("swipe")<=settings.standar­dNumSwipeHandlers && countHandlers("drag")<=settings.standard­NumDragHandlers) {
            global.BACK();
          }
    
    }
    

    }

  • Post a reply
    • Bold
    • Italics
    • Link
    • Image
    • List
    • Quote
    • code
    • Preview
About

[BJv2, 95%] Modify "swipe back to clock" to use swipe up to down instead of Lt to Rt.

Posted by Avatar for ccchan @ccchan

Actions