Drafts Action Directory

Toggle Shopping Mode

Posted by agiletortoise, Last update 4 days ago

Enable or disable “Shopping mode”. This is a convenience script to turn on or off three features at once:

  • Focus mode
  • Link mode
  • The device idle (sleep) timer

My primary use for this “mode” is shopping at the grocery store. I make a task [ ] list in a draft. Enabling focus mode keeps my shopping list active. Enabling link mode keeps accidental taps from entering edit mode and showing the keyboard. Disabling the system idle timer keeps your phone from going to sleep so you don’t have to wake up the phone every time you want to check off another item.

Install

Steps

  • script

    let p = Prompt.create();
    p.title = "Shopping Mode";
    p.message = "Toggle focus & link mode and device idle timer to make it easier to check off lists while shopping";
    
    p.addButton("Enable");
    p.addButton("Disable");
    p.isCancellable = false;
    
    p.show();
    if (p.buttonPressed == "Enable") {
    	app.isIdleDisabled = true;
    	editor.focusModeEnabled = true;
    	editor.linkModeEnabled = true;
    }
    else {
    	app.isIdleDisabled = false;
    	editor.focusModeEnabled = false;
    	editor.linkModeEnabled = false;
    }

Options

  • After Success Nothing
    Notification Error
    Log Level Error

Comments

Actions available in the Action Directory are uploaded by community members. Use appropriate caution reviewing downloaded actions before use.